30 #include "G4SDManager.hh"
31 #include "G4HCofThisEvent.hh"
32 #include "CLHEP/Units/GlobalSystemOfUnits.h"
33 #include "CLHEP/Units/GlobalPhysicalConstants.h"
44 edm::LogInfo(
"ForwardSim") <<
"TotemTestGem:: Initialised as observer of "
45 <<
"begin of job, begin/end events and of G4step";
64 int iev = (*evt)()->GetEventID();
65 LogDebug(
"ForwardSim") <<
"TotemTestGem: Begin of event = " << iev;
72 evtnum = (*evt)()->GetEventID();
76 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
80 int HCid = G4SDManager::GetSDMpointer()->GetCollectionID(
names[
in]);
82 LogDebug(
"ForwardSim") <<
"TotemTestGem :: Hit Collection for " <<
names[
in]
83 <<
" of ID " << HCid <<
" is obtained at " << theHC;
85 if (HCid >= 0 && theHC > 0) {
86 int nentries = theHC->entries();
88 << nentries <<
" entries";
89 for (
int ihit = 0; ihit <nentries; ihit++) {
98 LogDebug(
"ForwardSim") <<
"TotemTestGem:: --- after fillTree with " << nhit
106 for (
unsigned ihit = 0; ihit <
hits.size(); ihit++) {
117 float vx = aHit->
getVx();
118 float vy = aHit->
getVy();
119 float vz = aHit->
getVz();
120 product.
fillHit(UID, Ptype, TID, PID, ELoss, PABS, vx, vy, vz, x, y,z);
T getParameter(std::string const &) const
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.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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)