18 #include "G4Material.hh" 19 #include "G4LogicalVolumeStore.hh" 20 #include "CLHEP/Units/GlobalSystemOfUnits.h" 28 CaloSD(name, cpv, clg, p, manager), initialize_(
true) {
39 edm::LogInfo(
"HGCSim") <<
"HGCalTB16SD01:: Use of Birks law is set to " 40 << useBirk_ <<
" for " << matName_
41 <<
" with three constants kB = " << birk1_
42 <<
", C1 = " << birk2_ <<
", C2 = " <<
birk3_;
47 auto const point = aStep->GetPreStepPoint();
49 double destep = aStep->GetTotalEnergyDeposit();
50 double wt2 = aStep->GetTrack()->GetWeight();
51 double weight = (wt2 > 0.0) ? wt2 : 1.0;
57 <<
point->GetTouchable()->GetVolume()->GetName() <<
" with " 58 <<
point->GetMaterial()->GetName() <<
" weight " << weight
59 <<
":" << wt2 << std::endl;
66 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
67 const G4VTouchable* touch = preStepPoint->GetTouchable();
69 int det(1),
x(0),
y(0);
70 int lay = (touch->GetReplicaNumber(0));
78 if (x < 0) { ix = 1;
ixx =-
x;}
80 if (y < 0) { iy = 1;
iyy =-
y;}
81 uint32_t
idx = (det&15)<<28;
89 std::cout <<
"HGCalTB16SD01: Detector " << det <<
" Layer " << lay <<
" x " 90 << x <<
" " << ix <<
" " <<
ixx <<
" y " << y <<
" " << iy <<
" " 91 <<
iyy <<
" ID " << std::hex << idx <<
std::dec << std::endl;
101 y = (idx>>10)&511;
if (((idx>>19)&1) == 1) y = -
y;
102 x = (
idx)&511;
if (((idx>>9)&1) == 1) x = -
x;
107 if (
matName_ == point->GetMaterial()->GetName()) {
113 <<
" is initialized to : " <<
matScin_ << std::endl;
T getParameter(std::string const &) const
double getEnergyDeposit(const G4Step *) override
Compact representation of the geometrical detector hierarchy.
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
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 setDetUnitId(const G4Step *step) override
HGCalTB16SD01(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void initialize(const G4StepPoint *point)
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
static uint32_t packIndex(int det, int lay, int x, int y)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point