CMS 3D CMS Logo

TrackInformation.cc
Go to the documentation of this file.
3 
4 #include "G4ThreeVector.hh"
5 #include "G4SystemOfUnits.hh"
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  << " isInHistory = " << isInHistory_ << "\n"
30  << " idOnCaloSurface = " << getIDonCaloSurface() << "\n"
31  << " caloIDChecked = " << caloIDChecked() << "\n"
32  << " idCaloVolume = " << idCaloVolume_ << "\n"
33  << " idLastVolume = " << idLastVolume_ << "\n"
34  << " isFromTtoBTL = " << isFromTtoBTL() << "\n"
35  << " isFromBTLtoT = " << isFromBTLtoT() << "\n"
36  << " isBTLdaughter = " << isBTLdaughter() << "\n"
37  << " isBTLlooper = " << isBTLlooper() << "\n"
38  << " idAtBTLentrance = " << idAtBTLentrance_;
39 }
math::XYZTLorentzVectorF momentumAtBoundary_
bool isBTLdaughter() const
bool caloIDChecked() const
U second(std::pair< T, U > const &p)
static const float invgev
Definition: TimingSD.cc:32
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator
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)