19 #include "G4SDManager.hh"
20 #include "G4VProcess.hh"
21 #include "G4EventManager.hh"
23 #include "G4VProcess.hh"
29 #include "CLHEP/Units/GlobalSystemOfUnits.h"
39 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForHistoryInGeV") *
GeV;
41 setCuts(energyCut, energyHistoryCut);
50 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
51 int level = (touch) ? ((touch->GetHistoryDepth()) + 1) : 0;
55 G4String sensorName = touch->GetVolume(0)->GetName();
56 G4String diamondName = touch->GetVolume(1)->GetName();
57 G4String detectorName = touch->GetVolume(2)->GetName();
58 G4String volumeName = touch->GetVolume(3)->GetName();
60 if (sensorName !=
"BCM1FSensor") {
61 edm::LogWarning(
"ForwardSim") <<
"Bcm1fSD::setDetUnitId -w- Sensor name not BCM1FSensor ";
63 if (detectorName !=
"BCM1F") {
64 edm::LogWarning(
"ForwardSim") <<
" Bcm1fSD::setDetUnitId -w- Detector name not BCM1F ";
66 int sensorNo = touch->GetReplicaNumber(0);
67 int diamondNo = touch->GetReplicaNumber(1);
68 int volumeNo = touch->GetReplicaNumber(3);
76 detId = 1000 * volumeNo + 10 * diamondNo + sensorNo;
84 static const float tolerance2 = (float)(0.0025 * CLHEP::mm * CLHEP::mm);
const G4ThreeVector & getLocalEntryPoint() const
void setCuts(double eCut, double historyCut)
uint32_t setDetUnitId(const G4Step *) override
Bcm1fSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
bool checkHit(const G4Step *, BscG4Hit *) override
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
const G4ThreeVector & getExitLocalP() const
T getParameter(std::string const &) const
Log< level::Warning, false > LogWarning