//____________________________________________________________________________ /*! \class genie::GSeaTrack \brief A class to store track info \author Carla Distefano LNS-INFN, Catania Included modifications by Alfonso Garcia NIKHEF, Amsterdam (January 2019) \created December 1, 2015 \cpright Copyright (c) 2015-2019, The KM3NeT Collaboration For the full text of the license see $GSEAGEN/LICENSE */ //____________________________________________________________________________ #include #include #include "SeaEvent/GSeaTrack.h" using namespace std; //____________________________________________________________________________ GSeaTrack::GSeaTrack(){ this->Reset(); } //___________________________________________________________________________ GSeaTrack::~GSeaTrack(){ } //___________________________________________________________________________ void GSeaTrack::Reset(void){ Id=0; PdgCode=0; Status=-999; MotherId=-1; V1=0.; V2=0.; V3=0.; D1=0.; D2=0.; D3=0.; E=0.; Length=0.; T=0.; GenCounter=0; return; } //___________________________________________________________________________ void GSeaTrack::Set(int id, int status, int pdg, int motherid, double Mass, TLorentzVector * VecEne, TLorentzVector * VecPos, TLorentzVector * IntVer, double length, int gencounter){ this->Reset(); Id=id; Status=status; PdgCode=pdg; MotherId=motherid; Length=length; GenCounter=gencounter; V1=IntVer->X()+VecPos->X()*1.E-15; V2=IntVer->Y()+VecPos->Y()*1.E-15; V3=IntVer->Z()+VecPos->Z()*1.E-15; double Momentum; Momentum= sqrt(pow(VecEne->Energy(),2)-pow(Mass,2)); if(Momentum>0){ D1=VecEne->Px()/Momentum; D2=VecEne->Py()/Momentum; D3=VecEne->Pz()/Momentum; E=VecEne->Energy(); } T=VecPos->T(); return; } //___________________________________________________________________________ void GSeaTrack::Translate(double X0, double Y0, double Z0){ V1+=X0; V2+=Y0; V3+=Z0; return; } //___________________________________________________________________________ void GSeaTrack::Print() { cout << "Track info:" << endl; cout << "Id = " << Id << " // PDG = " << PdgCode << " // Status = " << Status << endl; cout << "MotherId = " << MotherId << endl; cout << "V = " << V1 << " , " << V2 << " , " << V3 << endl; cout << "D = " << D1 << " , " << D2 << " , " << D3 << endl; cout << "E = " << E << endl; cout << "Length = " << Length << endl; cout << "T = " << T << endl; cout << "GenCounter = " << GenCounter << endl; cout << endl; }