|
|
Go to the documentation of this file.
25 #include "G4VProcess.hh"
27 #include "G4SystemOfUnits.hh"
50 if (
name ==
"EcalHitsEB") {
53 }
else if (
name ==
"HcalHits") {
63 edm::LogVerbatim(
"HcalTBSim") <<
"***************************************************\n"
65 <<
"* Constructing a HcalTB02SD with name " << GetName() <<
"\n"
67 <<
"***************************************************";
69 <<
" with three constants kB = " <<
birk1_ <<
", C1 = " <<
birk2_
78 throw cms::Exception(
"Unknown",
"HcalTB02SD") <<
"Cannot find HcalTB02Parameters\n";
89 auto const preStepPoint = aStep->GetPreStepPoint();
90 std::string nameVolume = static_cast<std::string>(preStepPoint->GetPhysicalVolume()->GetName());
98 double edep = aStep->GetTotalEnergyDeposit() *
weight;
100 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD:: " << nameVolume <<
" Light Collection Efficiency " <<
weight
101 <<
" Weighted Energy Deposit " << edep /
CLHEP::MeV <<
" MeV";
112 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD: updates numbering scheme for " << GetName();
119 G4ThreeVector localPoint =
setToLocal(stepPoint->GetPosition(), stepPoint->GetTouchable());
121 double dapd = 0.5 * crlength - localPoint.z();
122 if (dapd >= -0.1 || dapd <= crlength + 0.1) {
124 weight = 1.05 - dapd * 0.0005;
126 edm::LogWarning(
"HcalTBSim") <<
"HcalTB02SD: light coll curve : wrong "
127 <<
"distance to APD " << dapd <<
" crlength = " << crlength
128 <<
" crystal name = " << nameVolume <<
" z of localPoint = " << localPoint.z()
129 <<
" take weight = " <<
weight;
132 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02SD, light coll curve : " << dapd <<
" crlength = " << crlength
133 <<
" crystal name = " << nameVolume <<
" z of localPoint = " << localPoint.z()
134 <<
" take weight = " <<
weight;
140 double length = 230.;
T const * product() const
std::unique_ptr< HcalTB02NumberingScheme > numberingScheme_
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
T getUntrackedParameter(std::string const &, T const &) const
void setNumberingScheme(HcalTB02NumberingScheme *scheme)
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
const HcalTB02Parameters * hcalTB02Parameters_
double getEnergyDeposit(const G4Step *) override
std::map< std::string, double > lengthMap_
uint32_t setDetUnitId(const G4Step *step) override
double curve_LY(const std::string &, const G4StepPoint *)
HcalTB02SD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
double crystalLength(const std::string &)
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