Conversation
|
Will have to clean up the commited changes - most added files are not needed (used only in analysis and tests). |
|
@AnushkaDurg6 Could you explain what the purpose of this new option is? |
004a36b to
c282b7b
Compare
The purpose is to have the same muon profile in MC as we do in data. So we have to sample per muon entry in the input file. |
|
Thanks for the explanation! |
c282b7b to
362c680
Compare
shipLHC/run_simSND.py
Outdated
| parser.add_argument("--NagoyaEmu","--useNagoyaEmulsions",dest="useNagoyaEmulsions",help="use bricks of 57 Nagoya emulsion films instead of 60 Slavich", required=False,action="store_true") | ||
| parser.add_argument("-y", dest="year", help="specify the year to generate the respective TI18 detector setup", required=False, type=int, default=2024) | ||
|
|
||
| parser.add_argument("--dataProfile", dest="dataProfile", help="Path to the ROOT file with Ntuple data", required=False) |
There was a problem hiding this comment.
I though of another name: "muonDataProfile"
and then help message like
"Path to the ROOT file with muon track data"
the uses dont need to be told in the help if it is ntuple inside that file
There was a problem hiding this comment.
I was about to comment on that as well. muonDataProfile is much more self-explanatory.
Additionally, required=False is redundant, as is dest, which defaults to the name of the long option.
shipLHC/run_simSND.py
Outdated
| print("The number of events is less than or equal to the number of enteries in the data profile") | ||
| for i in range(min(ntuple.GetEntries(),options.nEvents)): | ||
| ntuple.GetEntry(i) | ||
| # Extract x, y positions and slopes from the Ntuple |
There was a problem hiding this comment.
can this comment be aligned to the rest?
shipLHC/run_simSND.py
Outdated
| primGen.AddGenerator(pgun) | ||
| else: | ||
| print("The number of events is more than the number of enteries in the data profile") | ||
| # Set the primary generator for the run |
There was a problem hiding this comment.
fix the indentation of the this + the 2 lines below
these shall we executed one the loop over ntuple entries is done, but still inside the if dataProfile loop
shipLHC/run_simSND.py
Outdated
| z_plane = 250.0*u.cm | ||
| pgun = ROOT.FairBoxGenerator(13, 1) # Particle ID 13 for muons, charge is irrelevant | ||
| pgun.SetPRange(30,3500) # Set momentum | ||
| if(options.nEvents<=ntuple.GetEntries()): |
There was a problem hiding this comment.
no need for such an if statement
we need a warning that `if (options.nEvents>ntuple.GetEntries() ): print("Number of events to simulate > number of sample muon tracks. ")
There was a problem hiding this comment.
we can talk in person about that if once other changes are done ;)
There was a problem hiding this comment.
thank you! working on them now!
There was a problem hiding this comment.
Maybe my confusion with the multiple particle guns is coming in again here, but if you just want the distribution to be the same, you should be able to keep sampling.
Also, per event, is every particle gun producing a muon every event?
362c680 to
3bb7925
Compare
|
Pro tip: force pushing makes it hard to review what changed between commits. If you use Thanks for the updates to to the CLI argument :) |
Test1 dataprofile
593dd56 to
ce2875d
Compare
Test1 dataprofile
Updated run_simSND to handle data profiles for muons as option for input