14 #include "cetlib_except/exception.h" 17 #include "Geant4/G4DynamicParticle.hh" 18 #include "Geant4/G4SDManager.hh" 19 #include "Geant4/G4Step.hh" 20 #include "Geant4/G4StepPoint.hh" 21 #include "Geant4/G4ThreeVector.hh" 22 #include "Geant4/G4Track.hh" 23 #include "Geant4/G4TrackStatus.hh" 28 std::string ModelName,
31 : G4VSensitiveDetector(DetectorUniqueName)
34 G4SDManager::GetSDMpointer()->AddNewDetector(
this);
36 if (ModelName ==
"OverlaidWireplanes")
39 else if (ModelName ==
"TransparentPlaneAction")
49 <<
"Error: Optical parameterization model " << ModelName <<
" not found.\n";
58 const G4Track* aTrack = aStep->GetTrack();
59 const G4DynamicParticle* aParticle = aTrack->GetDynamicParticle();
61 G4ThreeVector mom = aParticle->GetMomentumDirection();
62 G4ThreeVector pos = aStep->GetPostStepPoint()->GetPosition();
70 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
virtual void Initialize(G4HCofThisEvent *)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
G4bool G4BooleanRand(const G4double prob) const
std::map< G4int, bool > fPhotonAlreadyCrossed
virtual double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition)
OpParamSD(G4String name, std::string ModelName, int Orientation, std::vector< std::vector< double >> Parameters)
cet::coded_exception< error, detail::translate > exception