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;
39 double dfcalc,phnext,bound;
40 float ptboun=theFmpConst->ptboun;
41 float step=theFmpConst->step;
50 theta = atan2(rfts,zfts);
53 cout<<
"FastMuPropagator::propagate::Start propagation in barrel::theta old, new "<<moment.
theta()<<
" "<<theta<<endl;
62 imax0=(int)((ptmax-ptboun)/
step)+1;
63 imin0=(int)((ptmin-ptboun)/
step)+1;
65 cout<<
"FastMuPropagator::Look ptboun,step,imin0,imax0="<<ptboun<<
" "<<step<<
66 " "<<imin0<<
" "<<imax0<<endl;
67 cout<<
"FastMuPropagator::Parameters (pt,theta,phi,ptmax,ptmin,bound)="<<pt<<
" "
68 <<theta<<
" "<<phi<<
" "<<ptmax<<
" "<<ptmin<<
" "<<bound<<endl;
77 cout<<
"FastMuPropagator::New parameters="<<theFmpConst->newparam[0]<<endl;
78 cout<<
"FastMuPropagator::New parameters for pt>40="<<
79 theFmpConst->newparamgt40[0]<<endl;
83 dfcalc=charge/(theFmpConst->newparam[0]+theFmpConst->newparam[1]*pt
84 +theFmpConst->newparam[2]*pt*pt);
86 dfcalc=charge/(theFmpConst->newparamgt40[0]+
87 theFmpConst->newparamgt40[1]*pt+theFmpConst->newparamgt40[2]*pt*pt);
92 if (
abs(dfcalc) > 0.6 ) dfcalc = charge*0.6;
95 if(phnext>=twopi) phnext=phnext-twopi;
96 if(phnext <0.) phnext=twopi+phnext;
98 cout<<
"FastMuPropagator::Phi in Muon Chamb="<<phi<<endl;
99 cout<<
"FastMuPropagator::Phnext determined="<<phnext<<
" dfcalc="<<dfcalc<<endl;
102 if(
abs(theta-
pi/2.)>0.00001){
103 z=bound/
tan(theta)+theFmpConst->zvert;
114 cout<<
"FastMuPropgator::Z coordinate="<<z<<
"bound="<<bound<<
"theta="<<theta<<
" "<<
115 abs(theta-
pi/2.)<<endl;
119 if(
abs(theta-
pi/2.)<0.00001){
125 double dfcalcmom=charge*theFmpConst->partrack*bound/pt;
129 cout<<
"phnextmom="<<phnext-dfcalcmom<<endl;
130 cout<<
"Cylinder aP="<<aP<<endl;
131 cout<<
"Before propagation="<<pt*
cos(phi)<<
" "<<pt*
sin(phi)<<
" "<<pl<<endl;
138 float awin,bwin,phbound;
142 phbound=theFmpConst->phiwinb[7];
144 iwin=(int)(pt/theFmpConst->ptstep);
145 awin=(theFmpConst->phiwinb[iwin+1]-theFmpConst->phiwinb[iwin])
146 /(theFmpConst->ptwmax[iwin]-theFmpConst->ptwmin[iwin]);
147 bwin=theFmpConst->phiwinb[iwin]-awin*theFmpConst->ptwmin[iwin];
148 phbound=awin*pt+bwin;
152 cout<<
"Size of window in phi="<<phbound<<
" "<<iwin<<endl;
153 cout<<theFmpConst->phiwinb[iwin+1]<<
" "<<theFmpConst->phiwinb[iwin]
154 <<
" "<<theFmpConst->ptwmin[iwin]<<
155 " "<<theFmpConst->ptwmax[iwin]<<
" awin="<<awin<<
" bwin="<<bwin<<endl;
157 m(0,0)=(ptmax-
ptmin)/6.;
m(1,1)=phbound/theFmpConst->sigf;
158 m(2,2)=theFmpConst->zwin/theFmpConst->sigz;
159 m(3,3)=phbound/(2.*theFmpConst->sigf);
m(4,4)=theFmpConst->zwin/(2.*theFmpConst->sigz);
174 const Plane& boundplane)
const
180 cout<<
"FastMuPropagator::propagate::Start propagation in forward::zvert "<<theFmpConst->zvert<<endl;
182 if(!checkfts(fts))
return badtsos;
188 double dfcalc,phnext;
190 float ptboun=theFmpConst->ptboun;
191 float step=theFmpConst->step;
201 theta = atan2(rfts,zfts);
204 cout<<
"FastMuPropagator::propagate::Start propagation in forward::theta old, new "<<moment.
theta()<<
" "<<theta<<endl;
211 plmin=ptmin/
tan(theta);
212 plmax=ptmax/
tan(theta);
213 imax0=(int)((ptmax-ptboun)/
step)+1;
214 imin0=(int)((ptmin-ptboun)/
step)+1;
216 cout<<
"FastMuPropagator::Look ptboun,step,imin0,imax0="<<ptboun<<
" "<<step<<
217 " "<<imin0<<
" "<<imax0<<endl;
218 cout<<
"FastMuPropagator::Parameters (pt,theta,phi,ptmax,ptmin)="<<pt<<
" "
219 <<theta<<
" "<<phi<<
" "<<ptmax<<
" "<<ptmin<<endl;
225 r=(z-theFmpConst->zvert)*
tan(theta);
230 dfcalc=theFmpConst->forwparam[0]+
231 charge*theFmpConst->forwparam[1]/
abs(pl);
233 if(phnext>=twopi) phnext=phnext-twopi;
234 if(phnext <0.) phnext=twopi+phnext;
236 cout<<
"FastMuPropagator::Phi in Muon Chamb="<<phi<<endl;
237 cout<<
"FastMuPropagator::Phnext determined="<<phnext<<
" dfcalc="<<dfcalc<<endl;
241 float awin,bwin,phbound;
245 phbound=theFmpConst->phiwinf[7];
247 iwin=(int)(pt/theFmpConst->ptstep);
248 awin=(theFmpConst->phiwinf[iwin+1]-theFmpConst->phiwinf[iwin])
249 /(theFmpConst->ptwmax[iwin]-theFmpConst->ptwmin[iwin]);
250 bwin=theFmpConst->phiwinf[iwin]-awin*theFmpConst->ptwmin[iwin];
251 phbound=awin*pt+bwin;
254 cout<<
"Forward::Size of window in phi="<<phbound<<endl;
256 m(0,0)=
abs(plmax-plmin)/6.;
m(1,1)=phbound/theFmpConst->sigf;
257 m(2,2)=theFmpConst->zwin/theFmpConst->sigz;
258 m(3,3)=phbound/(2.*theFmpConst->sigf);
m(4,4)=theFmpConst->zwin/(2.*theFmpConst->sigz);
263 double dfcalcmom=charge*theFmpConst->partrack*
abs(z)/
abs(pl);
266 cout<<
"dfcalcmom="<<charge<<
" "<<theFmpConst->partrack<<
" "<<z<<
" "<<pl<<
" "<<phnext<<endl;
267 cout<<
"phnextmom="<<phnext-dfcalcmom<<endl;
269 cout<<
"Plane aP="<<aP<<endl;
270 cout<<
"Before propagation="<<pt*
cos(phi)<<
" "<<pt*
sin(phi)<<
" "<<pl<<endl;
287 float mubarrelrad=theFmpConst->mubarrelrad;
288 float muforwardrad=theFmpConst->muforwardrad;
289 float muoffset=theFmpConst->muoffset;
290 mubarrelrad=350.; muforwardrad=400.;
292 cout<<
"checkfts::r,z="<<r<<
" "<<z<<
" "<<check<<endl;
294 if(r<mubarrelrad-muoffset&&
abs(z)<muforwardrad-muoffset){
297 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