@@ -84,6 +84,8 @@ struct kProbeKinematicMuonHistos {
8484struct kTagProbeMuonHistos {
8585 kProbeKinematicMuonHistos resonanceJ_numerator;
8686 kProbeKinematicMuonHistos resonanceJ_denominator;
87+ kProbeKinematicMuonHistos resonanceZ_numerator;
88+ kProbeKinematicMuonHistos resonanceZ_denominator;
8789};
8890
8991class ScoutingMuonTagProbeAnalyzer : public DQMGlobalEDAnalyzer <kTagProbeMuonHistos > {
@@ -207,6 +209,30 @@ void ScoutingMuonTagProbeAnalyzer::dqmAnalyze(edm::Event const& iEvent,
207209 }
208210 }
209211 }
212+ } else if ((75.0 < invMass && invMass < 107.0 )) {
213+ // Boolean added because hltScoutingMuonPackerVtx collection doesn't have vertices for the moment
214+ if (runWithoutVtx_) {
215+ Run3ScoutingVertex vertex;
216+ // If probe passes tag ID, add it to the numerator
217+ if (scoutingMuonID (sct_mu_second)) {
218+ fillHistograms_resonance (histos.resonanceZ_numerator , sct_mu_second, vertex, invMass, -99 .);
219+ }
220+ // Add all events to the denominator
221+ fillHistograms_resonance (histos.resonanceZ_denominator , sct_mu_second, vertex, invMass, -99 .);
222+ } else {
223+ if (vtxIndx_tag.empty () || vtxIndx_probe.empty ())
224+ continue ;
225+ for (const auto & commonIdx : vtxIndx_tag) {
226+ if (std::find (vtxIndx_probe.begin (), vtxIndx_probe.end (), commonIdx) != vtxIndx_probe.end ()) {
227+ const auto & vertex = (*sctVertex)[commonIdx];
228+ float lxy = sqrt (vertex.x () * vertex.x () + vertex.y () * vertex.y ());
229+ if (scoutingMuonID (sct_mu_second)) {
230+ fillHistograms_resonance (histos.resonanceZ_numerator , sct_mu_second, vertex, invMass, lxy);
231+ }
232+ fillHistograms_resonance (histos.resonanceZ_denominator , sct_mu_second, vertex, invMass, lxy);
233+ }
234+ }
235+ }
210236 }
211237 }
212238 foundTag = true ;
@@ -268,7 +294,6 @@ void ScoutingMuonTagProbeAnalyzer::fillHistograms_resonance(const kProbeKinemati
268294 histos.htrk_phiError ->Fill (mu.trk_phiError ());
269295 histos.htrk_dsz ->Fill (mu.trk_dsz ());
270296 histos.htrk_dszError ->Fill (mu.trk_dszError ());
271- histos.htrk_dsz ->Fill (mu.trk_dsz ());
272297 histos.htrk_vx ->Fill (mu.trk_vx ());
273298 histos.htrk_vy ->Fill (mu.trk_vy ());
274299 histos.htrk_vz ->Fill (mu.trk_vz ());
@@ -297,6 +322,8 @@ void ScoutingMuonTagProbeAnalyzer::bookHistograms(DQMStore::IBooker& ibook,
297322 ibook.setCurrentFolder (outputInternalPath_);
298323 bookHistograms_resonance (ibook, run, iSetup, histos.resonanceJ_numerator , " resonanceJ_numerator" );
299324 bookHistograms_resonance (ibook, run, iSetup, histos.resonanceJ_denominator , " resonanceJ_denominator" );
325+ bookHistograms_resonance (ibook, run, iSetup, histos.resonanceZ_numerator , " resonanceZ_numerator" );
326+ bookHistograms_resonance (ibook, run, iSetup, histos.resonanceZ_denominator , " resonanceZ_denominator" );
300327}
301328
302329// Set axes labels and range
@@ -311,7 +338,7 @@ void ScoutingMuonTagProbeAnalyzer::bookHistograms_resonance(DQMStore::IBooker& i
311338 histos.hEta = ibook.book1D (name + " _Probe_sctMuon_Eta" , name + " _Probe_sctMuon_Eta; Muon eta; Muons" , 60 , -5.0 , 5.0 );
312339 histos.hPhi = ibook.book1D (name + " _Probe_sctMuon_Phi" , name + " _Probe_sctMuon_Phi; Muon phi; Muons" , 60 , -3.3 , 3.3 );
313340 histos.hInvMass = ibook.book1D (
314- name + " _sctMuon_Invariant_Mass" , name + " _sctMuon_Invariant_Mass;Muon Inv mass (GeV); Muons" , 100 , 0 , 5 );
341+ name + " _sctMuon_Invariant_Mass" , name + " _sctMuon_Invariant_Mass;Muon Inv mass (GeV); Muons" , 100 , 0 , 100 );
315342 histos.hNormChisq = ibook.book1D (
316343 name + " _Probe_sctMuon_NormChisq" , name + " _Probe_sctMuon_NormChisq; Muon normChi2; Muons" , 60 , 0 , 5.0 );
317344 histos.hTrk_dxy =
0 commit comments