104 std::map<int, std::vector<int> > mcHitMap;
112 std::cout <<
"------------Event " <<
fEventNr <<
"-------------" << std::endl;
115 for (
std::map<
int, std::vector<int> >::const_iterator it = mcHitMap.begin(); it!= mcHitMap.end(); it++){
117 std::vector<int> MChits = it->second;
118 if (MChits.size() > 1 && myTrack->
GetMotherID() < 0){
119 TVector3 StartPos, StartPosErr, StartMom, StartMomErr, StartO, StartU, StartV;
123 std::cout <<
"StartPoint: " << *startPoint << std::endl;
125 StartPosErr = TVector3(0.0, 0.0, 0.0);
126 StartMom = TVector3(startPoint->GetPx(), startPoint->GetPy(), startPoint->GetPz());
127 StartMomErr = TVector3(0.0, 0.0, 0.0);
133 StartPosErr = TVector3(0.0, 0.0, 0.0);
135 StartMomErr = TVector3(0.0, 0.0, 0.0);
137 StartU = TVector3(1.0, 0.0, 0.0);
138 StartV = TVector3(0.0, 1.0, 0.0);
142 fPro->PropagateFromPlane(StartU, StartV);
145 TDatabasePDG *fdbPDG= TDatabasePDG::Instance();
146 TParticlePDG *
fParticle= fdbPDG->GetParticle(PDGCode);
147 Int_t fCharge= (Int_t)fParticle->Charge();
150 Int_t size1 = clref1.GetEntriesFast();
151 FairTrackParP *fStart=
new (clref1[size1]) FairTrackParP(StartPos, StartMom, StartPosErr, StartMomErr, fCharge, StartO, StartU, StartV);
153 for (; p < (int)MChits.size(); p++){
155 std::cout <<
"PropagationPoint: " << *myPoint << std::endl;
158 TVector3 StopPosErr(0.0, 0.0, 0.0);
159 TVector3 StopMom(myPoint->GetPx(), myPoint->GetPy(), myPoint->GetPz());
160 TVector3 StopMomErr(0.0, 0.0, 0.0);
166 Int_t size2 = clref2.GetEntriesFast();
168 new (clref2[size2]) FairTrackParP(StopPos, StopMom, StopPosErr, StopMomErr, fCharge, o, u, v);
171 Int_t size = clref.GetEntriesFast();
172 FairTrackParP *fRes=
new(clref[size]) FairTrackParP();
176 Int_t size3 = cDetRef.GetEntriesFast();
179 std::cout <<
"Propagation Plane:" << std::endl;
180 std::cout <<
"o: " << o[0] <<
" " << o[1] <<
" " << o[2] << std::endl;
181 std::cout <<
"u: " << u[0] <<
" " << u[1] <<
" " << u[2] << std::endl;
182 std::cout <<
"v: " << v[0] <<
" " << v[1] <<
" " << v[2] << std::endl;
187 fPro->PropagateToPlane(o, u, v);
188 fPro->Propagate(fStart, fRes, PDGCode);
190 std::cout << std::endl;
191 std::cout <<
"Propagation Points: " << std::endl;
192 std::cout << fRes->GetX() <<
", ";
193 std::cout << fRes->GetY() <<
", ";
194 std::cout << fRes->GetZ();
195 std::cout << std::endl;
197 std::cout <<
"Propagation Momentum: " << std::endl;
199 std::cout << fRes->GetPx() <<
", ";
200 std::cout << fRes->GetPy() <<
", ";
201 std::cout << fRes->GetPz() << std::endl;
203 std::cout <<
"Charge: " << fRes->GetQ() << std::endl;
205 std::cout <<
"Porpagation Covariance Matrix: " << std::endl;
209 fRes->GetCov(CovMatrix);
210 fRes->GetMARSCov(CovMatrix66);
219 std::cout << CovMatrix66[3][3] <<
", " << CovMatrix66[3][4] <<
", " << CovMatrix66[3][5] << std::endl;
220 std::cout << CovMatrix66[4][4] <<
", " << CovMatrix66[4][5] <<
", " << CovMatrix66[5][5] << std::endl;
221 std::cout << CovMatrix66[0][3] <<
", " << CovMatrix66[1][3] <<
", " << CovMatrix66[2][3] << std::endl;
222 std::cout << CovMatrix66[0][4] <<
", " << CovMatrix66[1][4] <<
", " << CovMatrix66[2][4] << std::endl;
223 std::cout << CovMatrix66[0][5] <<
", " << CovMatrix66[1][5] <<
", " << CovMatrix66[2][5] << std::endl;
224 std::cout << CovMatrix66[0][0] <<
", " << CovMatrix66[0][1] <<
", " << CovMatrix66[0][2] << std::endl;
225 std::cout << CovMatrix66[1][1] <<
", " << CovMatrix66[1][2] <<
", " << CovMatrix66[2][2] << std::endl;
226 std::cout << std::endl;
235 TVector3
global(fRes->GetX(), fRes->GetY(), fRes->GetZ());
238 std::cout <<
"Propagation Point local: " << std::endl;
239 std::cout << local[0] <<
" " << local[1] <<
" " << local[2] << std::endl;
240 std::cout << std::endl;
void GetOUVShortId(Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v)
TClonesArray * fTrackParGeane
TVector3 GetMomentum() const
Int_t GetSensorID() const
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TClonesArray * fTrackParIni
TClonesArray * fTrackParFinal
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
TVector3 GetPosition() const
std::map< int, std::vector< int > > AssignHitsToTracks()
TVector3 GetStartVertex() const
Int_t GetMotherID() const