2 #include "CLHEP/Units/GlobalPhysicalConstants.h"
3 #include "CLHEP/Vector/ThreeVector.h"
4 #include <CLHEP/Vector/LorentzVector.h>
27 if(!checkfts(fts))
return badtsos;
30 cout<<
"FastMuPropagator::propagate::Start propagation in barrel::zvert "<<theFmpConst->zvert<<endl;
38 double dfcalc,phnext,bound;
39 float ptboun=theFmpConst->ptboun;
40 float step=theFmpConst->step;
45 theta0=moment.
theta();
49 theta = atan2(rfts,zfts);
52 cout<<
"FastMuPropagator::propagate::Start propagation in barrel::theta old, new "<<theta0<<
" "<<theta<<endl;
61 imax0=(int)((ptmax-ptboun)/
step)+1;
62 imin0=(int)((ptmin-ptboun)/
step)+1;
64 cout<<
"FastMuPropagator::Look ptboun,step,imin0,imax0="<<ptboun<<
" "<<step<<
65 " "<<imin0<<
" "<<imax0<<endl;
66 cout<<
"FastMuPropagator::Parameters (pt,theta,phi,ptmax,ptmin,bound)="<<pt<<
" "
67 <<theta<<
" "<<phi<<
" "<<ptmax<<
" "<<ptmin<<
" "<<bound<<endl;
76 cout<<
"FastMuPropagator::New parameters="<<theFmpConst->newparam[0]<<endl;
77 cout<<
"FastMuPropagator::New parameters for pt>40="<<
78 theFmpConst->newparamgt40[0]<<endl;
82 dfcalc=charge/(theFmpConst->newparam[0]+theFmpConst->newparam[1]*pt
83 +theFmpConst->newparam[2]*pt*
pt);
85 dfcalc=charge/(theFmpConst->newparamgt40[0]+
86 theFmpConst->newparamgt40[1]*pt+theFmpConst->newparamgt40[2]*pt*
pt);
91 if (
abs(dfcalc) > 0.6 ) dfcalc = charge*0.6;
94 if(phnext>=twopi) phnext=phnext-twopi;
95 if(phnext <0.) phnext=twopi+phnext;
97 cout<<
"FastMuPropagator::Phi in Muon Chamb="<<phi<<endl;
98 cout<<
"FastMuPropagator::Phnext determined="<<phnext<<
" dfcalc="<<dfcalc<<endl;
101 if(
abs(theta-
pi/2.)>0.00001){
102 z=bound/
tan(theta)+theFmpConst->zvert;
113 cout<<
"FastMuPropgator::Z coordinate="<<z<<
"bound="<<bound<<
"theta="<<theta<<
" "<<
114 abs(theta-
pi/2.)<<endl;
118 if(
abs(theta-
pi/2.)<0.00001){
124 double dfcalcmom=charge*theFmpConst->partrack*bound/
pt;
128 cout<<
"phnextmom="<<phnext-dfcalcmom<<endl;
129 cout<<
"Cylinder aP="<<aP<<endl;
130 cout<<
"Before propagation="<<pt*
cos(phi)<<
" "<<pt*
sin(phi)<<
" "<<pl<<endl;
137 float awin,bwin,phbound;
141 phbound=theFmpConst->phiwinb[7];
143 iwin=(int)(pt/theFmpConst->ptstep);
144 awin=(theFmpConst->phiwinb[iwin+1]-theFmpConst->phiwinb[iwin])
145 /(theFmpConst->ptwmax[iwin]-theFmpConst->ptwmin[iwin]);
146 bwin=theFmpConst->phiwinb[iwin]-awin*theFmpConst->ptwmin[iwin];
147 phbound=awin*pt+bwin;
151 cout<<
"Size of window in phi="<<phbound<<
" "<<iwin<<endl;
152 cout<<theFmpConst->phiwinb[iwin+1]<<
" "<<theFmpConst->phiwinb[iwin]
153 <<
" "<<theFmpConst->ptwmin[iwin]<<
154 " "<<theFmpConst->ptwmax[iwin]<<
" awin="<<awin<<
" bwin="<<bwin<<endl;
156 m(0,0)=(ptmax-
ptmin)/6.;
m(1,1)=phbound/theFmpConst->sigf;
157 m(2,2)=theFmpConst->zwin/theFmpConst->sigz;
158 m(3,3)=phbound/(2.*theFmpConst->sigf);
m(4,4)=theFmpConst->zwin/(2.*theFmpConst->sigz);
173 const Plane& boundplane)
const
179 cout<<
"FastMuPropagator::propagate::Start propagation in forward::zvert "<<theFmpConst->zvert<<endl;
181 if(!checkfts(fts))
return badtsos;
186 double ptmax,
ptmin,
pt,
phi,
theta,theta0,
z,
r,pl,plmin,plmax;
187 double dfcalc,phnext;
189 float ptboun=theFmpConst->ptboun;
190 float step=theFmpConst->step;
196 theta0=moment.
theta();
200 theta = atan2(rfts,zfts);
203 cout<<
"FastMuPropagator::propagate::Start propagation in forward::theta old, new "<<theta0<<
" "<<theta<<endl;
210 plmin=ptmin/
tan(theta);
211 plmax=ptmax/
tan(theta);
212 imax0=(int)((ptmax-ptboun)/
step)+1;
213 imin0=(int)((ptmin-ptboun)/
step)+1;
215 cout<<
"FastMuPropagator::Look ptboun,step,imin0,imax0="<<ptboun<<
" "<<step<<
216 " "<<imin0<<
" "<<imax0<<endl;
217 cout<<
"FastMuPropagator::Parameters (pt,theta,phi,ptmax,ptmin)="<<pt<<
" "
218 <<theta<<
" "<<phi<<
" "<<ptmax<<
" "<<ptmin<<endl;
224 r=(z-theFmpConst->zvert)*
tan(theta);
229 dfcalc=theFmpConst->forwparam[0]+
230 charge*theFmpConst->forwparam[1]/
abs(pl);
232 if(phnext>=twopi) phnext=phnext-twopi;
233 if(phnext <0.) phnext=twopi+phnext;
235 cout<<
"FastMuPropagator::Phi in Muon Chamb="<<phi<<endl;
236 cout<<
"FastMuPropagator::Phnext determined="<<phnext<<
" dfcalc="<<dfcalc<<endl;
240 float awin,bwin,phbound;
244 phbound=theFmpConst->phiwinf[7];
246 iwin=(int)(pt/theFmpConst->ptstep);
247 awin=(theFmpConst->phiwinf[iwin+1]-theFmpConst->phiwinf[iwin])
248 /(theFmpConst->ptwmax[iwin]-theFmpConst->ptwmin[iwin]);
249 bwin=theFmpConst->phiwinf[iwin]-awin*theFmpConst->ptwmin[iwin];
250 phbound=awin*pt+bwin;
253 cout<<
"Forward::Size of window in phi="<<phbound<<endl;
255 m(0,0)=
abs(plmax-plmin)/6.;
m(1,1)=phbound/theFmpConst->sigf;
256 m(2,2)=theFmpConst->zwin/theFmpConst->sigz;
257 m(3,3)=phbound/(2.*theFmpConst->sigf);
m(4,4)=theFmpConst->zwin/(2.*theFmpConst->sigz);
262 double dfcalcmom=charge*theFmpConst->partrack*
abs(z)/
abs(pl);
265 cout<<
"dfcalcmom="<<charge<<
" "<<theFmpConst->partrack<<
" "<<z<<
" "<<pl<<
" "<<phnext<<endl;
266 cout<<
"phnextmom="<<phnext-dfcalcmom<<endl;
268 cout<<
"Plane aP="<<aP<<endl;
269 cout<<
"Before propagation="<<pt*
cos(phi)<<
" "<<pt*
sin(phi)<<
" "<<pl<<endl;
286 float mubarrelrad=theFmpConst->mubarrelrad;
287 float muforwardrad=theFmpConst->muforwardrad;
288 float muoffset=theFmpConst->muoffset;
289 mubarrelrad=350.; muforwardrad=400.;
291 cout<<
"checkfts::r,z="<<r<<
" "<<z<<
" "<<check<<endl;
293 if(r<mubarrelrad-muoffset&&
abs(z)<muforwardrad-muoffset){
296 cout<<
"checkfts::false="<<check<<endl;
const GlobalTrajectoryParameters & parameters() const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Geom::Theta< T > theta() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Theta< T > theta() const
Scalar radius() const
Radius of the cylinder.
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
GlobalVector momentum() const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
GlobalPoint position() const
const AlgebraicSymMatrix55 & matrix() const
TrackCharge charge() const
const PositionType & position() const