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_;
49 G4StepPoint*
point = aStep->GetPreStepPoint();
51 double destep = aStep->GetTotalEnergyDeposit();
52 double wt2 = aStep->GetTrack()->GetWeight();
53 double weight = (wt2 > 0.0) ? wt2 : 1.0;
59 << point->GetTouchable()->GetVolume()->GetName() <<
" with " 60 << point->GetMaterial()->GetName() <<
" weight " << weight
61 <<
":" << wt2 << std::endl;
69 const G4VTouchable* touch = preStepPoint->GetTouchable();
70 G4String
name = preStepPoint->GetPhysicalVolume()->GetName();
72 int det(1),
x(0),
y(0);
73 int lay = (touch->GetReplicaNumber(0));
81 if (x < 0) { ix = 1;
ixx =-
x;}
83 if (y < 0) { iy = 1;
iyy =-
y;}
84 uint32_t
idx = (det&15)<<28;
92 std::cout <<
"HGCalTB16SD01: Detector " << det <<
" Layer " << lay <<
" x " 93 << x <<
" " << ix <<
" " <<
ixx <<
" y " << y <<
" " << iy <<
" " 94 <<
iyy <<
" ID " << std::hex << idx <<
std::dec << std::endl;
104 y = (idx>>10)&511;
if (((idx>>19)&1) == 1) y = -
y;
105 x = (
idx)&511;
if (((idx>>9)&1) == 1) x = -
x;
110 if (
matName_ == point->GetMaterial()->GetName()) {
116 <<
" is initialized to : " <<
matScin_ << std::endl;
T getParameter(std::string const &) const
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3)
type of data representation of DDCompactView
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
G4StepPoint * preStepPoint
HGCalTB16SD01(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void initialize(const G4StepPoint *point)
~HGCalTB16SD01() override
double getEnergyDeposit(G4Step *) override
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