ATLAS Offline Software
InDetTrtDriftCircleCutTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9 {
10  // Read key
12 
13  return StatusCode::SUCCESS;
14 }
15 
16 InDet::InDetTrtDriftCircleCutTool::InDetTrtDriftCircleCutTool(const std::string& t, const std::string& n, const IInterface* p)
17  :AthAlgTool(t,n,p)
18 {
19  declareInterface<ITrtDriftCircleCutTool>(this);
20 }
21 
23 = default;
24 
26  if(!m_param){
27  const double TrtEtaBin[6] = {0., 0.65, 0.85, 1.25, 1.80, 2.10};
28  const double TrtA [5] = { 29., 31., 20., 36., 34. };
29  const double TrtB [5] = { 2./0.65, -11./0.20, 16./0.40, -2./0.55, -24./0.3};
30 
31  double eta= fabs(trkp->momentum().eta());
32 
33  for(int i=0; i!=5; ++i) {
34  if(eta <= TrtEtaBin[i+1]) {
35  return int(TrtA[i]+TrtB[i]*(eta-TrtEtaBin[i])-m_minOffset);
36  }
37  }
38  return int(m_minOffset);
39  } else {
40  const double TrtEtaBin[7] = {0., 0.1, 0.6255, 1.07, 1.304, 1.752, 2.0 };
41  const double TrtA [6] = { 33.28, 30.40, 182.38, -226.18, -351.56, -250.2 };
42  const double TrtB [6] = { -79.4, 18.79, -371.9, 495.12, 777.5, 377.9 };
43  const double TrtC [6] = { 589.7, -42.73, 213.3, -314.96 , -512.3, -128.7 };
44  const double TrtD [6] = { 0., 32.53, 0. , 69.42 , 111.0, 3.4 };
45  const double TrtO [6] = { 9., 11., 10., 7., 9., 12. };
46 
47  double eta = fabs(trkp->momentum().eta());
48 
50  const TRTCond::ActiveFraction* actF{*strawReadHandle};
51 
52  for(int i=0; i!=6; ++i) {
53  if(eta <= TrtEtaBin[i+1]) {
54  double diff = eta;
55  double nDiffTRT = TrtA[i]+TrtB[i]*diff+TrtC[i]*diff*diff+TrtD[i]*diff*diff*diff-TrtO[i];
56  double activeF = 1.;
57  float phi = trkp->momentum().phi();
58  float eta = trkp->momentum().eta();
59  if(m_useTRT) activeF = actF->getActiveFraction(eta,phi);
60  nDiffTRT = nDiffTRT*activeF;
61  if (nDiffTRT>=1) return int(nDiffTRT);
62  else return int(m_minOffset);
63  }
64  }
65  return int(m_minOffset);
66  }
67 }
InDet::InDetTrtDriftCircleCutTool::minNumberDCs
virtual int minNumberDCs(const Trk::TrackParameters *) const override
Minimum number of drift circles using the track scoring tool.
Definition: InDetTrtDriftCircleCutTool.cxx:25
InDet::InDetTrtDriftCircleCutTool::~InDetTrtDriftCircleCutTool
virtual ~InDetTrtDriftCircleCutTool()
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
InDet::InDetTrtDriftCircleCutTool::initialize
virtual StatusCode initialize() override
Definition: InDetTrtDriftCircleCutTool.cxx:8
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ReadCondHandle.h
InDet::InDetTrtDriftCircleCutTool::m_param
BooleanProperty m_param
Definition: InDetTrtDriftCircleCutTool.h:46
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDet::InDetTrtDriftCircleCutTool::InDetTrtDriftCircleCutTool
InDetTrtDriftCircleCutTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: InDetTrtDriftCircleCutTool.cxx:16
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::ParametersBase
Definition: ParametersBase.h:55
InDetTrtDriftCircleCutTool.h
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
InDet::InDetTrtDriftCircleCutTool::m_strawReadKey
SG::ReadCondHandleKey< TRTCond::ActiveFraction > m_strawReadKey
Definition: InDetTrtDriftCircleCutTool.h:41
InDet::InDetTrtDriftCircleCutTool::m_minOffset
IntegerProperty m_minOffset
Properties for track selection:all cuts are ANDed.
Definition: InDetTrtDriftCircleCutTool.h:44
InDet::InDetTrtDriftCircleCutTool::m_useTRT
BooleanProperty m_useTRT
Definition: InDetTrtDriftCircleCutTool.h:49
AthAlgTool
Definition: AthAlgTool.h:26
TRTCond::ActiveFraction
Definition: ActiveFraction.h:15