ATLAS Offline Software
Loading...
Searching...
No Matches
ZmumuEvent.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5//==================================================================================
6// Include files...
7//==================================================================================
8
9// This files header
11
12// Standard headers
13
14// Package Headers
16
17// ATLAS headers
19
20//#include "muonEvent/MuonParamDefs.h"
21
22#include "CLHEP/Random/RandFlat.h"
23
24#include "xAODMuon/Muon.h"
27
28#include "CLHEP/Units/SystemOfUnits.h"
29#include "CLHEP/Units/PhysicalConstants.h"
30using CLHEP::GeV;
31
32//==================================================================================
33// Public Methods
34//==================================================================================
35
78
79//==================================================================================
83
84//==================================================================================
86{
87 m_xMuonID.Init();
88
90}
91
92
93
94//==================================================================================
95const std::string ZmumuEvent::getRegion() const{
96
97 const double eta1 = std::abs(m_pxRecMuon[m_muon1]->eta());
98 const double eta2 = std::abs(m_pxRecMuon[m_muon2]->eta());
99
100 if ( eta1 < m_etaCut && eta2 < m_etaCut )
101 return "BB";
102
103 else if( (eta1 < m_etaCut && eta2 > m_etaCut) || (eta1 > m_etaCut && eta2 < m_etaCut) )
104 return "BE";
105
106 else return "EE";
107}
108
109
110//==================================================================================
111bool ZmumuEvent::Reco (int theLumiBlock)
112{
113 if (m_doDebug) { std::cout << " * ZmumuEvent * ZmumuEvent::Reco() starting " << std::endl; }
115
116 // Clear out the previous events record.
117 this->Clear();
118
119 // before getting into bsiness, check lumiblock is in requested range
121 // lumiblock range is requested
122 if ( theLumiBlock < m_minGoodLumiBlock) return false;
123 if ( theLumiBlock > m_maxGoodLumiBlock) return false;
124 }
126
127 // retrieve muons
129
130 // START patch by Anthony to avoid crash when MuonSpetrometer::Pt was not defined mainly for data16
131 // WARNING thus is necessary for data16 !!
132 if (false) {
133 for( auto muon : *pxMuonContainer ){
134 const xAOD::TrackParticle* idtrk(nullptr);
135 const xAOD::TrackParticle* metrk(nullptr);
136 idtrk = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
137 metrk = muon->trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
138 if (idtrk && metrk) {
139 static const SG::Decorator<float> InnerDetectorPtAcc("InnerDetectorPt");
140 static const SG::Decorator<float> MuonSpectrometerPtAcc("MuonSpectrometerPt");
141 InnerDetectorPtAcc(*muon) = idtrk->pt();
142 MuonSpectrometerPtAcc(*muon) = metrk->pt();
143 }
144 }
145 }
146 // END patch
147
148 if (pxMuonContainer != nullptr) {
149 if (m_doDebug) {std::cout << " * ZmumuEvent * track list has "<< pxMuonContainer->size() << " muon in xAOD::MuonContainer " << m_container <<std::endl; }
150 xAOD::MuonContainer::const_iterator xMuonItr = pxMuonContainer->begin();
151 xAOD::MuonContainer::const_iterator xMuonItrE = pxMuonContainer->end();
152
153 int attemptedMuonCount = 0;
154 int acceptedMuonCount = 0;
155
156 while ( xMuonItr != xMuonItrE ){ // this loops on the muons in the pxMuonContainer
157 const xAOD::Muon* pxCMuon = *xMuonItr;
158 attemptedMuonCount++;
160 if(m_doDebug){std::cout << " * ZmumuEvent * Reco() ** attempt on xMuonItr number "<< attemptedMuonCount << " (pointer: "<< *xMuonItr <<")" << std::endl; }
161 // Apply muon cuts
162 if ( m_xMuonID.passSelection( pxCMuon) ) {
163 if (RecordMuon( pxCMuon )) {
164 acceptedMuonCount++;
166 if (m_doDebug) {std::cout << " This muon is accepeted !! this is muon number " << acceptedMuonCount << " & full pass" << m_numberOfFullPassMuons << std::endl; }
167 }
168 }
169 ++xMuonItr;
170 } // end loop on muons
171 if (m_doDebug) {std::cout << " * ZmumuEvent * accepted " << acceptedMuonCount << " muons from the input list of "<< pxMuonContainer->size() <<std::endl; }
172
173 if (acceptedMuonCount < 2) m_eventsWithoutEnoughMuonsCount++;
174 if (acceptedMuonCount >= 2) m_eventsWithEnoughMuonsCount++;
175 } // muon container exist
176 else {
177 std::cout << " * ZmumuEvent * Can't retrieve combined muon collection (container: " << m_container <<") " << std::endl;
178 return false;
179 }
180
181 // Ordering of muons
182 this->OrderMuonList();
183
184 // Reconstruct the invariant mass ( based on mu-sys pt ).
186
189
191
192 if(m_doDebug) {
193 if ( m_passedSelectionCuts) std::cout << " * ZmumuEvent * Reco() * result of analyzed event " << m_analyzedEventCount << " --> Selected event :) " << std::endl;
194 if (!m_passedSelectionCuts) std::cout << " * ZmumuEvent * Reco() * result of analyzed event " << m_analyzedEventCount << " --> Rejected event :( " << std::endl;
195 }
196 if (m_doDebug) {
197 std::cout << " * ZmumuEvent::Reco * COMPLETED * Event has " << m_numberOfFullPassMuons
198 << " muons. " << m_acceptedEventCount
199 << " events accpeted out of " << m_analyzedEventCount
200 << " tested ";
201 if (m_passedSelectionCuts) std::cout << " This m= " << m_DiMuonPairInvMass;
202 std::cout << " * return " << m_passedSelectionCuts << std::endl;
203 }
205}
206
207
208//==================================================================================
209// Protected Methods
210//==================================================================================
214
215//==================================================================================
216// Private Methods
217//==================================================================================
219{
220 if(m_doDebug) {std::cout <<" * ZmumuEvent * Event selection ** START ** for type: " << eType << " m_NumberOfFullPassMuons: " << m_numberOfFullPassMuons << std::endl;}
221
222 // First require two muon-id's with cuts pre-applied.
223 if ( m_numberOfFullPassMuons < 2 ) {
224 if (m_doDebug) {std::cout <<" * ZmumuEvent * Failing number of good muons == 2 :( " << m_numberOfFullPassMuons << std::endl;}
225 return false;
226 }
228
229 // crosscheck all muons have been properly filled
230 bool allMuonsGood = true;
231 for (unsigned int muonid=0; muonid < m_numberOfFullPassMuons; muonid++) {
232 if (!m_pxMSTrack[muonid]) {
233 allMuonsGood = false;
234 }
235 }
236 if (!allMuonsGood){
237 return false;
238 }
240
241 if ( m_numberOfFullPassMuons > 2 ) {
242 if (m_doDebug) {std::cout <<" * ZmumuEvent * Failing number of good muons == 2 :( " << m_numberOfFullPassMuons << std::endl;}
243 return false;
244 }
246
247 // momentum of the muons
248 double leadingMuonPt, secondMuonPt;
249 switch ( eType )
250 {
251 case MS :
252 {
253 leadingMuonPt = m_pxMSTrack[m_muon1]->pt();
254 secondMuonPt = m_pxMSTrack[m_muon2]->pt();
255 break;
256 }
257 case ME:
258 {
259 leadingMuonPt = m_pxMETrack[m_muon1]->pt();
260 secondMuonPt = m_pxMETrack[m_muon2]->pt();
261 break;
262 }
263 case CB:
264 {
265 leadingMuonPt = m_pxRecMuon[m_muon1]->pt();
266 secondMuonPt = m_pxRecMuon[m_muon2]->pt();
267 break;
268 }
269 case ID:
270 {
271 leadingMuonPt = m_pxIDTrack[m_muon1]->pt();
272 secondMuonPt = m_pxIDTrack[m_muon2]->pt();
273 break;
274 }
275
276 default:
277 leadingMuonPt = m_pxRecMuon[m_muon1]->pt();
278 secondMuonPt = m_pxRecMuon[m_muon2]->pt();
279 }
280 // up to here the leading and second pt are not really in the right order.
281 // order the muon pt:
282 if (secondMuonPt > leadingMuonPt) {
283 double tempPt = leadingMuonPt;
284 leadingMuonPt = secondMuonPt;
285 secondMuonPt = tempPt;
286 }
287
288 // muon pt cut
289 // if ( !(leadingMuonPt > m_LeadingMuonPtCut*CLHEP::GeV && secondMuonPt > m_SecondMuonPtCut*CLHEP::GeV ) ) {
290 if ( leadingMuonPt < m_LeadingMuonPtCut*CLHEP::GeV ) {
291 if(m_doDebug){ std::cout <<" * ZmumuEvent * Failing 1st muon pt cut * Reco Pt: " << leadingMuonPt << " < " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl;}
292 return false;
293 }
295
296 if ( secondMuonPt < m_SecondMuonPtCut*CLHEP::GeV ) {
297 if(m_doDebug){ std::cout <<" * ZmumuEvent * Failing 2nd muon pt cut * Reco Pt: " << secondMuonPt << " < " << m_SecondMuonPtCut*CLHEP::GeV << std::endl;}
298 return false;
299 }
301
302 // Invariant mass window
303 if ( m_fInvariantMass[eType] < m_MassWindowLow ) {
304 if(m_doDebug) {std::cout <<" * ZmumuEvent * Failing mass window low cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowLow << std::endl;}
305 return false;
306 }
307 if ( m_fInvariantMass[eType] > m_MassWindowHigh ) {
308 if(m_doDebug) {std::cout <<" * ZmumuEvent * Failing mass window high cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowHigh << std::endl;}
309 return false;
310 }
312
313 // opening angle
314 if ( m_fMuonDispersion[eType] < m_OpeningAngleCut ) {
315 if(m_doDebug) {std::cout <<" * ZmumuEvent * Failing opening angle cut. Opening angle " << m_fMuonDispersion[eType] << " < " << m_OpeningAngleCut << std::endl;}
316 return false;
317 }
319
320 // opposite charge
321 if ( getZCharge(eType) != 0 ) {
322 if(m_doDebug) {
323 std::cout <<" * ZmumuEvent * Failing get ZCharge != 0 cut * Reco q1= " << m_pxRecMuon[m_muon1]->charge()*m_pxRecMuon[m_muon1]->pt() <<std::endl;
324 //<< " q2= " << m_pxRecMuon[m_muon2]->charge()*m_pxRecMuon[m_muon2]->pt() << std::endl; //This might not exist!
325 std::cout <<" * ID q1= " << m_pxIDTrack[m_muon1]->charge()*m_pxIDTrack[m_muon1]->pt() << std::endl;
326 // << " q2= " << m_pxIDTrack[m_muon2]->charge()*m_pxIDTrack[m_muon2]->pt() << std::endl; //This might not exist!
327 }
328 return false;
329 }
331
332 //
333 // both muons should come from the same vertex
334 // if the vertex information is used, that is already guaranteed, but if not, one has to check the z0
335 if (eType == ID) {
336 double z0_muon1 = m_pxIDTrack[m_muon1]->vz() + m_pxIDTrack[m_muon1]->z0();
337 double z0_muon2 = m_pxIDTrack[m_muon2]->vz() + m_pxIDTrack[m_muon2]->z0();
338 if(m_doDebug) {
339 std::cout << " * ZmumuEvent * z0_muon1= " << z0_muon1 << " z0_muon2= " << z0_muon2 << " delta= " << z0_muon1-z0_muon2 << std::endl;
340 }
341 if ( std::abs(z0_muon1 - z0_muon2) > m_Z0GapCut) {
342 if(m_doDebug) {
343 std::cout << " * ZmumuEvent * Failing common vertex cut. z.vtx1= " << m_pxIDTrack[m_muon1]->vz() << " z.vtx2= " << m_pxIDTrack[m_muon2]->vz() << std::endl;
344 std::cout << " * ZmumuEvent * Failing common vertex cut. IDTrk.z0_1= " << m_pxIDTrack[m_muon1]->z0() << " IDTrk.z0_2= " << m_pxIDTrack[m_muon2]->z0() << std::endl;
345 std::cout << " * ZmumuEvent * z0_muon1= " << z0_muon1 << " z0_muon2= " << z0_muon2 << " delta= " << z0_muon1-z0_muon2 << " > " << m_Z0GapCut << " (cut)" << std::endl;
346 }
347 return false;
348 }
349 }
350
351
352 if(m_doDebug) {
353 std::cout <<" * ZmumuEvent * Good muon pair: pt= " << leadingMuonPt/1000
354 << " & " << secondMuonPt/1000
355 << " GeV dimuon invariant mass = " << m_fInvariantMass[eType] << " GeV " << std::endl;
356 }
357 return true;
358}
359
360//==================================================================================
362{
364 m_passedSelectionCuts = false;
365 m_DiMuonPairInvMass = -1.; // flag as no reconstructed inv mass yet
366 m_muon1 = MUON1; // point to the first two
367 m_muon2 = MUON2;
368
369 for ( unsigned int u = 0; u < NUM_MUONS; ++u ) {
370 m_pxRecMuon[u] = nullptr;
371 m_pxMSTrack[u] = nullptr;
372 m_pxMETrack[u] = nullptr;
373 m_pxIDTrack[u] = nullptr;
374 }
375 for ( unsigned int v = 0; v < NUM_TYPES; ++v ) {
376 m_fZPt[v] = -999.9f;
377 m_fZEtaDir[v] = -999.9f;
378 m_fZPhiDir[v] = -999.9f;
379 m_fInvariantMass[v] = -999.9f;
380 m_fMuonDispersion[v] = -999.9f;
381 }
382 return;
383}
384
385//==================================================================================
387{
388 if(m_doDebug) { std::cout <<" * ZmumuEvent * RecordMuon * START ** muons recorded so far "<< m_numberOfFullPassMuons << " up to a maximum of " << NUM_MUONS << std::endl;}
389
390 // This shouldn't really ever happen but just in case.
391 if ( !pxMuon ) {
392 if(m_doDebug) { std::cout <<" * ZmumuEvent * RecordMuon * bad pxMuon --> EXIT "<< std::endl;}
393 return false;
394 }
395
397 // The main Muon
399 // Tracking Muon Spectrometer ( raw )
400 const xAOD::TrackParticle* pxMSTrack = pxMuon->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
401 if (!pxMSTrack) {
402 if(m_doDebug){ std::cout <<" * ZmumuEvent * RecordMuon * bad pxMSmuon --> EXIT "<< std::endl;}
403 return false;
404 }
406
407 // Tracking ID ( fix later to include loose match track conditions )
408 const xAOD::TrackParticle* pxIDTrack = pxMuon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
409 if (!pxIDTrack) {
410 return false;
411 }
413 //
414 if(m_doDebug){ std::cout <<" m_pxRecMuon[" << m_numberOfFullPassMuons <<"]"
415 << " pt= " << m_pxRecMuon[m_numberOfFullPassMuons]->pt() << " q= "<< m_pxRecMuon[m_numberOfFullPassMuons]->charge() << std::endl;}
416 if(m_doDebug){ std::cout <<" m_pxMSTrack[" << m_numberOfFullPassMuons <<"]"
417 <<" pt= " << m_pxMSTrack[m_numberOfFullPassMuons]->pt() << " q= " << m_pxMSTrack[m_numberOfFullPassMuons]->charge() << std::endl;}
418 if(m_doDebug){ std::cout <<" m_pxIDTrack[" << m_numberOfFullPassMuons <<"]"
419 <<" pt= " << m_pxIDTrack[m_numberOfFullPassMuons]->pt() << " q= " << m_pxIDTrack[m_numberOfFullPassMuons]->charge() << std::endl;}
420 // update count
422 }
423 if(m_doDebug){ std::cout <<" * ZmumuEvent * RecordMuon * return with a total of " << m_numberOfFullPassMuons << std::endl;}
424 return true;
425}
426
427
428//==================================================================================
454
455//==================================================================================
457{
458 // First determine what's positive
459 if ( m_numberOfFullPassMuons == 2 )
460 {
461 switch ( eType )
462 {
463 case MS :
464 {
466 }
467 case ME:
468 {
470 }
471 case CB:
472 {
474 }
475 case ID:
476 {
478 }
479 default:
480 return -999.0;
481 }
482 }
483 else
484 {
485 return -999.0;
486 }
487}
488
489//==================================================================================
491{
492 switch ( eType )
493 {
494 case MS :
495 {
496 return ( static_cast<int>( EvalCharge( m_pxMSTrack[m_muon1], m_pxMSTrack[m_muon2] ) ) );
497 }
498 case ME:
499 {
500 return ( static_cast<int>( EvalCharge( m_pxMETrack[m_muon1], m_pxMETrack[m_muon2] ) ) );
501 }
502 case CB:
503 {
504 return ( static_cast<int>( EvalCharge( m_pxRecMuon[m_muon1], m_pxRecMuon[m_muon2] ) ) );
505 }
506 case ID:
507 {
508 return ( static_cast<int>( EvalCharge( m_pxIDTrack[m_muon1], m_pxIDTrack[m_muon2] ) ) );
509 }
510 default:
511 return -999;
512 }
513}
514
515//==================================================================================
516unsigned int ZmumuEvent::getPosMuon( ZTYPE eType )
517{
518 if ( getNumberOfTaggedMuons() != 2 ) return 999;
519 if ( getZCharge(eType) != 0 ) return 999;
520
521 switch ( eType )
522 {
523 case MS :
524 {
525 if ( !m_pxMSTrack[m_muon1] || !m_pxMSTrack[m_muon2] ) return 999;
526 return ( static_cast<int>( m_pxMSTrack[m_muon1]->charge() ) == 1 ? m_muon1 : m_muon2 );
527 }
528 case ME:
529 {
530 if ( !m_pxMETrack[m_muon1] || !m_pxMETrack[m_muon2] ) return 999;
531 return ( static_cast<int>( m_pxMETrack[m_muon1]->charge() ) == 1 ? m_muon1 : m_muon2 );
532 }
533 case CB:
534 {
535 if ( !m_pxRecMuon[m_muon1] || !m_pxRecMuon[m_muon2] ) return 999;
536 return ( static_cast<int>( m_pxRecMuon[m_muon1]->charge() ) == 1 ? m_muon1 : m_muon2 );
537 }
538 case ID:
539 {
540 if ( !m_pxIDTrack[m_muon1] || !m_pxIDTrack[m_muon2] ) return 999;
541 return ( static_cast<int>( m_pxIDTrack[m_muon1]->charge() ) == 1 ? m_muon1 : m_muon2 );
542 }
543 default:
544 return 999;
545 }
546}
547
548//==================================================================================
549unsigned int ZmumuEvent::getNegMuon( ZTYPE eType )
550{
551 int uTmp = getPosMuon( eType );
552 if ( uTmp == 999 )
553 {
554 return 999;
555 }
556 else
557 {
558 return ( ( uTmp == m_muon1 ) ? m_muon2 : m_muon1 );
559 }
560}
561
562//==================================================================================
563const xAOD::TrackParticle* ZmumuEvent::getLooseIDTk( unsigned int /*uPart*/ )
564{
565 const xAOD::TrackParticleContainer* pxTrackContainer =
567
568 if ( pxTrackContainer )
569 {
570 xAOD::TrackParticleContainer::const_iterator xTrkItr = pxTrackContainer->begin();
571 xAOD::TrackParticleContainer::const_iterator xTrkItrE = pxTrackContainer->end();
572 while ( xTrkItr != xTrkItrE )
573 {
574 const xAOD::TrackParticle* pxTrack = *xTrkItr;
575 if ( !pxTrack ) continue;
576 const Trk::Track* pxTrkTrack = pxTrack->track();
577 if(!pxTrkTrack) continue;
578 const Trk::Perigee* pxPerigee = pxTrkTrack->perigeeParameters() ;
579 if ( !pxPerigee ) continue;
580 const float fTrkPhi = pxPerigee->parameters()[Trk::phi];
581 const float fTrkEta = pxPerigee->eta();
582
583 float fDPhi = std::abs( fTrkPhi - m_pxMETrack[m_muon1]->phi() );
584 float fDEta = std::abs( fTrkEta - m_pxMETrack[m_muon2]->eta() );
585 float fDR = sqrt( fDPhi*fDPhi + fDEta*fDEta );
586
587 if ( fDR < 0.3f )
588 {
589 return pxTrack;
590 }
591
592 ++xTrkItr;
593 }
594 }
595 // if ()
596 return nullptr;
597}
598
599//==================================================================================
601{
602 // first set the new pt cut value
603 m_LeadingMuonPtCut = newvalue;
604
605
606 // the second muon pt cut can not be higher than the leading muon pt cut:
608
609 // this has to be translated to the MuonSelector
610 // but there one has to use the minimum momentum --> second muon
611 //this->SetMuonPtCut(m_SecondMuonPtCut);
612 if(m_doDebug && false){std::cout <<" * ZmumuEvent * SetLeadingMuonPtCut * new Pt cuts: " << m_LeadingMuonPtCut << " & " << m_SecondMuonPtCut << " MuonSelector: " << m_xMuonID.GetPtCut() << std::endl;}
613 return;
614}
615
616//==================================================================================
617void ZmumuEvent::SetSecondMuonPtCut (double newvalue)
618{
619 m_SecondMuonPtCut = newvalue;
620
621 // second muon pt shouldn't be higher than the leading muon pt
623
624 // this has to be translated to the MuonSelector
626
627 if(m_doDebug && false){std::cout <<" * ZmumuEvent * SetSecondMuonPtCut * new Pt cuts: " << m_LeadingMuonPtCut << " & " << m_SecondMuonPtCut << " MuonSelector: " << m_xMuonID.GetPtCut() << std::endl;}
628
629 return;
630}
631
632//==================================================================================
634{
635 int muPlusId = -9;
636 int muMinusId = -9;
637 double muPlusPt = 0.;
638 double muMinusPt = 0.;
639
640 if (m_doDebug) {std::cout <<" * ZmumuEvent * OrderMuonList * START * input number of muons: " << m_numberOfFullPassMuons << std::endl;}
641
642 if (m_numberOfFullPassMuons >= 2) {
643 for (int imuon=0; imuon < (int) m_numberOfFullPassMuons; imuon++) {
644 if (m_pxRecMuon[imuon] != nullptr) {
645
646 if (m_pxRecMuon[imuon]->charge()== 1 && m_pxRecMuon[imuon]->pt()> muPlusPt) {
647 muPlusPt = m_pxRecMuon[imuon]->pt();
648 muPlusId = imuon;
649 }
650 if (m_pxRecMuon[imuon]->charge()==-1 && m_pxRecMuon[imuon]->pt()> muMinusPt) {
651 muMinusPt = m_pxRecMuon[imuon]->pt();
652 muMinusId = imuon;
653 }
654 } // muon exist
655 } // for (int imuon
656 } // if (m_numberOfFullPassMuons >= 2)
657 if (muPlusId>=0 && muMinusId>=0) {
658 m_muon1 = muPlusId;
659 m_muon2 = muMinusId;
660 m_numberOfFullPassMuons = 2; // the two muons have been selected. Let's pretend we have only two muons then.
661 }
662 if (m_doDebug) {std::cout <<" * ZmumuEvent * OrderMuonList * COMPLETED ** numberOfFullPassMuons: " << m_numberOfFullPassMuons
663 << " mu+: " << muPlusId << " mu-: " << muMinusId << std::endl;}
664 return;
665}
666
667
668//==================================================================================
670{
671 m_xMuonID.finalize();
672
673 std::cout << " ** ZmumuEvent ** -- STATS -- " << std::endl
674 << " Analyzed events : " << m_analyzedEventCount << std::endl
675 << " Events passing LumiBlock : " << m_eventselectioncount_goodlumiblock << std::endl
676 << " Tested muons : " << m_testedMuonCount << std::endl
677 << " Accepted muons : " << m_acceptedMuonCount << std::endl
678 << " Events without enough muon: " << m_eventsWithoutEnoughMuonsCount << std::endl
679 << " Events with enough muons : " << m_eventsWithEnoughMuonsCount << std::endl
680 << " pass few muons : " << m_eventselectioncount_toofewmuons << std::endl
681 << " pass not filled muons : " << m_eventselectioncount_notallmuonsfilled << std::endl
682 << " pass more than 2 muons : " << m_eventselectioncount_morethantwomuons << std::endl
683 << " pass pt lead : " << m_eventselectioncount_ptofleadingmuon << std::endl
684 << " pass pt 2nd : " << m_eventselectioncount_ptofsecondmuon << std::endl
685 << " pass mass window : " << m_eventselectioncount_masswindow << std::endl
686 << " pass opening angle : " << m_eventselectioncount_openingangle << std::endl
687 << " pass dimuon charge : " << m_eventselectioncount_dimuoncharge << std::endl
688 << " Accepted events : " << m_acceptedEventCount << std::endl
689 << std::endl;
690 return;
691}
692
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double charge(const T &p)
Definition AtlasPID.h:997
Helper class to provide type-safe access to aux data.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
static float EvaluateAngle(const T *pxP1, const T *pxP2)
static float EvalDiMuInvMass(const T *pxP1, const T *pxP2)
static float EvalCharge(const T *pxP1, const T *pxP2)
static float EvalPhi(const T *pxP1, const T *pxP2)
static float EvalPtDiff(const T *pxP1, const T *pxP2)
virtual void Init()
static float EvalPt(const T *pxP1, const T *pxP2)
static float EvalEta(const T *pxP1, const T *pxP2)
std::string m_xSampleName
static const T * getContainer(CONTAINERS eContainer)
Helper class to provide type-safe access to aux data.
Definition Decorator.h:59
double eta() const
Access method for pseudorapidity - from momentum.
const Perigee * perigeeParameters() const
return Perigee.
double m_LeadingMuonPtCut
Definition ZmumuEvent.h:129
bool m_doDebug
Definition ZmumuEvent.h:139
void OrderMuonList()
int m_analyzedEventCount
Definition ZmumuEvent.h:143
float getPtImbalance(ZTYPE eType)
double m_Z0GapCut
Definition ZmumuEvent.h:134
unsigned int m_testedMuonCount
Definition ZmumuEvent.h:147
unsigned int m_eventselectioncount_masswindow
Definition ZmumuEvent.h:154
bool m_skipMScheck
Definition ZmumuEvent.h:135
int getZCharge(ZTYPE eType)
virtual void Init()
unsigned int m_acceptedEventCount
Definition ZmumuEvent.h:146
bool m_SelectMuonByIP
Definition ZmumuEvent.h:181
float m_fZEtaDir[NUM_TYPES]
Definition ZmumuEvent.h:167
double m_etaCut
Definition ZmumuEvent.h:126
const xAOD::TrackParticle * m_pxMSTrack[NUM_MUONS]
Definition ZmumuEvent.h:162
bool m_SelectMuonByIso
Definition ZmumuEvent.h:180
unsigned int m_eventsWithEnoughMuonsCount
Definition ZmumuEvent.h:145
void ReconstructKinematics()
unsigned int m_eventselectioncount_toofewmuons
Definition ZmumuEvent.h:149
unsigned int m_eventselectioncount_goodlumiblock
Definition ZmumuEvent.h:157
int m_maxGoodLumiBlock
Definition ZmumuEvent.h:137
unsigned int m_eventselectioncount_ptofsecondmuon
Definition ZmumuEvent.h:153
float m_fZPhiDir[NUM_TYPES]
Definition ZmumuEvent.h:168
int m_minGoodLumiBlock
Definition ZmumuEvent.h:136
bool EventSelection(ZTYPE eType)
double m_MassWindowHigh
Definition ZmumuEvent.h:132
MuonSelector m_xMuonID
Definition ZmumuEvent.h:118
unsigned int m_eventsWithoutEnoughMuonsCount
Definition ZmumuEvent.h:144
unsigned int m_uTrackMatch
Definition ZmumuEvent.h:124
unsigned int m_eventselectioncount_notallmuonsfilled
Definition ZmumuEvent.h:150
unsigned int m_uMuonTags
Definition ZmumuEvent.h:123
float m_fZPt[NUM_TYPES]
Definition ZmumuEvent.h:166
unsigned int m_eventselectioncount_openingangle
Definition ZmumuEvent.h:155
const xAOD::TrackParticle * m_pxIDTrack[NUM_MUONS]
Definition ZmumuEvent.h:163
const xAOD::Muon * m_pxRecMuon[NUM_MUONS]
Definition ZmumuEvent.h:160
unsigned int getNumberOfTaggedMuons()
Definition ZmumuEvent.h:77
unsigned int getPosMuon(ZTYPE eType)
double m_SecondMuonPtCut
Definition ZmumuEvent.h:130
float m_fInvariantMass[NUM_TYPES]
Definition ZmumuEvent.h:169
float m_fMuonDispersion[NUM_TYPES]
Definition ZmumuEvent.h:170
unsigned int m_numberOfFullPassMuons
Definition ZmumuEvent.h:141
unsigned int m_acceptedMuonCount
Definition ZmumuEvent.h:148
double m_MassWindowLow
Definition ZmumuEvent.h:131
bool m_bLooseMatch
Definition ZmumuEvent.h:125
bool m_passedSelectionCuts
Definition ZmumuEvent.h:142
unsigned int m_eventselectioncount_morethantwomuons
Definition ZmumuEvent.h:151
void SetSecondMuonPtCut(double newvalue)
const std::string getRegion() const
double m_OpeningAngleCut
Definition ZmumuEvent.h:133
void finalize()
void SetLeadingMuonPtCut(double newvalue)
void SetMuonPtCut(double newvalue)
Definition ZmumuEvent.h:91
const xAOD::TrackParticle * m_pxMETrack[NUM_MUONS]
Definition ZmumuEvent.h:161
virtual ~ZmumuEvent()
unsigned int m_eventselectioncount_dimuoncharge
Definition ZmumuEvent.h:156
unsigned int m_eventselectioncount_ptofleadingmuon
Definition ZmumuEvent.h:152
virtual bool Reco(int theLumiBlock=0)
PerfMonServices::CONTAINERS m_container
Definition ZmumuEvent.h:119
bool RecordMuon(const xAOD::Muon *pxMuon)
unsigned int getNegMuon(ZTYPE eType)
double m_DiMuonPairInvMass
Definition ZmumuEvent.h:127
virtual void BookHistograms()
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be NULL) to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:482
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ phi
Definition ParamDefs.h:75
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".