13 #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"
29 : G4VSensitiveDetector(DetectorUniqueName)
32 G4SDManager::GetSDMpointer()->AddNewDetector(
this);
34 if(ModelName ==
"OverlaidWireplanes")
37 else if(ModelName ==
"TransparentPlaneAction")
48 throw cet::exception(
"OpParamSD")<<
"Error: Optical parameterization model " << ModelName <<
" not found.\n";
59 const G4Track* aTrack = aStep->GetTrack();
60 const G4DynamicParticle* aParticle = aTrack->GetDynamicParticle();
63 G4ThreeVector mom = aParticle->GetMomentumDirection();
64 G4ThreeVector pos = aStep->GetPostStepPoint()->GetPosition();
75 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)