20 #include "G4SDManager.hh" 21 #include "G4VProcess.hh" 22 #include "G4EventManager.hh" 24 #include "G4VProcess.hh" 30 #include <CLHEP/Units/SystemOfUnits.h> 39 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForPersistencyInGeV") * CLHEP::GeV;
41 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForHistoryInGeV") * CLHEP::GeV;
52 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
53 int level = (touch) ? ((touch->GetHistoryDepth()) + 1) : 0;
62 if (sensorName !=
"BCM1FSensor") {
63 edm::LogWarning(
"ForwardSim") <<
"Bcm1fSD::setDetUnitId -w- Sensor name " << sensorName <<
" not BCM1FSensor ";
68 int sensorNo = touch->GetReplicaNumber(0);
69 int diamondNo = touch->GetReplicaNumber(1);
70 int volumeNo = touch->GetReplicaNumber(3);
78 detId = 1000 * volumeNo + 10 * diamondNo + sensorNo;
86 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);
T getParameter(std::string const &) const
void setCuts(double eCut, double historyCut)
uint32_t setDetUnitId(const G4Step *) override
Bcm1fSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
const G4ThreeVector & getLocalEntryPoint() const
bool checkHit(const G4Step *, BscG4Hit *) override
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
std::string getName(const G4String &)
Log< level::Warning, false > LogWarning