29 #include "G4SDManager.hh" 30 #include "G4HCofThisEvent.hh" 31 #include "CLHEP/Units/GlobalSystemOfUnits.h" 32 #include "CLHEP/Units/GlobalPhysicalConstants.h" 43 edm::LogInfo(
"ForwardSim") <<
"TotemTestGem:: Initialised as observer of " 44 <<
"begin of job, begin/end events and of G4step";
63 int iev = (*evt)()->GetEventID();
64 LogDebug(
"ForwardSim") <<
"TotemTestGem: Begin of event = " << iev;
71 evtnum = (*evt)()->GetEventID();
75 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
79 int HCid = G4SDManager::GetSDMpointer()->GetCollectionID(
names[
in]);
81 LogDebug(
"ForwardSim") <<
"TotemTestGem :: Hit Collection for " <<
names[
in]
82 <<
" of ID " << HCid <<
" is obtained at " << theHC;
84 if (HCid >= 0 && theHC > 0) {
85 int nentries = theHC->entries();
87 << nentries <<
" entries";
88 for (
int ihit = 0; ihit <nentries; ihit++) {
97 LogDebug(
"ForwardSim") <<
"TotemTestGem:: --- after fillTree with " << nhit
105 for (
unsigned ihit = 0; ihit <
hits.size(); ihit++) {
116 float vx = aHit->
getVx();
117 float vy = aHit->
getVy();
118 float vz = aHit->
getVz();
119 product.
fillHit(UID, Ptype, TID, PID, ELoss, PABS, vx, vy, vz, x, y,z);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void fillEvent(TotemTestHistoClass &)
float getEnergyLoss() const
virtual void produce(edm::Event &, const edm::EventSetup &)
math::XYZPoint getEntry() const
void update(const BeginOfEvent *evt)
This routine will be called when the appropriate signal arrives.
std::vector< std::string > names
uint32_t getUnitID() const
std::vector< TotemG4Hit * > hits
void fillHit(int uID, int pType, int tID, int pID, float eLoss, float pAbs, float vX, float vY, float vZ, float x, float y, float z)
int getParticleType() const
TotemTestGem(const edm::ParameterSet &p)