CMS 3D CMS Logo

TrackInformation.cc
Go to the documentation of this file.
3 
4 #include "G4ThreeVector.hh"
5 #include <CLHEP/Units/SystemOfUnits.h>
6 
7 #include <iostream>
8 
9 G4ThreadLocal G4Allocator<TrackInformation>* fpTrackInformationAllocator = nullptr;
10 
12  const double invcm = 1.0 / CLHEP::cm;
13  const double invgev = 1.0 / CLHEP::GeV;
14  const double invsec = 1.0 / CLHEP::second;
15  crossedBoundary_ = true;
16  const G4ThreeVector& v = track->GetPosition();
18  math::XYZTLorentzVectorF(v.x() * invcm, v.y() * invcm, v.z() * invcm, track->GetGlobalTime() * invsec);
19  const G4ThreeVector& p = track->GetMomentum();
21  math::XYZTLorentzVectorF(p.x() * invgev, p.y() * invgev, p.z() * invgev, track->GetTotalEnergy() * invgev);
22 }
23 
25  LogDebug("TrackInformation") << " TrackInformation : storeTrack = " << storeTrack_ << "\n"
26  << " hasHits = " << hasHits_ << "\n"
27  << " isPrimary = " << isPrimary_ << "\n"
28  << " isGeneratedSecondary = " << isGeneratedSecondary_ << "\n"
29  << " mcTruthID = " << mcTruthID_ << "\n"
30  << " isInHistory = " << isInHistory_ << "\n"
31  << " idOnCaloSurface = " << getIDonCaloSurface() << "\n"
32  << " caloIDChecked = " << caloIDChecked() << "\n"
33  << " idCaloVolume = " << idCaloVolume_ << "\n"
34  << " idLastVolume = " << idLastVolume_ << "\n"
35  << " isFromTtoBTL = " << isFromTtoBTL() << "\n"
36  << " isFromBTLtoT = " << isFromBTLtoT() << "\n"
37  << " isBTLlooper = " << isBTLlooper() << "\n"
38  << " isInTrkFromBackscattering = " << isInTrkFromBackscattering()
39  << "\n"
40  << " isExtSecondary = " << isExtSecondary();
41 }
math::XYZTLorentzVectorF momentumAtBoundary_
bool caloIDChecked() const
U second(std::pair< T, U > const &p)
static const float invgev
Definition: TimingSD.cc:32
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator
bool isExtSecondary() const
bool isInTrkFromBackscattering() const
math::XYZTLorentzVectorF positionAtBoundary_
int getIDonCaloSurface() const
bool isFromBTLtoT() const
void Print() const override
bool isBTLlooper() const
bool isFromTtoBTL() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22
void setCrossedBoundary(const G4Track *track)
#define LogDebug(id)