17 #include "cetlib_except/exception.h" 25 #include "Geant4/G4SDManager.hh" 26 #include "Geant4/Randomize.hh" 27 #include "Geant4/G4RandomTools.hh" 34 : G4VSensitiveDetector(DetectorUniqueName)
37 G4SDManager::GetSDMpointer()->AddNewDetector(
this);
39 if(ModelName ==
"OverlaidWireplanes")
42 else if(ModelName ==
"TransparentPlaneAction")
53 throw cet::exception(
"OpParamSD")<<
"Error: Optical parameterization model " << ModelName <<
" not found.\n";
64 const G4Track* aTrack = aStep->GetTrack();
65 const G4DynamicParticle* aParticle = aTrack->GetDynamicParticle();
68 G4ThreeVector mom = aParticle->GetMomentumDirection();
69 G4ThreeVector pos = aStep->GetPostStepPoint()->GetPosition();
80 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
virtual void Initialize(G4HCofThisEvent *)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
contains objects relating to OpDet hits
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