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;
45 double destep = aStep->GetTotalEnergyDeposit();
46 double wt2 = aStep->GetTrack()->GetWeight();
47 double weight = (wt2 > 0.0) ? wt2 : 1.0;
53 edm::LogInfo(
"HcalSim") <<
"AHCalSD: weight " << weight0 <<
" " << weight
56 double edep = weight*destep;
63 const G4VTouchable* touch = preStepPoint->GetTouchable();
65 int depth = (touch->GetReplicaNumber(1));
66 int incol = ((touch->GetReplicaNumber(0))%10);
67 int inrow = ((touch->GetReplicaNumber(0))/10)%10;
68 int jncol = ((touch->GetReplicaNumber(0))/100)%10;
69 int jnrow = ((touch->GetReplicaNumber(0))/1000)%10;
70 int col = (jncol == 0) ? incol : -incol;
71 int row = (jnrow == 0) ? inrow : -inrow;
75 <<
" depth = " << depth <<
" row = " << row
76 <<
" column = " << col <<
" packed index = 0x" 77 << std::hex << index <<
std::dec << std::endl;
79 edm::LogInfo(
"HcalSim") <<
"Results from unpacker for 0x" << std::hex
80 << index <<
std::dec <<
" Flag " << flag <<
" Row " 81 << row <<
" Col " << col <<
" Depth " << depth
92 row = col = depth = 0;
99 edm::LogInfo(
"HcalSim") <<
"AHCalSD: packed index = 0x" << std::hex << idx
100 <<
std::dec <<
" Row " << row <<
" Column " << col
101 <<
" Depth " << depth <<
" OK " << rcode << std::endl;
T getParameter(std::string const &) const
uint32_t setDetUnitId(G4Step *step) override
int irow() const
get the row number
type of data representation of DDCompactView
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
uint32_t rawId() const
get the raw id
int icol() const
get the column number
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
AHCalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
def gen(fragment, howMuch)
Production test section ####.
double getEnergyDeposit(G4Step *) override
G4StepPoint * preStepPoint
Detector det() const
get the detector field from this detid
bool unpackIndex(const uint32_t &idx, int &row, int &col, int &depth)
double getEnergyDeposit() const