- Timestamp:
- Feb 26, 2020, 8:03:48 PM (5 years ago)
- Branches:
- ImprovedOutputFile, master
- Children:
- 288a5fc
- Parents:
- 7b518f0
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackCovariance.cc
r7b518f0 r1388e73 21 21 * Smears track parameters according to appropriate covariance matrix. 22 22 * 23 * \author P. Demin - UCLouvain, Louvain-la-Neuve 23 * \authors P. Demin - UCLouvain, Louvain-la-Neuve 24 * M. Selvaggi - CERN 24 25 * 25 26 */ 26 27 27 28 //FIXME add reference to Bedeschi-code 28 //FIXME add smearing of impact parameter as well29 29 //FIXME make sure about units of P, X 30 //FIXME fix pt > 200 GeV issue and angle > 6.41 30 31 31 32 #include "modules/TrackCovariance.h" … … 40 41 #include "TMath.h" 41 42 #include "TObjArray.h" 43 44 #include <iostream> 45 #include <sstream> 46 47 using namespace std; 42 48 43 49 //------------------------------------------------------------------------------ … … 89 95 { 90 96 Candidate *candidate, *mother; 91 Double_t mass; 97 Double_t mass, p, pt, q, ct; 98 Double_t dd0, ddz, dphi, dct, dp, dpt; 99 92 100 93 101 fItInputArray->Reset(); 94 102 while((candidate = static_cast<Candidate *>(fItInputArray->Next()))) 95 103 { 96 const TLorentzVector &candidatePosition = candidate-> Position;104 const TLorentzVector &candidatePosition = candidate->InitialPosition; 97 105 const TLorentzVector &candidateMomentum = candidate->Momentum; 98 106 … … 103 111 mother = candidate; 104 112 candidate = static_cast<Candidate *>(candidate->Clone()); 113 105 114 candidate->Momentum.SetVectM(track.GetObsP(), mass); 115 candidate->InitialPosition.SetXYZT(track.GetObsX().X(),track.GetObsX().Y(),track.GetObsX().Z(),candidatePosition.T()); 116 117 pt = candidate->Momentum.Pt(); 118 p = candidate->Momentum.P(); 119 q = track.GetObsQ(); 120 ct = track.GetObsPar()[4]; 121 122 candidate->D0 = track.GetObsPar()[0]; 123 candidate->DZ = track.GetObsPar()[3]; 124 candidate->P = track.GetObsP().Mag(); 125 candidate->CtgTheta = track.GetObsPar()[4]; 126 candidate->Phi = track.GetObsPar()[1]; 127 128 candidate->PT = pt; 129 candidate->Charge = q; 130 131 dd0 = TMath::Sqrt(track.GetCov()(0, 0)); 132 ddz = TMath::Sqrt(track.GetCov()(3, 3)); 133 dphi = TMath::Sqrt(track.GetCov()(1, 1)); 134 dct = TMath::Sqrt(track.GetCov()(4, 4)); 135 dpt = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz); 136 dp = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct)); 137 138 candidate->ErrorD0 = dd0; 139 candidate->ErrorDZ = ddz; 140 candidate->ErrorP = dp; 141 candidate->ErrorCtgTheta = dct; 142 candidate->ErrorPhi = dphi; 143 candidate->ErrorPT = dpt; 144 //candidate->TrackResolution = dpt / pt; 145 candidate->TrackResolution = dp / p; 106 146 107 147 candidate->AddCandidate(mother); -
modules/TrackCovariance.h
r7b518f0 r1388e73 24 24 * Smears track parameters according to appropriate covariance matrix. 25 25 * 26 * \author P. Demin - UCLouvain, Louvain-la-Neuve 26 * \authors P. Demin - UCLouvain, Louvain-la-Neuve 27 * M. Selvaggi - CERN 27 28 * 28 29 */
Note:
See TracChangeset
for help on using the changeset viewer.