35 #include "G4HCofThisEvent.hh"
45 std::fstream* XAluminumElectrodeSensitivity::fWriter = 0;
46 std::fstream* XAluminumElectrodeSensitivity::fWriter2 = 0;
60 fWriter =
new std::fstream(
"caustic.ssv",std::fstream::out|std::fstream::ate);
61 if (!fWriter->is_open()) {
62 G4cerr <<
"XAluminumElectrodeSensitivity::Constructor:"
63 <<
"\n\tFailed to open caustic.ssv for appending data."
64 <<
"\n\tCreating caustic.ssv" <<
G4endl;
65 fWriter->open(
"caustic.ssv");
68 fWriter2 =
new std::fstream(
"timing.ssv",std::fstream::out|std::fstream::ate);
69 if (!fWriter2->is_open()) {
70 G4cerr <<
"XAluminumElectrodeSensitivity::Constructor: "
71 <<
"\n\tFailed to open timing.ssv for appending data."
72 <<
"\n\tCreating timing.ssv." <<
G4endl;
73 fWriter2->open(
"timing.ssv");
76 if (!(fWriter->is_open() && fWriter2->is_open())) {
77 G4cerr <<
"XAluminumElectrodeSensitivity::Constructor: "
78 <<
"\nERROR: COULD NOT CREATE OUTPUT FILES FOR WRITING" <<
G4endl;
89 delete fWriter; fWriter = 0;
94 delete fWriter2; fWriter2 = 0;
102 return fHitsCollection;
124 if(edp==0.)
return true;
140 fHitsCollection->
insert(aHit);
148 if (!fHitsCollection || fHitsCollection->
GetSize()==0)
return;
150 for (
size_t i=0; i<fHitsCollection->
GetSize(); i++) {
G4String SensitiveDetectorName
static constexpr double mm
G4int GetCollectionID(G4String colName)
XAluminumElectrodeSensitivity(const G4String &)
G4double GetNonIonizingEnergyDeposit() const
const G4VTouchable * GetTouchable() const
#define G4MUTEX_INITIALIZER
G4StepPoint * GetPreStepPoint() const
void insert(G4String str)
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
const G4ThreeVector & GetPosition() const
virtual G4VHit * GetHit(size_t i) const
void WriteHitInfo(const XAluminumElectrodeHit *aHit)
XAluminumElectrodeHitsCollection * GetHitsCollection()
static constexpr double eV
G4THitsCollection< XAluminumElectrodeHit > XAluminumElectrodeHitsCollection
Definition of the XAluminumElectrodeHit class.
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
Definition of the XAluminumElectrodeSensitivity class.
G4StepPoint * GetPostStepPoint() const
static G4SDManager * GetSDMpointer()
virtual void Initialize(G4HCofThisEvent *)
G4double GetGlobalTime() const
const G4AffineTransform & GetTopTransform() const
G4CollectionNameVector collectionName
const G4NavigationHistory * GetHistory() const
virtual void EndOfEvent(G4HCofThisEvent *)
virtual ~XAluminumElectrodeSensitivity()
virtual size_t GetSize() const
G4GLOB_DLL std::ostream G4cerr