@@ -83,7 +83,7 @@ struct DqJPsiMuonCorrelations {
8383
8484 // Configurables for the dilepton and associated muon cuts
8585 Configurable<float > fConfigDileptonPtMin {" cfgDileptonPtMin" , 1.0 , " Minimum pT cut for the associated muons" };
86- Configurable<float > fConfigDileptonPtMax {" cfgDileptonPtMax" , 10 .0 , " Maximum pT cut for the associated muons" };
86+ Configurable<float > fConfigDileptonPtMax {" cfgDileptonPtMax" , 20 .0 , " Maximum pT cut for the associated muons" };
8787 Configurable<float > fConfigDileptonEtaMin {" cfgDileptonEtaMin" , -4.0 , " Minimum eta cut for the dileptons" };
8888 Configurable<float > fConfigDileptonEtaMax {" cfgDileptonEtaMax" , -2.5 , " Maximum eta cut for the dileptons" };
8989 Configurable<float > fConfigMuonEtaMin {" cfgMuonEtaMin" , -4.0 , " Minimum eta cut for the associated muons" };
@@ -123,26 +123,34 @@ struct DqJPsiMuonCorrelations {
123123 ccdb->setCaching (true );
124124 ccdb->setCreatedNotAfter (nolaterthan.value );
125125
126+ // Assert correct size of the efficiency correction vector
127+ if (axisPt.value .size ()-2 != fConfigBinEff .value .size ()) {
128+ LOGF (fatal, " Configurables axisPt: %zu must have one more value than fConfigBinEff: %zu (excluding 'VARIABLE_WIDTH' entry)" ,
129+ axisPt.value .size ()-1 , fConfigBinEff .value .size ());
130+ }
131+
132+ // Set up varmanager variable names
126133 fValuesDilepton = new float [VarManager::kNVars ];
127134 fValuesMuon = new float [VarManager::kNVars ];
128135 VarManager::SetDefaultVarNames ();
129136
137+ // Define trigger histograms
138+ ConfigurableAxis axisTriggerMass{" axisTriggerMass" , {VARIABLE_WIDTH , fConfigBackgroundLowMass , fConfigDileptonLowMass , fConfigDileptonHighMass , fConfigBackgroundHighMass }, " Invariant Mass (GeV/c^{2}) for trigger counting" };
130139 registry.add (" h2dDimuonPtInvVsInvMass" , " h2dDimuonPtInvVsInvMass" , kTH2D , {axisInvMass, axisPt});
140+ registry.add (" h2dTriggersPtInvVsInvMassRegion" , " h2dTriggersPtInvVsInvMassRegion" , kTH2D , {axisTriggerMass, axisPt});
141+
142+ // Define histograms for the dilepton-muon correlations
131143 registry.add (" h2dDimuonMuonDeltaEtaVsMuonPtSignal" , " h2dDimuonMuonDeltaEtaVsMuonPtSignal" , kTH2D , {axisDeltaEta, axisPt});
132144 registry.add (" h2dDimuonMuonDeltaPhiVsMuonPtSignal" , " h2dDimuonMuonDeltaPhiVsMuonPtSignal" , kTH2D , {axisDeltaPhi, axisPt});
133145 registry.add (" h2dDimuonMuonDeltaEtaVsMuonPtBackground" , " h2dDimuonMuonDeltaEtaVsMuonPtBackground" , kTH2D , {axisDeltaEta, axisPt});
134146 registry.add (" h2dDimuonMuonDeltaPhiVsMuonPtBackground" , " h2dDimuonMuonDeltaPhiVsMuonPtBackground" , kTH2D , {axisDeltaPhi, axisPt});
135-
136- if (axisPt.value .size ()-2 != fConfigBinEff .value .size ()) {
137- LOGF (fatal, " Configurables axisPt: %zu must have one more value than fConfigBinEff: %zu (excluding 'VARIABLE_WIDTH' entry)" ,
138- axisPt.value .size ()-1 , fConfigBinEff .value .size ());
139- }
140147 }
141148
142149 // Template function to run pair - muon combinations
143150 template <int TCandidateType, uint32_t TEventFillMap, uint32_t TMuonFillMap, typename TEvent, typename TMuonAssocs, typename TMuonTracks, typename TDileptons>
144151 void runDileptonMuon (TEvent const & event, TMuonAssocs const & assocs, TMuonTracks const & /* tracks*/ , TDileptons const & dileptons)
145152 {
153+ // Reset the VarManager values at the beginning of each event
146154 VarManager::ResetValues (0 , VarManager::kNVars , fValuesMuon );
147155 VarManager::ResetValues (0 , VarManager::kNVars , fValuesDilepton );
148156 VarManager::FillEvent<TEventFillMap>(event, fValuesMuon );
@@ -162,7 +170,9 @@ struct DqJPsiMuonCorrelations {
162170 continue ;
163171 }
164172
173+ // Fill invariant mass vs pT histogram for the dileptons and for trigger counting
165174 registry.fill (HIST (" h2dDimuonPtInvVsInvMass" ), dilepton.mass (), dilepton.pt ());
175+ registry.fill (HIST (" h2dTriggersPtInvVsInvMassRegion" ), dilepton.mass (), dilepton.pt ());
166176
167177 for (auto & assoc : assocs) {
168178 // Check selection bit
@@ -202,8 +212,6 @@ struct DqJPsiMuonCorrelations {
202212 registry.fill (HIST (" h2dDimuonMuonDeltaPhiVsMuonPtBackground" ), deltaPhi, track.pt ());
203213 }
204214 }
205-
206- // TODO: Implement trigger counting
207215 }
208216 }
209217 }
0 commit comments