Skip to content

Commit

Permalink
Merge pull request cms-sw#33 from jkiesele/master
Browse files Browse the repository at this point in the history
added new gen info to the template
  • Loading branch information
clelange authored Sep 18, 2017
2 parents d286150 + 8a582f8 commit dc643fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions SubmitHGCalPGun.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion templates/partGun_NTUP_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit dc643fe

Please sign in to comment.