Skip to content

2024 skimming and looper implementation (in progress)#30

Open
JavierGarciadeCastro wants to merge 17 commits into
cmstas:masterfrom
JavierGarciadeCastro:fullRun3
Open

2024 skimming and looper implementation (in progress)#30
JavierGarciadeCastro wants to merge 17 commits into
cmstas:masterfrom
JavierGarciadeCastro:fullRun3

Conversation

@JavierGarciadeCastro
Copy link
Copy Markdown
Contributor

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

@CeliaFernandez
Copy link
Copy Markdown
Contributor

I would solve the conflicts now they are simple, in the next commit.
Something we should do in the looper is to fit the Vtx Muons (as you do in the analyzer you deployed) and mirror the SV and muon arbitration for Vtx muons.

Copy link
Copy Markdown
Contributor

@CeliaFernandez CeliaFernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To do this, you have to define two skimpaths instead of one here:

https://github.com/JavierGarciadeCastro/run3_scouting/blob/847bd49ab36f05ccf190b4b5c8350107c732f424/batch/Scouting/NtupleMaker/test/producer_Run3.py#L317

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'))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants