39 #include "G4SDManager.hh" 41 #include "G4HCofThisEvent.hh" 43 #include <CLHEP/Units/SystemOfUnits.h> 44 #include <CLHEP/Units/GlobalPhysicalConstants.h> 65 std::vector<TotemG4Hit*>
hits;
77 <<
"TotemTestGem:: Initialised as observer of begin of job, begin/end events and of G4step";
93 int iev = (*evt)()->GetEventID();
94 LogDebug(
"ForwardSim") <<
"TotemTestGem: Begin of event = " <<
iev;
99 evtnum = (*evt)()->GetEventID();
103 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
106 for (
unsigned int in = 0;
in <
names.size();
in++) {
107 int HCid = G4SDManager::GetSDMpointer()->GetCollectionID(
names[
in]);
109 LogDebug(
"ForwardSim") <<
"TotemTestGem :: Hit Collection for " <<
names[
in] <<
" of ID " << HCid
110 <<
" is obtained at " << theHC;
112 if (HCid >= 0 && theHC !=
nullptr) {
113 int nentries = theHC->entries();
114 LogDebug(
"ForwardSim") <<
"TotemTestGem :: " <<
names[
in] <<
" with " << nentries <<
" entries";
115 for (
int ihit = 0; ihit < nentries; ihit++) {
117 hits.push_back(aHit);
124 LogDebug(
"ForwardSim") <<
"TotemTestGem:: --- after fillTree with " << nhit <<
" Hits";
130 for (
unsigned ihit = 0; ihit <
hits.size(); ihit++) {
144 product.
fillHit(UID, Ptype,
TID, PID, ELoss, PABS,
vx,
vy,
vz,
x,
y,
z);
Log< level::Info, true > LogVerbatim
#define DEFINE_SIMWATCHER(type)
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
void fillEvent(TotemTestHistoClass &)
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
float getEnergyLoss() const
uint32_t getUnitID() const
std::vector< std::string > names
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
math::XYZPoint getEntry() const
TotemTestGem(const edm::ParameterSet &p)