Changeset 170a11d in git for modules/TrackCovariance.cc
- Timestamp:
- Dec 14, 2020, 10:53:31 AM (4 years ago)
- Branches:
- master
- Children:
- a0db751
- Parents:
- 527f67a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackCovariance.cc
r527f67a r170a11d 21 21 * Smears track parameters according to appropriate covariance matrix. 22 22 * 23 * \authors P. Demin - UCLouvain, Louvain-la-Neuve 23 * \authors F. Bedeschi - INFN Pisa 24 * P. Demin - UCLouvain, Louvain-la-Neuve 24 25 * M. Selvaggi - CERN 26 * 25 27 * 26 28 */ … … 50 52 51 53 TrackCovariance::TrackCovariance() : 52 fGeometry(0), fCovariance(0), f ItInputArray(0)54 fGeometry(0), fCovariance(0), fAcx(0), fItInputArray(0) 53 55 { 54 56 fGeometry = new SolGeom(); … … 70 72 fBz = GetDouble("Bz", 0.0); 71 73 fGeometry->Read(GetString("DetectorGeometry", "")); 74 fNMinHits = GetInt("NMinHits", 6); 72 75 76 // load geometry 73 77 fCovariance->Calc(fGeometry); 78 fCovariance->SetMinHits(fNMinHits); 79 // load geometry 80 fAcx = fCovariance->AccPnt(); 74 81 75 82 // import input array 76 77 83 fInputArray = ImportArray(GetString("InputArray", "TrackMerger/tracks")); 78 84 fItInputArray = fInputArray->MakeIterator(); … … 97 103 Double_t mass, p, pt, q, ct; 98 104 Double_t dd0, ddz, dphi, dct, dp, dpt, dC; 99 105 100 106 101 107 fItInputArray->Reset(); … … 107 113 const TLorentzVector &candidateMomentum = candidate->Momentum; 108 114 115 if ( !fCovariance->IsAccepted(candidateMomentum.Vect()) ) continue; 116 109 117 mass = candidateMomentum.M(); 110 118 … … 112 120 113 121 mother = candidate; 114 candidate = static_cast<Candidate 122 candidate = static_cast<Candidate*>(candidate->Clone()); 115 123 116 124 candidate->Momentum.SetVectM(track.GetObsP(), mass); 117 125 118 126 // converting back to mm 119 127 candidate->InitialPosition.SetXYZT(track.GetObsX().X()*1e03,track.GetObsX().Y()*1e03,track.GetObsX().Z()*1e03,candidatePosition.T()*1e03); … … 130 138 candidate->Yd = track.GetObsX().Y()*1e03; 131 139 candidate->Zd = track.GetObsX().Z()*1e03; 132 140 133 141 candidate->D0 = track.GetObsPar()[0]*1e03; 134 142 candidate->Phi = track.GetObsPar()[1]; … … 142 150 candidate->Charge = q; 143 151 144 dd0 = TMath::Sqrt(track.GetCov()(0, 0))*1e03; 145 ddz = TMath::Sqrt(track.GetCov()(3, 3))*1e03; 146 dphi = TMath::Sqrt(track.GetCov()(1, 1)); 147 dct = TMath::Sqrt(track.GetCov()(4, 4)); 152 dd0 = TMath::Sqrt(track.GetCov()(0, 0))*1e03; 153 ddz = TMath::Sqrt(track.GetCov()(3, 3))*1e03; 154 dphi = TMath::Sqrt(track.GetCov()(1, 1)); 155 dct = TMath::Sqrt(track.GetCov()(4, 4)); 148 156 dpt = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz); 149 157 dp = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct)); … … 160 168 candidate->TrackResolution = dp / p; 161 169 162 163 170 candidate->AddCandidate(mother); 164 171
Note:
See TracChangeset
for help on using the changeset viewer.