9 #include "G4LogicalVolume.hh"
10 #include "G4LogicalVolumeStore.hh"
11 #include "G4ParticleTable.hh"
13 #include "G4VProcess.hh"
15 #include "G4PhysicalConstants.hh"
16 #include "G4SystemOfUnits.hh"
31 (float)(p.getParameter<edm::
ParameterSet>(
"AHCalSD").getParameter<double>(
"TimeSliceUnit")),
32 p.getParameter<edm::
ParameterSet>(
"AHCalSD").getParameter<bool>(
"IgnoreTrackID")) {
40 edm::LogVerbatim(
"HcalSim") <<
"AHCalSD:: Use of Birks law is set to " << useBirk
41 <<
" with three constants kB = " << birk1 <<
", C1 = " << birk2 <<
", C2 = " << birk3
42 <<
"\nAHCalSD:: Threshold for storing"
47 double destep = aStep->GetTotalEnergyDeposit();
48 double wt2 = aStep->GetTrack()->GetWeight();
49 double weight = (wt2 > 0.0) ? wt2 : 1.0;
58 double edep = weight * destep;
63 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
64 const G4VTouchable* touch = preStepPoint->GetTouchable();
66 int depth = (touch->GetReplicaNumber(1));
71 int col = (jncol == 0) ? incol : -incol;
72 int row = (jnrow == 0) ? inrow : -inrow;
76 <<
" column = " << col <<
" packed index = 0x" << std::hex << index <<
std::dec;
78 edm::LogVerbatim(
"HcalSim") <<
"Results from unpacker for 0x" << std::hex << index << std::dec <<
" Flag " << flag
79 <<
" Row " << row <<
" Col " << col <<
" Depth " <<
depth;
88 row = col = depth = 0;
96 <<
" Column " << col <<
" Depth " << depth <<
" OK " << rcode;
Log< level::Info, true > LogVerbatim
static constexpr int kSignRowColumn_
constexpr uint32_t rawId() const
get the raw id
int irow() const
get the row number
static constexpr int kRow_
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 depth() const
get the layer number
int icol() const
get the column number
AHCalSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
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
static constexpr int kRowColumn_
T getParameter(std::string const &) const
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
static constexpr int kSign_
static constexpr int kColumn_
Constants used.
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