Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-08 07:54:06

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 /// \file RE06Run.hh
0027 /// \brief Definition of the RE06Run class
0028 
0029 #ifndef RE06Run_h
0030 #define RE06Run_h 1
0031 
0032 #include "G4Run.hh"
0033 #include "G4THitsMap.hh"
0034 #include "globals.hh"
0035 
0036 class G4Event;
0037 
0038 class RE06Run : public G4Run
0039 {
0040   public:
0041     RE06Run();
0042     virtual ~RE06Run();
0043 
0044     virtual void RecordEvent(const G4Event*);
0045     virtual void Merge(const G4Run*);
0046 
0047     G4double GetTotalE(G4int i) const { return GetTotal(fMapSum[i][0]); }
0048     G4double GetNGamma(G4int i) const { return GetTotal(fMapSum[i][1]); }
0049     G4double GetNElectron(G4int i) const { return GetTotal(fMapSum[i][2]); }
0050     G4double GetNPositron(G4int i) const { return GetTotal(fMapSum[i][3]); }
0051     G4double GetTotalL(G4int i) const { return GetTotal(fMapSum[i][4]); }
0052     G4double GetNStep(G4int i) const { return GetTotal(fMapSum[i][5]); }
0053 
0054     G4double GetEMinGamma(G4int i) const { return FindMinimum(fMapMin[i][0]); }
0055     G4double GetEMinElectron(G4int i) const { return FindMinimum(fMapMin[i][1]); }
0056     G4double GetEMinPositron(G4int i) const { return FindMinimum(fMapMin[i][2]); }
0057 
0058     G4double GetParaValue(G4int i, G4int j, G4int k) const
0059     {
0060       G4double* p = fMapPara[i][j][k];
0061       if (p) return *p;
0062       return 0.;
0063     }
0064 
0065   private:
0066     G4double GetTotal(const G4THitsMap<G4double>& map) const;
0067     G4double FindMinimum(const G4THitsMap<G4double>& map) const;
0068 
0069     // Maps for accumulation
0070     // fMapSum[i][j]
0071     //  i = 0 : Calor-A_abs    j = 0 : total eDep
0072     //  i = 1 : Calor-A_gap    j = 1 : number of gamma
0073     //  i = 2 : Calor-B_abs    j = 2 : number of electron
0074     //  i = 3 : Calor-B_gap    j = 3 : number of positron
0075     //  i = 4 : Calor-C_abs    j = 4 : total step length for e+/e-
0076     //  i = 5 : Calor-C_gap    j = 5 : total number of steps for e+/e-
0077     G4THitsMap<G4double> fMapSum[6][6];
0078     G4int fColIDSum[6][6];
0079 
0080     // Maps for minimum value
0081     //  i = 0 : Calor-A_abs    j = 0 : minimum kinE at generation for gamma
0082     //  i = 1 : Calor-A_gap    j = 1 : minimum kinE at generation for electron
0083     //  i = 2 : Calor-B_abs    j = 2 : minimum kinE at generation for positron
0084     //  i = 3 : Calor-B_gap
0085     //  i = 4 : Calor-C_abs
0086     //  i = 5 : Calor-C_gap
0087     G4THitsMap<G4double> fMapMin[6][3];
0088     G4int fColIDMin[6][3];
0089 
0090     // Maps for accumulation in parallel world
0091     // fMapPara[i][j]
0092     //  i = 0 : Calor-AP_para    j = 0 : total eDep
0093     //  i = 1 : Calor-BP_para    j = 1 : number of gamma
0094     //  i = 2 : Calor-CP_para    j = 2 : number of electron
0095     //                          j = 3 : number of positron
0096     //                          j = 4 : total step length for e+/e-
0097     //                          j = 5 : total number of steps for e+/e-
0098     G4THitsMap<G4double> fMapPara[3][6];
0099     G4int fColIDPara[3][6];
0100 };
0101 
0102 #endif