ATLAS Offline Software
MuonCalibExtendedTrackOverlap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIBEXTENDEDTRACKOVERLAP_H
6 #define MUONCALIBEXTENDEDTRACKOVERLAP_H
7 
8 namespace MuonCalib {
9 
13  TechnologyOverlap() = default;
14  unsigned int shared{0};
15  unsigned int first{0};
16  unsigned int second{0};
17  };
18 
19  unsigned int sharedMdtWrongSign{0};
27 
28  unsigned int sharedPrecisionHits() const { return mdt.shared + cscEta.shared; }
29  unsigned int sharedEtaTriggerHits() const { return rpcEta.shared + tgcEta.shared; }
30  unsigned int sharedPhiHits() const { return rpcPhi.shared + tgcPhi.shared + cscPhi.shared; }
31 
32  unsigned int firstPrecisionHits() const { return mdt.first + cscEta.first + sharedPrecisionHits(); }
33  unsigned int firstEtaTriggerHits() const { return rpcEta.first + tgcEta.first + sharedEtaTriggerHits(); }
34  unsigned int firstPhiHits() const { return rpcPhi.first + tgcPhi.first + cscPhi.first + sharedPhiHits(); }
35 
36  unsigned int secondPrecisionHits() const { return mdt.second + cscEta.second + sharedPrecisionHits(); }
37  unsigned int secondEtaTriggerHits() const { return rpcEta.second + tgcEta.second + sharedEtaTriggerHits(); }
38  unsigned int secondPhiHits() const { return rpcPhi.second + tgcPhi.second + cscPhi.second + sharedPhiHits(); }
39 
40  double overlapFracionPrecision() const;
41  double overlapFracionEtaTrigger() const;
42  double overlapFracionPhi() const;
43  };
44 
46  unsigned int shortest = std::min(firstPrecisionHits(), secondPrecisionHits());
47  if (shortest == 0) return 0;
48  return (double)sharedPrecisionHits() / (double)shortest;
49  }
50 
52  unsigned int shortest = std::min(firstEtaTriggerHits(), secondEtaTriggerHits());
53  if (shortest == 0) return 0;
54  return (double)sharedEtaTriggerHits() / (double)shortest;
55  }
56 
58  unsigned int shortest = std::min(firstPhiHits(), secondPhiHits());
59  if (shortest == 0) return 0;
60  return (double)sharedPhiHits() / (double)shortest;
61  }
62 
63 } // namespace MuonCalib
64 
65 #endif
MuonCalib::MuonCalibExtendedTrackOverlap::rpcEta
TechnologyOverlap rpcEta
Definition: MuonCalibExtendedTrackOverlap.h:21
MuonCalib::MuonCalibExtendedTrackOverlap::overlapFracionPrecision
double overlapFracionPrecision() const
Definition: MuonCalibExtendedTrackOverlap.h:45
MuonCalib::MuonCalibExtendedTrackOverlap::firstPhiHits
unsigned int firstPhiHits() const
Definition: MuonCalibExtendedTrackOverlap.h:34
MuonCalib::MuonCalibExtendedTrackOverlap::secondPhiHits
unsigned int secondPhiHits() const
Definition: MuonCalibExtendedTrackOverlap.h:38
MuonCalib::MuonCalibExtendedTrackOverlap::TechnologyOverlap::second
unsigned int second
Definition: MuonCalibExtendedTrackOverlap.h:16
MuonCalib::MuonCalibExtendedTrackOverlap::overlapFracionEtaTrigger
double overlapFracionEtaTrigger() const
Definition: MuonCalibExtendedTrackOverlap.h:51
MuonCalib::MuonCalibExtendedTrackOverlap::tgcEta
TechnologyOverlap tgcEta
Definition: MuonCalibExtendedTrackOverlap.h:23
MuonCalib::MuonCalibExtendedTrackOverlap::mdt
TechnologyOverlap mdt
Definition: MuonCalibExtendedTrackOverlap.h:20
MuonCalib::MuonCalibExtendedTrackOverlap::TechnologyOverlap::TechnologyOverlap
TechnologyOverlap()=default
MuonCalib::MuonCalibExtendedTrackOverlap
Definition: MuonCalibExtendedTrackOverlap.h:10
MuonCalib::MuonCalibExtendedTrackOverlap::firstPrecisionHits
unsigned int firstPrecisionHits() const
Definition: MuonCalibExtendedTrackOverlap.h:32
MuonCalib::MuonCalibExtendedTrackOverlap::sharedEtaTriggerHits
unsigned int sharedEtaTriggerHits() const
Definition: MuonCalibExtendedTrackOverlap.h:29
MuonCalib::MuonCalibExtendedTrackOverlap::rpcPhi
TechnologyOverlap rpcPhi
Definition: MuonCalibExtendedTrackOverlap.h:22
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibExtendedTrackOverlap::overlapFracionPhi
double overlapFracionPhi() const
Definition: MuonCalibExtendedTrackOverlap.h:57
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonCalib::MuonCalibExtendedTrackOverlap::tgcPhi
TechnologyOverlap tgcPhi
Definition: MuonCalibExtendedTrackOverlap.h:24
MuonCalib::MuonCalibExtendedTrackOverlap::secondEtaTriggerHits
unsigned int secondEtaTriggerHits() const
Definition: MuonCalibExtendedTrackOverlap.h:37
MuonCalib::MuonCalibExtendedTrackOverlap::sharedPrecisionHits
unsigned int sharedPrecisionHits() const
Definition: MuonCalibExtendedTrackOverlap.h:28
MuonCalib::MuonCalibExtendedTrackOverlap::firstEtaTriggerHits
unsigned int firstEtaTriggerHits() const
Definition: MuonCalibExtendedTrackOverlap.h:33
MuonCalib::MuonCalibExtendedTrackOverlap::cscPhi
TechnologyOverlap cscPhi
Definition: MuonCalibExtendedTrackOverlap.h:26
MuonCalib::MuonCalibExtendedTrackOverlap::TechnologyOverlap::shared
unsigned int shared
Definition: MuonCalibExtendedTrackOverlap.h:14
MuonCalib::MuonCalibExtendedTrackOverlap::TechnologyOverlap::first
unsigned int first
Definition: MuonCalibExtendedTrackOverlap.h:15
MuonCalib::MuonCalibExtendedTrackOverlap::MuonCalibExtendedTrackOverlap
MuonCalibExtendedTrackOverlap()=default
MuonCalib::MuonCalibExtendedTrackOverlap::sharedPhiHits
unsigned int sharedPhiHits() const
Definition: MuonCalibExtendedTrackOverlap.h:30
MuonCalib::MuonCalibExtendedTrackOverlap::sharedMdtWrongSign
unsigned int sharedMdtWrongSign
Definition: MuonCalibExtendedTrackOverlap.h:19
MuonCalib::MuonCalibExtendedTrackOverlap::cscEta
TechnologyOverlap cscEta
Definition: MuonCalibExtendedTrackOverlap.h:25
MuonCalib::MuonCalibExtendedTrackOverlap::secondPrecisionHits
unsigned int secondPrecisionHits() const
Definition: MuonCalibExtendedTrackOverlap.h:36
MuonCalib::MuonCalibExtendedTrackOverlap::TechnologyOverlap
Definition: MuonCalibExtendedTrackOverlap.h:12