29 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxHel.hh"
30 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxHit.hh"
38 DcxHit::DcxHit(
float sx,
float sy,
float sz,
float wx,
float wy,
float wz,
39 float c0,
float cresol)
40 :_wx(wx),_wy(wy),_wz(wz),_c0(c0),_cresol(cresol)
44 if (_wz<0.0){_wx=-_wx;_wy=-_wy;_wz=-_wz;}
45 _s =
false;
if (_wz<0.9975)_s=
true;
47 double rad=
sqrt(sx*sx+sy*sy);
48 if ((20.0<rad)&&(rad<30.0))_layernumber=2;
49 if ((30.0<rad)&&(rad<38.0))_layernumber=4;
50 if ((58.0<rad)&&(rad<66.0))_layernumber=10;
51 if ((66.0<rad)&&(rad<74.0))_layernumber=12;
54 _x = sx-sz*_wx/_wz; _y = sy-sz*_wy/_wz;
57 double rad=
sqrt(_x*_x+_y*_y);
58 if ((20.0<rad)&&(rad<30.0))_layernumber=1;
59 if ((30.0<rad)&&(rad<38.0))_layernumber=3;
60 if ((38.0<rad)&&(rad<46.0))_layernumber=5;
61 if ((46.0<rad)&&(rad<58.0))_layernumber=7;
62 if ((58.0<rad)&&(rad<66.0))_layernumber=9;
63 if ((66.0<rad)&&(rad<74.0))_layernumber=11;
64 if ((74.0<rad)&&(rad<83.0))_layernumber=13;
65 if ((83.0<rad)&&(rad<92.0))_layernumber=15;
66 if ((92.0<rad)&&(rad<100.0))_layernumber=17;
67 if ((100.0<rad)&&(rad<120.0))_layernumber=19;
71 _superlayer=1+(_layernumber-1)/4;
75 double pw=atan2(_y,_x);
80 _x -= deltaz*_wx/_wz; _y -= deltaz*_wy/_wz;
81 _sp =
sin(_p); _cp =
cos(_p);
88 _xpos = _x - _d*_sp; _ypos = _y + _d*_cp;
89 _xneg = _x + _d*_sp; _yneg = _y - _d*_cp;
145 DcxHit::d(DcxHel &hel)
const
148 return d(hel.Doca_Zh(),hel.Doca_Tof(),hel.T0(),
149 hel.Doca_Wamb(),hel.Doca_Eang());
153 DcxHit::pull(DcxHel &hel)
const
158 return residual(hel)/
e();
162 DcxHit::residual(DcxHel &hel)
const
164 float doca=hel.Doca(*
this);
165 if(hel.Mode() == 0)doca=fabs(doca);
167 return d(hel.Doca_Zh(),hel.Doca_Tof(),hel.T0(),
168 hel.Doca_Wamb(),hel.Doca_Eang())-doca;
172 DcxHit::derivatives(DcxHel &hel)
const
174 std::vector<float> deriv=hel.derivatives(*
this);
175 float dtemp=d(hel.Doca_Zh(),hel.Doca_Tof(),hel.T0(),
176 hel.Doca_Wamb(),hel.Doca_Eang());
177 deriv[0]=dtemp-deriv[0];
179 float ewire=
e(dtemp);
180 for(
unsigned int i=0;
i<deriv.size();
i++) {deriv[
i]/=ewire;}
188 <<
" Layer # " << Layer()
189 <<
" SuperLayer # " << SuperLayer()
190 <<
" Wire # " << WireNo()
193 <<
" Drift time (ns) " <<
t();
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)