8 #include "G4StepPoint.hh" 10 #include "G4ThreeVector.hh" 12 #include "CLHEP/Units/GlobalSystemOfUnits.h" 13 #include "CLHEP/Units/GlobalPhysicalConstants.h" 26 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForPersistencyInGeV") * CLHEP::GeV;
28 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForHistoryInGeV") * CLHEP::GeV;
36 unsigned int detId = 0;
42 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
45 level = ((touch->GetHistoryDepth()) + 1);
53 if (sensorName !=
"PLTSensorPlane")
54 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Sensor name not PLTSensorPlane ";
55 if (telName !=
"Telescope")
56 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Telescope name not Telescope ";
57 if (volumeName !=
"PLT")
58 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Volume name not PLT ";
61 int columnNum = touch->GetReplicaNumber(0);
62 int rowNum = touch->GetReplicaNumber(1);
63 int sensorNum = touch->GetReplicaNumber(2);
64 int telNum = touch->GetReplicaNumber(3);
66 int temp = touch->GetReplicaNumber(5);
78 }
else if (telNum == 1) {
80 }
else if (telNum == 2) {
82 }
else if (telNum == 3) {
84 }
else if (telNum == 4) {
86 }
else if (telNum == 5) {
88 }
else if (telNum == 6) {
90 }
else if (telNum == 7) {
95 int halfCarriageNum = -1;
98 if (telNum == 0 || telNum == 1 || telNum == 2 || telNum == 3)
103 if (halfCarriageNum == 1) {
106 }
else if (telNum == 5) {
108 }
else if (telNum == 6) {
110 }
else if (telNum == 7) {
116 10000000 * pltNum + 1000000 * halfCarriageNum + 100000 * telNum + 10000 * sensorNum + 100 * rowNum + columnNum;
119 <<
"plt:" << pltNum <<
" hc:" << halfCarriageNum <<
" tel:" << telNum
120 <<
" plane:" << sensorNum;
129 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
void setCuts(double eCut, double historyCut)
bool checkHit(const G4Step *, BscG4Hit *) override
const G4ThreeVector & getLocalEntryPoint() const
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
PltSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
std::string getName(const G4String &)
uint32_t setDetUnitId(const G4Step *) override