13 #include "G4UImanager.hh" 14 #include "G4TrackingManager.hh" 15 #include "G4SystemOfUnits.hh" 22 checkTrack_(
p.getUntrackedParameter<
bool>(
"CheckTrack",
false)),
23 doFineCalo_(
p.getParameter<
bool>(
"DoFineCalo")),
24 saveCaloBoundaryInformation_(
p.getParameter<
bool>(
"SaveCaloBoundaryInformation")),
25 eMinFine_(
p.getParameter<double>(
"EminFineTrack") *
CLHEP::MeV) {
54 double ekin = aTrack->GetKineticEnergy();
57 edm::LogVerbatim(
"DoFineCalo") <<
"PreUserTrackingAction: Start processing track " << aTrack->GetTrackID()
58 <<
" pdgid=" << aTrack->GetDefinition()->GetPDGEncoding()
59 <<
" ekin[GeV]=" << ekin / CLHEP::GeV <<
" vertex[cm]=(" 60 << aTrack->GetVertexPosition().x() / CLHEP::cm <<
"," 61 << aTrack->GetVertexPosition().y() / CLHEP::cm <<
"," 62 << aTrack->GetVertexPosition().z() / CLHEP::cm <<
")" 63 <<
" parentid=" << aTrack->GetParentID();
74 int id = aTrack->GetTrackID();
75 const auto& ppos = aTrack->GetStep()->GetPostStepPoint()->GetPosition();
78 std::pair<math::XYZVectorD, math::XYZTLorentzVectorD>
p(
pos, mom);
82 <<
" aTrack->GetTrackID()=" <<
id 86 bool boundary =
false;
105 <<
" Track " <<
id <<
" crossed boundary; pos=(" 127 edm::LogVerbatim(
"SimTrackManager") <<
"TrackingAction addTrack " <<
id <<
" " 128 << aTrack->GetDefinition()->GetParticleName() <<
" added= " << withAncestor
129 <<
" at " << aTrack->GetPosition();
136 edm::LogVerbatim(
"SimTrackManager") <<
"TrackingAction addTrack " <<
id <<
" added with " <<
false <<
" and "
Log< level::Info, true > LogVerbatim
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
void setCrossedBoundaryPosMom(int id, const math::XYZTLorentzVectorF position, const math::XYZTLorentzVectorF momentum)
CMSSteppingVerbose * steppingVerbose_
TrackWithHistory * currentTrack_
TrackInformation * trkInfo_
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)
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal