Opened 6 years ago
Last modified 5 years ago
#1380 new Bug
Trouble propagating weight arrays
Reported by: | Amandeep Singh Bakshi | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Delphes code | Version: | Delphes 3 |
Keywords: | Cc: |
Description
Hello,
I was trying to "delphe-size" a SUSY sample namely : /SMS-T2tt_3J_xqcut-20_top-corridor_2Lfilter_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16MiniAODv2-PUMoriond17_GridpackScan_80X_mcRun2_asymptotic_2016_TrancheIV_v6-v2/MINIAODSIM.
The event weights in my case are an array of weights and not one float per event, however when I try :
./DelphesCMSFWLite cards/CMS_PhaseII/CMS_PhaseII_200PU_v03.tcl #SUSY_sample# output.root
I observe that the weight arrays are replaced by a single number (EventWeight.At(0)), the zeroth entry in the array.
Could you suggest a fix for the problem?
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Hey pavel,
The branch Weight has a leaf Weight.Weight which is empty.
The Weight_size has the size of the sample I tried to convert, which is how I know of the problem. (It should be larger since there was an array).
Thanks for your response.
comment:3 by , 6 years ago
Could you please provide an example of code to access the event weights using the CMS software?
The code currently used in DelphesCMSFWLite to access the weights can be found on lines 148-158 in readers/DelphesCMSFWLite.cpp:
https://cp3.irmp.ucl.ac.be/projects/delphes/browser/git/readers/DelphesCMSFWLite.cpp#L148
comment:4 by , 5 years ago
Yes I see the same code in my version of DelphesCMSFWLite as well.
Although I was under the assumption it never enters that block since I was converting a MiniAOD and not an LHE file.
I am not sure where the MiniAOD weight handling happens.
comment:5 by , 5 years ago
I am not sure where the MiniAOD weight handling happens.
I'm afraid that we can't do much without this information.
comment:6 by , 5 years ago
Sorry for the delay in my response. I was away.
So I figured out the following :
- The code never enters the (foundLHE) L148 part.
- It gives a warning :Wrong LHEEvent Label! Please, check the input file. Not sure if this is related to it not entering the weight handling part.
- The only other weight handling section seems to be here https://cp3.irmp.ucl.ac.be/projects/delphes/browser/git/readers/DelphesCMSFWLite.cpp#L132.
In the file that I am trying to convert, AlphaQCD,QED etc..are all properly coverted, but the weight is lost.
This might be since it is called "weights_" in my file and is called "weight" here, although if I try modifying weight to weights at L132 it seems to give errors while remaking it.
Could you please check if the branch called 'Weight' contains the correct weights?