2024 skimming and looper implementation (in progress)#30
2024 skimming and looper implementation (in progress)#30JavierGarciadeCastro wants to merge 17 commits into
Conversation
|
I would solve the conflicts now they are simple, in the next commit. |
CeliaFernandez
left a comment
There was a problem hiding this comment.
My comments to correct now
|
|
||
| process.options = cms.untracked.PSet(SkipEvent = cms.untracked.vstring('ProductNotFound')) | ||
| #process.options = cms.untracked.PSet(SkipEvent = cms.untracked.vstring('ProductNotFound')) | ||
| process.options = cms.untracked.PSet(TryToContinue = cms.untracked.vstring('ProductNotFound')) |
There was a problem hiding this comment.
Is this likely due to a change in the CMSSW version that is used? Maybe we would like to make this foward-backward compatible, did you check it still runs with 2023 for example?
There was a problem hiding this comment.
It was not forward or backward compatible, so I added a conditional statement to treat 2024 and 2025 differently
| if (opts.data): process.skimpath = cms.Path(process.countmu+process.countvtx+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMaker) | ||
| else: process.skimpath = cms.Path(process.gtStage2Digis+process.patTrigger+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMaker) | ||
| if '2024' in opts.era or '2025' in opts.era: | ||
| if (opts.data): process.skimpath = cms.Path(process.countmu+process.countvtx+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMakerVtx+process.hitMakerNoVtx) |
There was a problem hiding this comment.
Here I see a problem. In the way in which this is done it's an AND of Vtx and NoVtx muons, so I think in this case we are requiring the events to have both 2 Vtx and 2 NoVtx. We woule like an OR of both i.e. either 2 NoVtx or 2 Vtx
There was a problem hiding this comment.
To do this, you have to define two skimpaths instead of one here:
One should filter by process.countmu and the other by process.countvtx (btw these names are a bit confusing, I would do muVtx and muNoVtx, just for the process filters).
Then you define with them something like this:
process.skimpath_vtx = cms.Path(process.countvtx+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMakerVtx+process.hitMakerNoVtx)
process.skimpath_novtx = cms.Path(process.countmu+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMakerVtx+process.hitMakerNoVtx)
Then you filter the events based on both skims here:
https://github.com/JavierGarciadeCastro/run3_scouting/blob/847bd49ab36f05ccf190b4b5c8350107c732f424/batch/Scouting/NtupleMaker/test/producer_Run3.py#L111
something like this:
SelectEvents = cms.vstring('skimpath_vtx', 'skimpath_novtx')
| if (opts.data): | ||
| process.skimpath_vtx = cms.Path(process.countmuVtx+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMakerVtx+process.hitMakerNoVtx) | ||
| process.skimpath_novtx = cms.Path(process.countmuNoVtx+process.countvtxNoVtx+process.gtStage2Digis+process.triggerMaker+process.offlineBeamSpot+process.beamSpotMaker+process.MeasurementTrackerEvent+process.hitMakerVtx+process.hitMakerNoVtx) | ||
| process.out.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('skimpath_vtx', 'skimpath_novtx')) |
There was a problem hiding this comment.
Now I believe this should be working as expected, OR of the 2 paths, where we require NoVtx collection to have >= 2 muons and >=1 vertex and the Vtx collection to have >=2 muons
Implement the skimming of currently existing 2024 central samples. Added a txt file with the AODSIM sample names, modified batch/crabcfg_run3_centralmc.py, batch/Scouting/NtupleMaker/test/producer_Run3.py and batch/Scouting/NtupleMaker/plugins/TriggerMaker.cc for the skimming implementation.
This branch is NOT to be merged yet, it is just to show the current work