13 #include "G4UImanager.hh" 14 #include "G4TrackingManager.hh" 15 #include "G4SystemOfUnits.hh" 21 currentTrack_(nullptr),
24 checkTrack_(
p.getUntrackedParameter<
bool>(
"CheckTrack",
false)),
25 doFineCalo_(
p.getParameter<
bool>(
"DoFineCalo")),
26 saveCaloBoundaryInformation_(
p.getParameter<
bool>(
"SaveCaloBoundaryInformation")),
27 eMinFine_(
p.getParameter<double>(
"EminFineTrack") *
CLHEP::MeV) {}
48 edm::LogVerbatim(
"DoFineCalo") <<
"PreUserTrackingAction: Start processing track " << aTrack->GetTrackID()
49 <<
" pdgid=" << aTrack->GetDefinition()->GetPDGEncoding()
50 <<
" ekin[GeV]=" << aTrack->GetKineticEnergy() / CLHEP::GeV <<
" vertex[cm]=(" 51 << aTrack->GetVertexPosition().x() / CLHEP::cm <<
"," 52 << aTrack->GetVertexPosition().y() / CLHEP::cm <<
"," 53 << aTrack->GetVertexPosition().z() / CLHEP::cm <<
")" 54 <<
" parentid=" << aTrack->GetParentID();
70 uint32_t
id = aTrack->GetTrackID();
72 aTrack->GetStep()->GetPostStepPoint()->GetPosition().y(),
73 aTrack->GetStep()->GetPostStepPoint()->GetPosition().z());
75 std::pair<math::XYZVectorD, math::XYZTLorentzVectorD>
p(
pos, mom);
79 <<
" aTrack->GetTrackID()=" << aTrack->GetTrackID()
81 <<
pos.x() <<
"," <<
pos.y() <<
"," <<
pos.z() <<
")";
95 <<
" Track " << aTrack->GetTrackID() <<
" crossed boundary; pos=(" 118 <<
"TrackingAction addTkCaloStateInfo " <<
id <<
" of momentum " << mom <<
" at " <<
pos;
123 ((
extractor_(aTrack).getIDonCaloSurface() == aTrack->GetTrackID()) || (
extractor_(aTrack).isAncestor()));
135 <<
"TrackingAction addTrack " <<
currentTrack_->
trackID() <<
" E(GeV)= " << aTrack->GetKineticEnergy() <<
" " 136 << aTrack->GetDefinition()->GetParticleName() <<
" added= " << withAncestor <<
" at " 137 << aTrack->GetPosition();
139 <<
true <<
" and " << withAncestor <<
" at " <<
pos;
147 <<
"TrackingAction addTrack " <<
currentTrack_->
trackID() <<
" added with " <<
false <<
" and " <<
false;
const TrackContainer * trackContainer() const
Log< level::Info, true > LogVerbatim
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
TrackInformationExtractor extractor_
void setCrossedBoundaryPosMom(int id, const math::XYZTLorentzVectorF position, const math::XYZTLorentzVectorF momentum)
CMSSteppingVerbose * steppingVerbose_
TrackWithHistory * currentTrack_
void prepareForNewPrimary()
~TrackingAction() override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
EventAction * eventAction_
TrackingAction(EventAction *ea, const edm::ParameterSet &ps, CMSSteppingVerbose *)
void checkAtEnd(const G4Track *)
bool saveCaloBoundaryInformation_
void PreUserTrackingAction(const G4Track *aTrack) override
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
void TrackEnded(const G4Track *) const
void PostUserTrackingAction(const G4Track *aTrack) override
void TrackStarted(const G4Track *, bool isKilled)
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
unsigned int trackID() const
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal