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,
25 p.getParameter<
edm::
ParameterSet>(
"AHCalSD").getParameter<bool>(
"IgnoreTrackID")) {
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();
64 G4ThreeVector hitPoint = preStepPoint->GetPosition();
66 int depth = (touch->GetReplicaNumber(1));
67 int incol = ((touch->GetReplicaNumber(0))%10);
68 int inrow = ((touch->GetReplicaNumber(0))/10)%10;
69 int jncol = ((touch->GetReplicaNumber(0))/100)%10;
70 int jnrow = ((touch->GetReplicaNumber(0))/1000)%10;
71 int col = (jncol == 0) ? incol : -incol;
72 int row = (jnrow == 0) ? inrow : -inrow;
76 <<
" depth = " << depth <<
" row = " << row
77 <<
" column = " << col <<
" packed index = 0x" 78 << std::hex << index <<
std::dec << std::endl;
80 edm::LogInfo(
"HcalSim") <<
"Results from unpacker for 0x" << std::hex
81 << index <<
std::dec <<
" Flag " << flag <<
" Row " 82 << row <<
" Col " << col <<
" Depth " << depth
93 row = col = depth = 0;
100 edm::LogInfo(
"HcalSim") <<
"AHCalSD: packed index = 0x" << std::hex << idx
101 <<
std::dec <<
" Row " << row <<
" Column " << col
102 <<
" Depth " << depth <<
" OK " << rcode << std::endl;
T getParameter(std::string const &) const
int irow() const
get the row number
type of data representation of DDCompactView
virtual bool filterHit(CaloG4Hit *, double)
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 ####.
virtual uint32_t setDetUnitId(G4Step *step)
G4StepPoint * preStepPoint
virtual double getEnergyDeposit(G4Step *)
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