diff --git a/SubmitHGCalPGun.py b/SubmitHGCalPGun.py index db917b1d59a1b..8aa30d450be12 100644 --- a/SubmitHGCalPGun.py +++ b/SubmitHGCalPGun.py @@ -45,6 +45,8 @@ def parseOptions(): parser.add_option('-i', '--inDir', dest='inDir', type='string', default='', help='name of the previous stage dir (relative to the local submission or "eosArea"), to be used as the input for next stage, not applicable for GEN stage') parser.add_option('-r', '--RelVal', dest='RELVAL', type='string', default='', help='name of relval reco dataset to be ntuplized (currently implemented only for NTUP data Tier') parser.add_option('', '--noReClust', action='store_false', dest='RECLUST', default=True, help='do not re-run RECO-level clustering at NTUP step, default is True (do re-run the clustering).') + parser.add_option('', '--addGenOrigin', action='store_true', dest='ADDGENORIG', default=False, help='add coordinates of the origin vertex for gen particles as well as the mother particle index') + parser.add_option('', '--addGenExtrapol', action='store_true', dest='ADDGENEXTR', default=False, help='add coordinates for the position of each gen particle extrapolated to the first HGCal layer (takes into account magnetic field)') # store options and arguments as global variables global opt, args @@ -382,16 +384,13 @@ def submitHGCalProduction(): inputFiles = '"' + '", "'.join([recoInputPrefix+str(f) for f in inputFilesListPerJob]) + '"' s_template=s_template.replace('DUMMYINPUTFILELIST',inputFiles) s_template=s_template.replace('DUMMYEVTSPERJOB',str(-1)) + - if DASquery: - # in case of relval centrally produced use readOfficialReco flag - s_template=s_template.replace('DUMMYROR','True') - else: - # otherwise put False - s_template=s_template.replace('DUMMYROR','False') if (opt.DTIER == 'NTUP'): s_template=s_template.replace('DUMMYRECLUST',str(opt.RECLUST)) + s_template=s_template.replace('DUMMYSGO',str(opt.ADDGENORIG)) + s_template=s_template.replace('DUMMYSGE',str(opt.ADDGENEXTR)) # submit job # now write the file from the s_template diff --git a/templates/partGun_NTUP_template.py b/templates/partGun_NTUP_template.py index 926cdffd05bb0..9e37ff3218a87 100644 --- a/templates/partGun_NTUP_template.py +++ b/templates/partGun_NTUP_template.py @@ -35,8 +35,9 @@ process.ana = cms.EDAnalyzer('HGCalAnalysis', detector = cms.string("all"), rawRecHits = cms.bool(True), - readOfficialReco = cms.bool(DUMMYROR), readCaloParticles = cms.bool(False), + storeGenParticleOrigin = cms.bool(DUMMYSGO), + storeGenParticleExtrapolation = cms.bool(DUMMYSGE), storePCAvariables = cms.bool(False), recomputePCA = cms.bool(False), includeHaloPCA = cms.bool(True),