Fork me on GitHub

Changeset 2ca681a in git for modules


Ignore:
Timestamp:
Sep 28, 2020, 6:46:53 PM (4 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
master
Children:
e7cccc2
Parents:
f382b7e
Message:

fixed unit in TrackCovariance module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCovariance.cc

    rf382b7e r2ca681a  
    102102  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    103103  {
    104     const TLorentzVector &candidatePosition = candidate->InitialPosition;
     104
     105    // converting to meters
     106    const TLorentzVector &candidatePosition = candidate->InitialPosition*1e-03;
    105107    const TLorentzVector &candidateMomentum = candidate->Momentum;
    106108
     
    113115
    114116    candidate->Momentum.SetVectM(track.GetObsP(), mass);
    115     candidate->InitialPosition.SetXYZT(track.GetObsX().X(),track.GetObsX().Y(),track.GetObsX().Z(),candidatePosition.T());
    116117   
     118    // converting back to mm
     119    candidate->InitialPosition.SetXYZT(track.GetObsX().X()*1e03,track.GetObsX().Y()*1e03,track.GetObsX().Z()*1e03,candidatePosition.T()*1e03);
     120
    117121    // save full covariance 5x5 matrix internally (D0, phi, Curvature, dz, ctg(theta))
    118122    candidate->TrackCovariance = track.GetCov();
     
    123127    ct = track.GetObsPar()[4];
    124128
    125     candidate->Xd = track.GetObsX().X();
    126     candidate->Yd = track.GetObsX().Y();
    127     candidate->Zd = track.GetObsX().Z();
     129    candidate->Xd = track.GetObsX().X()*1e03;
     130    candidate->Yd = track.GetObsX().Y()*1e03;
     131    candidate->Zd = track.GetObsX().Z()*1e03;
    128132   
    129     candidate->D0 = track.GetObsPar()[0];
    130     candidate->Phi = track.GetObsPar()[1];
    131     candidate->C = track.GetObsPar()[2];
    132     candidate->DZ = track.GetObsPar()[3];
     133    candidate->D0       = track.GetObsPar()[0]*1e03;
     134    candidate->Phi      = track.GetObsPar()[1];
     135    candidate->C        = track.GetObsPar()[2]*1e03;
     136    candidate->DZ       = track.GetObsPar()[3]*1e03;
    133137    candidate->CtgTheta = track.GetObsPar()[4];
    134     candidate->P  = track.GetObsP().Mag();
    135     candidate->PT = pt;
    136     candidate->Charge = q;
     138    candidate->P        = track.GetObsP().Mag();
     139    candidate->PT       = pt;
     140    candidate->Charge   = q;
    137141
    138     dd0       = TMath::Sqrt(track.GetCov()(0, 0));
    139     ddz       = TMath::Sqrt(track.GetCov()(3, 3));
     142    dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03;
     143    ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03;
    140144    dphi      = TMath::Sqrt(track.GetCov()(1, 1));
    141145    dct       = TMath::Sqrt(track.GetCov()(4, 4));
    142146    dpt       = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz);
    143147    dp        = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct));
    144     dC        = TMath::Sqrt(track.GetCov()(2, 2));
     148    dC        = TMath::Sqrt(track.GetCov()(2, 2))*1e03;
    145149
    146150    candidate->ErrorD0 = dd0;
Note: See TracChangeset for help on using the changeset viewer.