24 #include "G4VProcess.hh" 26 #include <CLHEP/Units/SystemOfUnits.h> 39 :
CaloSD(
name, clg,
p, manager), hcalTB02Parameters_(es) {
49 if (
name ==
"EcalHitsEB") {
52 }
else if (
name ==
"HcalHits") {
62 edm::LogVerbatim(
"HcalTBSim") <<
"***************************************************\n" 64 <<
"* Constructing a HcalTB02SD with name " << GetName() <<
"\n" 66 <<
"***************************************************";
68 <<
" with three constants kB = " <<
birk1_ <<
", C1 = " <<
birk2_ 80 auto const preStepPoint = aStep->GetPreStepPoint();
89 double edep = aStep->GetTotalEnergyDeposit() *
weight;
91 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD:: " << nameVolume <<
" Light Collection Efficiency " <<
weight 92 <<
" Weighted Energy Deposit " << edep / CLHEP::MeV <<
" MeV";
103 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD: updates numbering scheme for " << GetName();
110 G4ThreeVector localPoint =
setToLocal(stepPoint->GetPosition(), stepPoint->GetTouchable());
112 double dapd = 0.5 * crlength - localPoint.z();
113 if (dapd >= -0.1 || dapd <= crlength + 0.1) {
115 weight = 1.05 - dapd * 0.0005;
117 edm::LogWarning(
"HcalTBSim") <<
"HcalTB02SD: light coll curve : wrong " 118 <<
"distance to APD " << dapd <<
" crlength = " << crlength
119 <<
" crystal name = " << nameVolume <<
" z of localPoint = " << localPoint.z()
120 <<
" take weight = " <<
weight;
123 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD, light coll curve : " << dapd <<
" crlength = " << crlength
124 <<
" crystal name = " << nameVolume <<
" z of localPoint = " << localPoint.z()
125 <<
" take weight = " <<
weight;
131 double length = 230.;
Log< level::Info, true > LogVerbatim
double curve_LY(const std::string &, const G4StepPoint *)
double getEnergyDeposit(const G4Step *) override
double crystalLength(const std::string &)
HcalTB02SD(const std::string &, const HcalTB02Parameters *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
uint32_t setDetUnitId(const G4Step *step) 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
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< HcalTB02NumberingScheme > numberingScheme_
std::map< std::string, double > lengthMap_
void setNumberingScheme(HcalTB02NumberingScheme *scheme)
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
const HcalTB02Parameters * hcalTB02Parameters_
Log< level::Warning, false > LogWarning