|
|
Go to the documentation of this file.
29 #include "G4SDManager.hh"
30 #include "G4HCofThisEvent.hh"
31 #include "CLHEP/Units/GlobalSystemOfUnits.h"
32 #include "CLHEP/Units/GlobalPhysicalConstants.h"
42 edm::LogInfo(
"ForwardSim") <<
"TotemTestGem:: Initialised as observer of "
43 <<
"begin of job, begin/end events and of G4step";
59 int iev = (*evt)()->GetEventID();
60 LogDebug(
"ForwardSim") <<
"TotemTestGem: Begin of event = " <<
iev;
65 evtnum = (*evt)()->GetEventID();
69 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
72 for (
unsigned int in = 0;
in <
names.size();
in++) {
73 int HCid = G4SDManager::GetSDMpointer()->GetCollectionID(
names[
in]);
75 LogDebug(
"ForwardSim") <<
"TotemTestGem :: Hit Collection for " <<
names[
in] <<
" of ID " << HCid
76 <<
" is obtained at " << theHC;
78 if (HCid >= 0 && theHC !=
nullptr) {
79 int nentries = theHC->entries();
80 LogDebug(
"ForwardSim") <<
"TotemTestGem :: " <<
names[
in] <<
" with " << nentries <<
" entries";
81 for (
int ihit = 0; ihit < nentries; ihit++) {
90 LogDebug(
"ForwardSim") <<
"TotemTestGem:: --- after fillTree with " << nhit <<
" Hits";
96 for (
unsigned ihit = 0; ihit <
hits.size(); ihit++) {
107 float vx = aHit->
getVx();
108 float vy = aHit->
getVy();
109 float vz = aHit->
getVz();
110 product.
fillHit(UID, Ptype,
TID,
PID, ELoss, PABS, vx, vy, vz,
x,
y,
z);
std::vector< TotemG4Hit * > hits
TotemTestGem(const edm::ParameterSet &p)
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ int32_t int iev
uint32_t getUnitID() const
math::XYZPoint getEntry() const
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)
Log< level::Info, false > LogInfo
void fillEvent(TotemTestHistoClass &)
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
float getEnergyLoss() const
int getParticleType() const
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< std::string > names