ATLAS Offline Software
SiNoise_bt.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <cmath>
7 
9 // Noise production
10 // Di r = +1 along momentum , -1 opposite momentum
11 // Model = 1 - muon, 2 - electron
13 
14 void
16  m_model = 0 ;
17  m_covarianceAzim = 0.;
18  m_covariancePola = 0.;
19  m_covarianceIMom = 0.;
20  m_correctionIMom = 1.;
21  }
22 
23 
25 (int Dir,int Model,const Trk::TrackParameters& Tp)
26 {
27  reset();
28  if(Model < 1 || Model > 2) return;
29  m_model = Model;
30  double radlength = 0.03;
31  double energylose = 0.4;
32 
34  const AmgVector(5)& Vp = Tp.parameters();
35 
36  double q = std::abs(Vp[4]);
37  double cosp = std::cos(Vp[3]) ;
38  double sinp2 = (1.-cosp)*(1.+cosp) ;
39  if(sinp2==0) sinp2 = 0.000001;
40  double s =
41  std::abs(std::sqrt(sinp2)*(std::cos(Vp[2])*T(0,2)+std::sin(Vp[2]*T(1,2)))+cosp*T(2,2));
42  s < .05 ? s = 20. : s = 1./s;
43 
44  m_covariancePola = 134.*s*radlength*q*q;
46 
47  if(m_model==1) {
48  double dp = energylose*q*s;
49  m_covarianceIMom = .2*dp*dp*q*q;
50  m_correctionIMom = 1.-dp;
51  }
52  else {
53  m_correctionIMom = .5;
55  }
57 }
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDet::SiNoise_bt::reset
void reset()
Definition: SiNoise_bt.cxx:15
InDet::SiNoise_bt::m_covarianceIMom
double m_covarianceIMom
Definition: SiNoise_bt.h:38
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Epos_Base_Fragment.Model
Model
Definition: Epos_Base_Fragment.py:10
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::SiNoise_bt::m_correctionIMom
double m_correctionIMom
Definition: SiNoise_bt.h:39
SiNoise_bt.h
InDet::SiNoise_bt::m_covariancePola
double m_covariancePola
Definition: SiNoise_bt.h:37
InDet::SiNoise_bt::m_model
int m_model
Definition: SiNoise_bt.h:35
extractSporadic.q
list q
Definition: extractSporadic.py:98
InDet::SiNoise_bt::m_covarianceAzim
double m_covarianceAzim
Definition: SiNoise_bt.h:36
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDet::SiNoise_bt::production
void production(int direction, int model, const Trk::TrackParameters &tp)
Definition: SiNoise_bt.cxx:25
python.exampleDriverScript.Dir
Dir
Definition: exampleDriverScript.py:20
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.