7 #include "G4LogicalVolumeStore.hh" 8 #include "G4LogicalVolume.hh" 11 #include "G4ParticleTable.hh" 12 #include "G4VProcess.hh" 14 #include "G4SystemOfUnits.hh" 15 #include "G4PhysicalConstants.hh" 23 CaloSD(name, cpv, clg, p, manager,
34 edm::LogInfo(
"HcalSim") <<
"AHCalSD:: Use of Birks law is set to " 35 << useBirk <<
" with three constants kB = " 36 << birk1 <<
", C1 = " << birk2 <<
", C2 = " << birk3
37 <<
"\nAHCalSD:: Threshold for storing hits: " 38 << eminHit << std::endl;
43 double destep = aStep->GetTotalEnergyDeposit();
44 double wt2 = aStep->GetTrack()->GetWeight();
45 double weight = (wt2 > 0.0) ? wt2 : 1.0;
51 edm::LogInfo(
"HcalSim") <<
"AHCalSD: weight " << weight0 <<
" " << weight
54 double edep = weight*destep;
60 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
61 const G4VTouchable* touch = preStepPoint->GetTouchable();
63 int depth = (touch->GetReplicaNumber(1));
64 int incol = ((touch->GetReplicaNumber(0))%10);
65 int inrow = ((touch->GetReplicaNumber(0))/10)%10;
66 int jncol = ((touch->GetReplicaNumber(0))/100)%10;
67 int jnrow = ((touch->GetReplicaNumber(0))/1000)%10;
68 int col = (jncol == 0) ? incol : -incol;
69 int row = (jnrow == 0) ? inrow : -inrow;
73 <<
" depth = " << depth <<
" row = " << row
74 <<
" column = " << col <<
" packed index = 0x" 75 << std::hex << index <<
std::dec << std::endl;
77 edm::LogInfo(
"HcalSim") <<
"Results from unpacker for 0x" << std::hex
78 << index <<
std::dec <<
" Flag " << flag <<
" Row " 79 << row <<
" Col " << col <<
" Depth " << depth
90 row = col = depth = 0;
97 edm::LogInfo(
"HcalSim") <<
"AHCalSD: packed index = 0x" << std::hex << idx
98 <<
std::dec <<
" Row " << row <<
" Column " << col
99 <<
" Depth " << depth <<
" OK " << rcode << std::endl;
T getParameter(std::string const &) const
constexpr uint32_t rawId() const
get the raw id
int irow() const
get the row number
Compact representation of the geometrical detector hierarchy.
bool filterHit(CaloG4Hit *, double) override
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
int icol() const
get the column number
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
double getEnergyDeposit(const G4Step *) override
uint32_t setDetUnitId(const G4Step *step) override
def gen(fragment, howMuch)
Production test section ####.
AHCalSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
bool unpackIndex(const uint32_t &idx, int &row, int &col, int &depth)
double getEnergyDeposit() const
constexpr Detector det() const
get the detector field from this detid