|
ATLAS Offline Software
|
Go to the documentation of this file.
19 double a=-2.0*
exp(-
p->eta())/(1.0+
exp(-2.0*
p->eta()));
24 m_q[2]=
p->pT()/1000.0;
27 Ck[0][0]=(*
p->cov())[0];Ck[0][1]=Ck[1][0]=(*
p->cov())[2];
28 Ck[0][2]=Ck[2][0]=(*
p->cov())[1];Ck[0][3]=Ck[3][0]=(*
p->cov())[3];
29 Ck[0][4]=Ck[4][0]=(*
p->cov())[4];Ck[1][1]=(*
p->cov())[9];
30 Ck[1][2]=Ck[2][1]=(*
p->cov())[6];Ck[1][3]=Ck[3][1]=(*
p->cov())[10];
31 Ck[1][4]=Ck[4][1]=(*
p->cov())[11];Ck[2][2]=(*
p->cov())[5];
32 Ck[2][3]=Ck[3][2]=(*
p->cov())[7];Ck[2][4]=Ck[4][2]=(*
p->cov())[8];
33 Ck[3][3]=(*
p->cov())[12];Ck[3][4]=Ck[4][3]=(*
p->cov())[13];
34 Ck[4][4]=(*
p->cov())[14];
37 Ck[3][
i]=
a*Ck[3][
i];Ck[
i][3]=Ck[3][
i];
42 Ck[4][
i]=Ck[4][
i]/1000.0;Ck[
i][4]=Ck[4][
i];
47 for(
i=0;
i<2;
i++)
for(j=0;j<2;j++)
m_Vuu[
i][j]=Ck[
i][j];
48 for(
i=0;
i<2;
i++)
for(j=0;j<3;j++)
m_Vuq[
i][j]=Ck[
i][j+2];
49 for(
i=0;
i<3;
i++)
for(j=0;j<3;j++)
m_Vqq[
i][j]=Ck[
i+2][j+2];
86 if( pP->covariance() ){
109 Ck[3][3]=Ck[3][3]+2.0*
a*Ck[3][4]+
a*
a*Ck[4][4];
110 Ck[3][4]=Ck[4][3]=
b*Ck[3][4]+
a*
b*Ck[4][4];
111 Ck[4][4]=
b*
b*Ck[4][4];
112 Ck[0][3]=Ck[3][0]=Ck[0][3]+
a*Ck[0][4];Ck[0][4]*=
b;Ck[4][0]=Ck[0][4];
113 Ck[1][3]=Ck[3][1]=Ck[1][3]+
a*Ck[1][4];Ck[1][4]*=
b;Ck[4][1]=Ck[1][4];
114 Ck[2][3]=Ck[3][2]=Ck[2][3]+
a*Ck[2][4];Ck[2][4]*=
b;Ck[4][2]=Ck[2][4];
115 for(
int i=0;
i<2;
i++)
for(
int j=0;j<2;j++)
m_Vuu[
i][j]=Ck[
i][j];
116 for(
int i=0;
i<3;
i++)
for(
int j=0;j<3;j++)
m_Vqq[
i][j]=Ck[
i+2][j+2];
117 for(
int i=0;
i<2;
i++)
for(
int j=0;j<3;j++)
m_Vuq[
i][j]=Ck[
i][j+2];
198 const double C=0.02997;
199 const double B=20.84;
200 const double alpha=
C*
B/1000.0;
202 double Sk[2][2],detr,
chi2;
203 double AC[2][3],BV[2][3];
221 const double cosPhi0=
cos(
phi0);
222 const double sinPhi0=
sin(
phi0);
223 const double sinPsi=-alpha*(xv*cosPhi0+yv*sinPhi0)/P0;
224 if(fabs(sinPsi)>1.0)
return -999.9;
225 const double cosPsi=sqrt(1.0-sinPsi*sinPsi);
226 const double psi=asin(sinPsi);
227 const double sint=
sin(theta0);
228 const double ctt=
cos(theta0)/sint;
234 m_A[1][0]=-ctt*cosPhi0/cosPsi;
235 m_A[1][1]=-ctt*sinPhi0/cosPsi;
240 m_B[0][2]=(1.0-1.0/cosPsi)/alpha;
243 m_B[1][1]=-P0*psi/(alpha*sint*sint);
244 m_B[1][2]=ctt*(psi-sinPsi/cosPsi)/alpha;
246 m_h[0]=yv*cosPhi0-xv*sinPhi0+P0*(1-cosPsi)/alpha;
247 m_h[1]=zv+P0*ctt*psi/alpha;
252 for(
i=0;
i<2;
i++)
for(j=0;j<2;j++) Sk[
i][j]=
m_Vuu[
i][j];
253 for(
i=0;
i<2;
i++)
for(j=0;j<3;j++)
258 for(
i=0;
i<2;
i++)
for(j=0;j<2;j++)
271 for(
k=0;
k<3;
k++) Sk[
i][j]+=BV[
i][
k]*
m_B[j][
k];
279 detr=1.0/(Sk[0][0]*Sk[1][1]-Sk[0][1]*Sk[1][0]);
280 m_V[0][0]=Sk[1][1]*detr;
281 m_V[1][1]=Sk[0][0]*detr;
282 m_V[0][1]=
m_V[1][0]=-Sk[0][1]*detr;
289 for(j=0;j<3;j++)
m_D[
i][j]=
AC[
i][j];
290 for(j=3;j<3+shift;j++)
296 for(j=0;j<3;j++)
m_D[
i][j+3+shift]=BV[
i][j]-
m_Vuq[
i][j];
369 const double C=0.029997;
370 const double B=20.84;
373 double P[3];
double E=0.0;
378 for(
int i=0;
i<3;
i++)
P[
i]=0.0;
382 offset=3+3*(*it)->getIndex();
383 double mass=(*it)->getMass()/1000.0;
388 double phiV=Rk[
offset]+psi;
402 const double C=0.029997;
403 const double B=20.84;
409 bool linFailed=
false;
413 for(
i=0;
i<3;
i++)
P[
i]=0.0;
419 offset=3+3*(*it)->getIndex();
420 double mass=(*it)->getMass()/1000.0;
425 double phiV=Rk[
offset]+psi;
434 m_D[0][0]=0.0;
m_D[0][1]=0.0;
m_D[0][2]=0.0;
438 offset=3+3*(*it)->getIndex();
440 double mass=(*it)->getMass()/1000.0;
441 double Ck=(Rk[
offset+2]<0.0)?-1.0:1.0;
450 double sinPsi=-alpha*(Rk[0]*cosF+Rk[1]*sinF)/Rk[
offset+2];
456 double psi=asin(sinPsi);
457 double cosPsi=sqrt(1.0-sinPsi*sinPsi);
458 double phiV=Rk[
offset]+psi;
460 double aCos=alpha*Ck/cosPsi;
461 double dP=
P[1]*
cos(phiV)-
P[0]*
sin(phiV);
464 m_D[0][0]+=dP*cosF*aCos;
465 m_D[0][1]+=dP*sinF*aCos;
468 m_D[0][
offset+2]=eE/sinT-Ck*(
P[0]*
cos(phiV)+
P[1]*
sin(phiV)+
P[2]*cosT/sinT)+dP*Ck*sinPsi/cosPsi;
471 if(linFailed)
return -999.9;
513 const int nSize=3+3*pV->
getTracks()->size();
548 m_pvTracks=
new std::list<TrigVertexFitInputTrack*>;
695 for(
int i=0;
i<nSize;
i++)
698 for(
int j=0;j<nSize;j++)
msg<<
m_Gk[
i][j]<<
" ";
710 if((*it)->getTrackType()!=1)
continue;
711 if(
pT==(*it)->getTrigTrack())
726 if((*it)->getTrackType()!=2)
continue;
727 if(
pT==(*it)->getTrkTrack())
double calculateInvariantMass(TrigL2Vertex *pV)
JetConstituentVector::iterator iterator
TrigInDetTrackFitPar * m_P
TrigVertexFitConstraint(double, const TrigVertexFitInputTrack *, const TrigVertexFitInputTrack *)
two-track mass constraint
void setStatus(int)
sets vertex status flag
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
~TrigVertexFitConstraint()
double m_D[2][MAX_SIZE_VERT_COVM]
virtual void updateVertex(class TrigL2Vertex *)
implementation of abstract method from the base class
virtual double getChi2Distance(class TrigL2Vertex *)
implementation of abstract method from the base class
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
void addNdof(int)
increments accumulated number-of-degree-of-freedom of the fit
void reset()
resets all internal structures
virtual MsgStream & report(MsgStream &) const
std::list< TrigVertexFitInputTrack * > * getTracks()
lists of tracks in the vertex
void addChi2(double)
increments accumulated of the fit
int ndof()
returns accumulated number-of-degree-of-freedom of the fit
#define AmgSymMatrix(dim)
bool prepareForFit()
resets all internal structures + initialization of the covariance
#define MAX_SIZE_VERT_COVM
void setMass(double)
sets calculated mass of the vertex
void setMassVariance(double)
sets variance of the calculated mass of the vertex
const TrigInDetTrackFitPar * getMotherTrack()
returns mother particle parameters if m_isMassEstimated() is true
std::list< TrigVertexFitInputTrack * > * m_pvTracks
double chi2()
returns accumulated of the fit
double mass()
returns calculated mass of the vertex
double chi2(TH1 *h0, TH1 *h1)
double massVariance()
returns variance of the calculated mass of the vertex
const TrigVertexFitInputTrack * contains(const TrigInDetTrack *)
checks whether L2 track is in the vertex
void setMotherTrack(TrigInDetTrackFitPar *)
sets mother particle parameters after kinematical fitting
double m_Gk[MAX_SIZE_VERT_COVM][MAX_SIZE_VERT_COVM]
std::list< TrigVertexFitConstraint * > * m_pvConstraints
double m_Rk[MAX_SIZE_VERT_COVM]
MsgStream & report(MsgStream &) const
bool isReadyForFit()
vertex status
double * getParametersVector()
returns vector of vertex fit parameters: vertex position + refitted track momenta at-perigee (sic !...
bool isMassEstimated()
vertex status
double getValue()
returns a mass of the constraint
int getStatus()
returns vertex status flag
std::list< TrigVertexFitConstraint * > * getConstraints()
lists of all constraints imposed on the vertex
std::list< const TrigVertexFitInputTrack * > m_trackList
bool isVertexFitted()
vertex status