|
ATLAS Offline Software
|
Go to the documentation of this file.
36 for(
int iv=0; iv<cascadeEvent_.
cascadeNV-1; iv++){
72 double dptot[4],VrtMomCov[21];
83 if( target_trk ==
nullptr )
return -12;
86 if(Charge!=0)Charge=std::copysign(1,Charge);
89 double parV0[5],covParV0[15],tmpCov[15],fittedVrt[3];
96 combinedTrack( Charge, dptot, VrtMomCov, localField, parV0, covParV0);
97 covParV0[0]=std::abs(covParV0[0]); covParV0[2]=std::abs(covParV0[2]); covParV0[5]=fabs(covParV0[5]);
98 covParV0[9]=std::abs(covParV0[9]); covParV0[14]=std::abs(covParV0[14]);
102 distToVertex = sqrt(target_trk->
Perig[0]*target_trk->
Perig[0]+target_trk->
Perig[1]*target_trk->
Perig[1]);
107 if (IERR)
return -15;
132 long int Iter, IERR, iv;
139 double iv_dstToVrt=0., sum_dstToVrt=0., old_dstToVrt;
140 for(iv=0; iv<cascadeEvent_.
cascadeNV; iv++){
158 double Chi2Old=0.,Chi2Cur=0;
160 double limDstToVrt=0.001;
161 old_dstToVrt=100000.;
162 for(Iter=0; Iter<20; Iter++){
165 for(
int Stabil=0; Stabil<2; Stabil++){
168 for(iv=0; iv<cascadeEvent_.
cascadeNV; iv++){
181 sum_dstToVrt += iv_dstToVrt;
187 if(Iter>5 && Chi2Cur>1.
e4)
return -1;
189 if(sum_dstToVrt<old_dstToVrt){
191 if(old_dstToVrt/3. < sum_dstToVrt) { old_dstToVrt=sum_dstToVrt;}
else {old_dstToVrt/=3.;}
195 if(std::abs(Chi2Cur-Chi2Old)<0.01 && Iter>5 && sum_dstToVrt<limDstToVrt*(cascadeEvent_.
cascadeNV-1) )
break;
198 double cnstRemnants=0. ;
199 for(iv=0; iv<cascadeEvent_.
cascadeNV; iv++){
206 if( cnstRemnants > 1.
e0)
return -2;
207 std::cout<<
"================================================="<<sum_dstToVrt<<
'\n';
211 cascadeEvent_.
fullCovMatrix.reset(
new double[fullNPar*fullNPar] );
216 auto tmpLSide = std::make_unique<double[]>(fullNPar);
217 for( iv=0; iv<cascadeEvent_.
cascadeNV; iv++){
int cfInv5(double *cov, double *wgt)
void cfdcopy(double *source, double *target, int n)
void FullMTXfill(VKVertex *vk, double *ader)
static void getMagFld(const double, const double, const double, double &, double &, double &, VKalVrtControlBase *)
long int getVertexCharge(VKVertex *vk)
void applyConstraints(VKVertex *vk)
double ader[(3 *vkalNTrkM+3) *(3 *vkalNTrkM+3)]
void combinedTrack(long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
int getCascadeNPar(CascadeEvent &cascadeEvent_, int Type)
int cfdinv(double *cov, double *wgt, long int NI)
std::vector< std::unique_ptr< VKConstraintBase > > ConstraintList
std::unique_ptr< double[]> fullCovMatrix
std::vector< int > matrixPnt
static void Propagate(long int TrkID, long int Charge, double *ParOld, double *CovOld, double *RefStart, double *RefEnd, double *ParNew, double *CovNew, VKalVrtControlBase *FitControl=0)
int afterFit(VKVertex *vk, double *ader, double *dcv, double *ptot, double *VrtMomCov, const VKalVrtControlBase *CONTROL)
std::vector< VKVertex * > includedVrt
VKTrack * getCombinedVTrack(VKVertex *vk)
void Scale(TH1 *h, double d=1)
int fitVertexCascadeScale(VKVertex *vk, double &distToVertex)
int processCascadeScale(CascadeEvent &cascadeEvent_)
Ensure that the ATLAS eigen extensions are properly loaded.
std::unique_ptr< VKalVrtControl > vk_fitterControl
int FullMCNSTfill(VKVertex *vk, double *ader, double *LSide)
int setVTrackMass(VKVertex *vk)
VKVertex * nextCascadeVrt
int translateToFittedPos(CascadeEvent &cascadeEvent_, double Step)
double dcv[6 *(vkalNTrkM *3+3)]
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
void rescaleVrtErrForPointing(double Div, CascadeEvent &cascadeEvent_)
std::vector< std::unique_ptr< VKVertex > > cascadeVertexList
void vpderiv(bool UseTrackErr, long int Charge, const double *pari0, double *covi, double *vrtref, double *covvrtref, double *drdpar, double *dwgt, double *rv0, VKalVrtControl *FitCONTROL)