6 #include "G4SDManager.hh"
9 #include "G4VProcess.hh"
11 #include "G4Cerenkov.hh"
12 #include "G4ParticleTable.hh"
13 #include "CLHEP/Units/GlobalSystemOfUnits.h"
14 #include "CLHEP/Units/GlobalPhysicalConstants.h"
15 #include "Randomize.hh"
16 #include "G4Poisson.hh"
28 (float)(p.getParameter<edm::
ParameterSet>(
"TotemT2ScintSD").getParameter<double>(
"TimeSliceUnit")),
29 p.getParameter<edm::
ParameterSet>(
"TotemT2ScintSD").getParameter<bool>(
"IgnoreTrackID")) {
37 edm::LogVerbatim(
"ForwardSim") <<
"***************************************************\n"
39 <<
"* Constructing a TotemT2ScintSD with name " << name <<
" *\n"
41 <<
"***************************************************";
43 edm::LogVerbatim(
"ForwardSim") <<
"\nUse of Birks law is set to " << useBirk_
44 <<
" with three constants kB = " << birk1_ <<
", C1 = " << birk2_
49 auto const prePoint = aStep->GetPreStepPoint();
50 auto const touch = prePoint->GetTouchable();
52 int iphi = (touch->GetReplicaNumber(0)) % 10;
53 int lay = (touch->GetReplicaNumber(0) / 10) % 10 + 1;
54 int zside = (((touch->GetReplicaNumber(1)) == 1) ? 1 : -1);
60 if (scheme !=
nullptr) {
61 edm::LogVerbatim(
"ForwardSim") <<
"TotemT2ScintSD: updates numbering scheme for " << GetName();
67 double destep = aStep->GetTotalEnergyDeposit();
69 double edep = weight * destep;
71 edm::LogVerbatim(
"ForwardSim") <<
"TotemT2ScintSD: edep= " << destep <<
":" << weight <<
":" << edep;
79 edm::LogVerbatim(
"ForwardSim") <<
"TotemT2ScintSD: zside " << zside <<
" layer " << lay <<
" phi " << iphi <<
" ID "
Log< level::Info, true > LogVerbatim
uint32_t setDetUnitId(const G4Step *step) override
double getEnergyDeposit(const G4Step *) override
uint16_t *__restrict__ id
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
TotemT2ScintSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void setNumberingScheme(TotemT2ScintNumberingScheme *scheme)
T getParameter(std::string const &) const
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
std::unique_ptr< TotemT2ScintNumberingScheme > numberingScheme