33 double ptot[4]={0.,0.,0.,0.};
36 std::vector< std::array<double, 4> > pp(NTRK);
37 for( it=0; it<NTRK; it++){
47 double Pt= sqrt(ptot[0]*ptot[0] + ptot[1]*ptot[1]) ;
48 double mom= sqrt(ptot[2]*ptot[2] + Pt*Pt) ;
49 double phi=atan2(ptot[1],ptot[0]);
50 double theta=acos( ptot[2]/mom );
53 double invR = magConst / Pt;
if(Charge) invR *= Charge;
60 double sinp = sin(
phi);
61 double cosp = cos(
phi);
62 double cott = 1./tan(
theta);
65 double dPhiDpx = -Py/Pt/Pt;
66 double dPhiDpy = Px/Pt/Pt;
68 double dThetaDpx = Px*Pz/(Pt*mom*mom);
69 double dThetaDpy = Py*Pz/(Pt*mom*mom);
70 double dThetaDpz = -Pt/(mom*mom);
71 double dRDpx = Px/(Pt*magConst);
72 double dRDpy = Py/(Pt*magConst);
74 if(Charge){dRDpx /=Charge; dRDpy /=Charge;}
79 double dA0dPhi,dZdPhi,dZdTheta,dA0dR;
90 for( it=0; it<NTRK; it++){
91 double invRi = vk->
TrackList[it]->cnstP[2];
92 base_cnst->
f0t[it][0].X = 0.;
93 base_cnst->
f0t[it][0].Y = dA0dPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
94 base_cnst->
f0t[it][0].Z = dA0dPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi ;
96 base_cnst->
h0t[0].X = sinp;
97 base_cnst->
h0t[0].Y = -cosp;
98 base_cnst->
h0t[0].Z = 0.;
104 for( it=0; it<NTRK; it++){
105 double invRi = vk->
TrackList[it]->cnstP[2];
106 double p2i = pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]+pp[it][2]*pp[it][2];
107 double pti = sqrt(pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]);
108 base_cnst->
f0t[it][1].X = 0.;
109 base_cnst->
f0t[it][1].Y = dZdPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
110 base_cnst->
f0t[it][1].Z = dZdPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi;
111 base_cnst->
f0t[it][1].X += dZdTheta * ( dThetaDpz*(-p2i/pti));
112 base_cnst->
f0t[it][1].Y += dZdTheta * (dThetaDpx*(-pp[it][1]) + dThetaDpy*( pp[it][0]) + 0.);
113 base_cnst->
f0t[it][1].Z += dZdTheta * (dThetaDpx*(-pp[it][0]) + dThetaDpy*(-pp[it][1]) + dThetaDpz*(-pp[it][2]))/invRi;
115 base_cnst->
h0t[1].X = -cosp*cott;
116 base_cnst->
h0t[1].Y = -sinp*cott;
117 base_cnst->
h0t[1].Z = 1.;
126 double xc = -R*sinp + curV[0];
127 double yc = R*cosp + curV[1];
130 double diff = sqrt( diffx*diffx + diffy*diffy );
131 double sindphi = (curV[0]-xc)*diffy - (curV[1]-yc)*diffx;
132 sindphi = sindphi/std::abs(R)/
diff;
133 double dphi = asin( sindphi );
134 double cosdphi=sqrt(std::abs(1.-sindphi*sindphi));
if(cosdphi<1.e-10)cosdphi=1.e-10;
135 a0 = R*(1.-
diff/std::abs(R));
138 double dTdXcur = std::abs(R)/cosdphi * (cosp/
diff-diffx*sindphi/(
diff*
diff)) * (-1.);
139 double dTdYcur = std::abs(R)/cosdphi * (sinp/
diff-diffy*sindphi/(
diff*
diff)) * (-1.);
143 dA0dPhi = - (diffx*cosp + diffy*sinp)/
diff*std::abs(R);
144 dA0dR = 1. - (diffx*sinp - diffy*cosp)/
diff*R/std::abs(R);
145 for( it=0; it<NTRK; it++){
146 double invRi = vk->
TrackList[it]->cnstP[2];
147 base_cnst->
f0t[it][0].X = 0.;
148 base_cnst->
f0t[it][0].Y = dA0dPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
149 base_cnst->
f0t[it][0].Z = dA0dPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi ;
150 base_cnst->
f0t[it][0].X += 0.;
151 base_cnst->
f0t[it][0].Y += dA0dR * (dRDpx*(-pp[it][1]) + dRDpy*( pp[it][0]));
152 base_cnst->
f0t[it][0].Z += dA0dR * (dRDpx*(-pp[it][0]) + dRDpy*(-pp[it][1]))/invRi ;
156 base_cnst->
h0t[0].Z = 0.;
162 for( it=0; it<NTRK; it++){
163 double invRi = vk->
TrackList[it]->cnstP[2];
164 double p2i = pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]+pp[it][2]*pp[it][2];
165 double pti = sqrt(pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]);
166 base_cnst->
f0t[it][1].X = 0.;
167 base_cnst->
f0t[it][1].Y = dZdPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
168 base_cnst->
f0t[it][1].Z = dZdPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi;
169 base_cnst->
f0t[it][1].X += dZdTheta * ( dThetaDpz*(-p2i/pti));
170 base_cnst->
f0t[it][1].Y += dZdTheta * (dThetaDpx*(-pp[it][1]) + dThetaDpy*( pp[it][0]) + 0.);
171 base_cnst->
f0t[it][1].Z += dZdTheta * (dThetaDpx*(-pp[it][0]) + dThetaDpy*(-pp[it][1]) + dThetaDpz*(-pp[it][2]))/invRi;
173 base_cnst->
h0t[1].X = dTdXcur*cott;
174 base_cnst->
h0t[1].Y = dTdYcur*cott;
175 base_cnst->
h0t[1].Z = 1.;
197 if( cnst->
onlyZ() ) {
198 for( it=0; it<NTRK; it++){
199 base_cnst->
f0t[it][0].X = 0.001;
200 base_cnst->
f0t[it][0].Y = 0.001;
201 base_cnst->
f0t[it][0].Z = 0.001;
203 base_cnst->
h0t[0].X=0.; base_cnst->
h0t[0].Y=0.; base_cnst->
h0t[0].Z=0.;
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
static void getMagFld(const double, const double, const double, double &, double &, double &, const VKalVrtControlBase *)