31 #include "EventAction.hh"
33 #include "RunAction.hh"
34 #include "PrimaryGeneratorAction.hh"
35 #include "EventActionMessenger.hh"
36 #include "HistoManager.hh"
45 :detector(det), runAct(run), primary(prim), histoManager(hist)
78 if (size < nbOfPixels) {
83 for (
G4int k=0; k<nbOfPixels; k++) {
101 for (
G4int i1=0; i1<n1pxl; i1++) {
104 for (
G4int i2=0; i2<n2pxl; i2++) {
105 G4int k = i1*n1shift + i2;
109 if (count > 1)
return;
117 for (
G4int i1=0; i1<n1pxl; i1++) {
121 for (
G4int i2=0; i2<n2pxl; i2++) {
122 G4int k = i1*n1shift + i2;
172 G4String fileName = name +
".pixels.ascii";
174 std::ofstream File(fileName, std::ios::app);
175 std::ios::fmtflags mode = File.flags();
176 File.setf( std::ios::scientific, std::ios::floatfield );
189 File << ekin <<
" " << direction <<
" " << position <<
G4endl;
193 G4int firedPixels = 0;
195 for (
G4int k=0; k<nbOfPixels; k++) {
198 File << firedPixels <<
G4endl;
202 for (
G4int k=0; k<nbOfPixels; k++) {
209 File.setf(mode,std::ios::floatfield);
210 File.precision(prec);
void FillNtuple(G4int id, G4int column, G4double value)
void BeginOfEventAction(const G4Event *)
void fillNbRadLen(G4double)
CLHEP::Hep3Vector G4ThreeVector
void AddRowNtuple(G4int id)
void FillHisto(G4int id, G4double bin, G4double weight=1.0)
void fillPerEvent_1(G4int, G4double, G4double)
G4ThreeVector GetParticlePosition()
void fillPerEvent_2(G4int, G4double, G4double)
HistoManager * histoManager
void EndOfEventAction(const G4Event *)
void SetWriteFile(G4bool)
G4ParticleMomentum GetParticleMomentumDirection() const
G4GLOB_DLL std::ostream G4cout
PrimaryGeneratorAction * primary
std::vector< G4double > totalEnergy
DetectorConstruction * detector
EventActionMessenger * eventMessenger
void WritePixels(const G4Event *)
G4int GetSizeVectorPixels()
G4ParticleGun * GetParticleGun()
void SetWriteFile(G4bool val)
std::vector< G4double > visibleEnergy
Detector construction class to demonstrate various ways of placement.
void fillPerEvent_3(G4double, G4double, G4double)
G4double GetParticleEnergy() const