Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-31 07:50:43

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 WLSEventAction.hh
0027 /// \brief Definition of the WLSEventAction class
0028 
0029 #ifndef WLSEventAction_h
0030 #define WLSEventAction_h 1
0031 
0032 #include "G4Types.hh"
0033 #include "G4UserEventAction.hh"
0034 
0035 class WLSEventActionMessenger;
0036 
0037 class WLSEventAction : public G4UserEventAction
0038 {
0039   public:
0040     WLSEventAction();
0041     ~WLSEventAction() override;
0042 
0043     void BeginOfEventAction(const G4Event*) override;
0044     void EndOfEventAction(const G4Event*) override;
0045 
0046     G4int GetEventNo();
0047     void SetEventVerbose(G4int);
0048 
0049     void AddTIR() { fNTIR += 1; };
0050     void AddExiting() { fNExiting += 1; };
0051     void AddEscapedEnd() { fEscapedEnd += 1; };
0052     void AddEscapedMid() { fEscapedMid += 1; };
0053     void AddBounce() { fBounce += 1; };
0054     void AddWLSBounce() { fWLSBounce += 1; };
0055     void AddClad1Bounce() { fClad1Bounce += 1; };
0056     void AddClad2Bounce() { fClad2Bounce += 1; };
0057     void AddReflected() { fReflected += 1; };
0058     void AddEscaped() { fEscaped += 1; };
0059     void AddMirror() { fMirror += 1; };
0060 
0061   private:
0062     WLSEventActionMessenger* fEventMessenger = nullptr;
0063 
0064     G4int fVerboseLevel = 0;
0065 
0066     G4int fMPPCCollID = 0;
0067 
0068     G4int fNTIR = 0;
0069     G4int fNExiting = 0;
0070     G4int fEscapedEnd = 0;
0071     G4int fEscapedMid = 0;
0072     G4int fBounce = 0;
0073     G4int fWLSBounce = 0;
0074     G4int fClad1Bounce = 0;
0075     G4int fClad2Bounce = 0;
0076     G4int fReflected = 0;
0077     G4int fEscaped = 0;
0078     G4int fMirror = 0;
0079 };
0080 
0081 #endif