//____________________________________________________________________________ /*! \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; PenDepth=0.; Polarization.SetXYZ(0.,0.,0.); return; } //___________________________________________________________________________ void GSeaTrack::Set(uint32_t id, int16_t status, int32_t pdg, uint32_t motherid, float Mass, TLorentzVector * VecEne, TLorentzVector * VecPos, TLorentzVector * IntVer, float length, uint16_t gencounter, float pendepth, TVector3 polarization){ this->Reset(); Id=id; Status=status; PdgCode=pdg; MotherId=motherid; Length=length; GenCounter=gencounter; PenDepth=pendepth; V1=IntVer->X()+VecPos->X()*1.E-15; V2=IntVer->Y()+VecPos->Y()*1.E-15; V3=IntVer->Z()+VecPos->Z()*1.E-15; float Momentum; Momentum= sqrt((VecEne->Energy())*(VecEne->Energy())-Mass*Mass); if(Momentum>0){ D1=VecEne->Px()/Momentum; D2=VecEne->Py()/Momentum; D3=VecEne->Pz()/Momentum; E=VecEne->Energy(); } T=VecPos->T(); Polarization=polarization; return; } //___________________________________________________________________________ void GSeaTrack::SetStatus(int16_t status) { Status=status; return; } //___________________________________________________________________________ void GSeaTrack::Translate(float X0, float Y0, float 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 << "PenDepth = " << PenDepth << endl; cout << "Polarization = " << Polarization.X() <<" "<< Polarization.Y() <<" "<< Polarization.Z() <