Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:17:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
0029 //
0030 // History:
0031 // -----------
0032 //  11 Jul 2003 A.Mantero, code cleaning / Plotter-XML addiction
0033 //     Sep 2002 A.Mantero, AIDA3.0 Migration
0034 //  06 Dec 2001 A.Pfeiffer updated for singleton
0035 //  30 Nov 2001 Guy Barrand : migrate to AIDA-2.2.
0036 //  28 Nov 2001 Elena Guardincerri   Created
0037 //
0038 // -------------------------------------------------------------------
0039 
0040 #ifndef G4PROCESSTESTANALYSIS_HH
0041 #define G4PROCESSTESTANALYSIS_HH
0042 
0043 #include "globals.hh"
0044 #include <vector>
0045 #include "G4ThreeVector.hh"
0046 #include "XrayFluoDataSet.hh"
0047 #include "XrayFluoAnalysisMessenger.hh"
0048 
0049 class G4Step;
0050 class XrayFluoAnalysisMessenger;
0051 
0052 //....oooOO0OOoo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0053 class XrayFluoAnalysisManager
0054 {
0055 public:
0056  
0057   virtual ~XrayFluoAnalysisManager();
0058   
0059   void book();
0060   
0061   void finish();
0062   
0063   //fill histograms with data from XrayFluoSteppingAction
0064   void analyseStepping(const G4Step* aStep);
0065   
0066  //fill histograms with data from XrayFluoEventAction
0067   void analyseEnergyDep(G4double eDep);
0068   
0069  //fill histograms with data from XrayFluoPrimarygeneratorAction
0070   void analysePrimaryGenerator(G4double energy);
0071   
0072   //method to call to create an instance of this class
0073   static XrayFluoAnalysisManager* getInstance();
0074 
0075   // methods to set the flag for the storage of the space of phases into ntuple
0076   inline void PhaseSpaceOn(){phaseSpaceFlag = true;}
0077 
0078   inline void PhaseSpaceOff(){phaseSpaceFlag = false;}
0079 
0080   //method to chenge the name of the output file
0081   void SetOutputFileName(G4String);
0082 
0083   const std::pair<G4double,G4String> GetEmittedParticleEnergyAndType();
0084 
0085   void LoadGunData(G4String, G4bool);
0086 
0087   void SetPhysicFlag(G4bool);
0088 
0089 private:
0090   //private constructor in order to create a singleton
0091   XrayFluoAnalysisManager();
0092 
0093   G4String outputFileName;
0094 
0095   G4bool phaseSpaceFlag;
0096 
0097   G4bool physicFlag;
0098 
0099   std::vector<G4double>* gunParticleEnergies;
0100   std::vector<G4String>* gunParticleTypes;
0101 
0102   //Instance for singleton implementation this is the returned 
0103   static XrayFluoAnalysisManager* instance;
0104   
0105   //pointer to the analysis messenger
0106   XrayFluoAnalysisMessenger* analisysMessenger;
0107 
0108   G4bool dataLoaded;
0109  
0110   G4int fParticleEnergyAndTypeIndex;
0111 
0112 };
0113 #endif
0114 
0115 
0116