// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: RunAction.hh,v 1.1 2003/10/08 17:28:37 maire Exp $ // GEANT4 tag $Name: geant4-06-00 $ // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... // 08.03.01 Hisaya: Adapted MyVector for STL //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #ifndef RunAction_h #define RunAction_h 1 #include "G4UserRunAction.hh" #include "G4ParticleDefinition.hh" #include "globals.hh" #include typedef std::vector MyVector; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... class DetectorConstruction; class PrimaryGeneratorAction; class G4Run; #ifdef G4ANALYSIS_USE namespace AIDA { class ITree; class IHistogram1D; } #endif class RunAction : public G4UserRunAction { public: RunAction(DetectorConstruction*, PrimaryGeneratorAction*); ~RunAction(); void BeginOfRunAction(const G4Run*); void EndOfRunAction(const G4Run*); inline void initializePerEvent(); void fillPerEvent(); inline void fillPerTrack(G4double,G4double); inline void fillPerStep (G4double,G4int,G4int); inline void particleFlux(G4ParticleDefinition*,G4int); private: void bookHisto(); void cleanHisto(); private: DetectorConstruction* Det; PrimaryGeneratorAction* Kin; G4int nLbin; MyVector dEdL; MyVector sumELongit; MyVector sumE2Longit; MyVector sumELongitCumul; MyVector sumE2LongitCumul; G4int nRbin; MyVector dEdR; MyVector sumERadial; MyVector sumE2Radial; MyVector sumERadialCumul; MyVector sumE2RadialCumul; MyVector gammaFlux; MyVector electronFlux; MyVector positronFlux; G4double ChargTrLength; G4double sumChargTrLength; G4double sum2ChargTrLength; G4double NeutrTrLength; G4double sumNeutrTrLength; G4double sum2NeutrTrLength; #ifdef G4ANALYSIS_USE AIDA::ITree* tree; // the tree should only be deleted at the end AIDA::IHistogram1D* histo[12]; // (after writing the histos to file) #endif }; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... inline void RunAction::initializePerEvent() { //initialize arrays of energy deposit per bin for (G4int i=0; i