Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:24

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 /// \file optical/wls/include/WLSRun.hh
0028 /// \brief Definition of the WLSRun class
0029 //
0030 
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0032 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0033 
0034 #ifndef WLSRun_h
0035 #define WLSRun_h 1
0036 
0037 #include "G4Run.hh"
0038 
0039 class WLSRun : public G4Run
0040 {
0041   public:
0042     WLSRun() = default;
0043     ~WLSRun() override = default;
0044 
0045     void AddTIR(G4int n)
0046     {
0047       G4double nd(n);
0048       fNTIR += nd;
0049       fNTIR2 += nd * nd;
0050     };
0051     void AddExiting(G4int n)
0052     {
0053       G4double nd(n);
0054       fNExiting += nd;
0055       fNExiting2 += nd * nd;
0056     };
0057     void AddEscapedEnd(G4int n)
0058     {
0059       G4double nd(n);
0060       fEscapedEnd += nd;
0061       fEscapedEnd2 += nd * nd;
0062     };
0063     void AddEscapedMid(G4int n)
0064     {
0065       G4double nd(n);
0066       fEscapedMid += nd;
0067       fEscapedMid2 += nd * nd;
0068     };
0069     void AddBounce(G4int n)
0070     {
0071       G4double nd(n);
0072       fBounce += nd;
0073       fBounce2 += nd * nd;
0074     };
0075     void AddWLSBounce(G4int n)
0076     {
0077       G4double nd(n);
0078       fWLSBounce += nd;
0079       fWLSBounce2 += nd * nd;
0080     };
0081     void AddClad1Bounce(G4int n)
0082     {
0083       G4double nd(n);
0084       fClad1Bounce += nd;
0085       fClad1Bounce2 += nd * nd;
0086     };
0087     void AddClad2Bounce(G4int n)
0088     {
0089       G4double nd(n);
0090       fClad2Bounce += nd;
0091       fClad2Bounce2 += nd * nd;
0092     };
0093     void AddReflected(G4int n)
0094     {
0095       G4double nd(n);
0096       fReflected += nd;
0097       fReflected2 += nd * nd;
0098     };
0099     void AddEscaped(G4int n)
0100     {
0101       G4double nd(n);
0102       fEscaped += nd;
0103       fEscaped2 += nd * nd;
0104     };
0105     void AddMirror(G4int n)
0106     {
0107       G4double nd(n);
0108       fMirror += nd;
0109       fMirror2 += nd * nd;
0110     };
0111     void AddDetectorHits(G4int n)
0112     {
0113       G4double nd(n);
0114       fDetectorHits += nd;
0115       fDetectorHits2 += nd * nd;
0116     };
0117 
0118     void EndOfRun();
0119     void Merge(const G4Run*) override;
0120 
0121   private:
0122     G4double fNTIR = 0.;
0123     G4double fNTIR2 = 0.;
0124     G4double fNExiting = 0.;
0125     G4double fNExiting2 = 0.;
0126     G4double fEscapedEnd = 0.;
0127     G4double fEscapedEnd2 = 0.;
0128     G4double fEscapedMid = 0.;
0129     G4double fEscapedMid2 = 0.;
0130     G4double fBounce = 0.;
0131     G4double fBounce2 = 0.;
0132     G4double fWLSBounce = 0.;
0133     G4double fWLSBounce2 = 0.;
0134     G4double fClad1Bounce = 0.;
0135     G4double fClad1Bounce2 = 0.;
0136     G4double fClad2Bounce = 0.;
0137     G4double fClad2Bounce2 = 0.;
0138     G4double fReflected = 0.;
0139     G4double fReflected2 = 0.;
0140     G4double fEscaped = 0.;
0141     G4double fEscaped2 = 0.;
0142     G4double fMirror = 0.;
0143     G4double fMirror2 = 0.;
0144     G4double fDetectorHits = 0.;
0145     G4double fDetectorHits2 = 0.;
0146 };
0147 
0148 #endif