21 #include "G4SDManager.hh" 22 #include "G4VProcess.hh" 23 #include "G4EventManager.hh" 25 #include "G4VProcess.hh" 31 #include "CLHEP/Units/GlobalSystemOfUnits.h" 37 TimingSD(name, cpv, clg, p, manager) {
43 setCuts(energyCut, energyHistoryCut);
54 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
55 int level = (touch) ? ((touch->GetHistoryDepth())+1) : 0;
60 G4String sensorName = touch->GetVolume(0)->GetName();
61 G4String diamondName = touch->GetVolume(1)->GetName();
63 G4String volumeName = touch->GetVolume(3)->GetName();
65 if ( sensorName !=
"BCM1FSensor" ) {
67 <<
"Bcm1fSD::setDetUnitId -w- Sensor name not BCM1FSensor ";
69 if ( detectorName !=
"BCM1F" ) {
71 <<
" Bcm1fSD::setDetUnitId -w- Detector name not BCM1F ";
73 int sensorNo = touch->GetReplicaNumber(0);
74 int diamondNo = touch->GetReplicaNumber(1);
75 int volumeNo = touch->GetReplicaNumber(3);
83 detId = 1000*volumeNo + 10*diamondNo + sensorNo;
92 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);
T getParameter(std::string const &) const
const G4ThreeVector & getLocalEntryPoint() const
void setCuts(double eCut, double historyCut)
Compact representation of the geometrical detector hierarchy.
uint32_t setDetUnitId(const G4Step *) override
bool checkHit(const G4Step *, BscG4Hit *) override
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
const G4ThreeVector & getExitLocalP() const
Bcm1fSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)