Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:22:12

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 //      GEANT 4 class header file
0029 //      CERN Geneva Switzerland
0030 //     
0031 //
0032 //      ------------ GammaRayTelAnalysis  ------
0033 //           by R.Giannitrapani, F. Longo & G.Santin (30 nov 2000)
0034 //
0035 // 03.04.2013 F.Longo and L.Pandola
0036 // - migrated to G4AnalysisManager
0037 //
0038 // 07.12.2001 A.Pfeiffer
0039 // - integrated Guy's addition of the ntuple
0040 //
0041 // 06.12.2001 A.Pfeiffer
0042 // - updating to new design (singleton)
0043 //
0044 // 22.11.2001 G.Barrand
0045 // - Adaptation to AIDA
0046 // -------------------------------------------------------------------
0047 // Class description:
0048 // Example of analysis in a simulation application (histograms, ntuples etc.)
0049 // This class follows the singleton design pattern; 
0050 // it is responsible for the analysis management and algorithms 
0051 //
0052 // -------------------------------------------------------------------//
0053 
0054 #ifndef GammaRayTelAnalysis_h 
0055 #define GammaRayTelAnalysis_h 1
0056 
0057 #include "globals.hh"
0058 #include <vector>
0059 #include "G4ThreeVector.hh"
0060 #include "G4AnalysisManager.hh"
0061 
0062 class GammaRayTelAnalysisMessenger;
0063 class GammaRayTelDetectorConstruction;
0064 
0065 class GammaRayTelAnalysis {
0066 public:
0067     ~GammaRayTelAnalysis();
0068 
0069     void BeginOfRun();
0070 
0071     void EndOfRun();
0072 
0073     void EndOfEvent(G4int flag);
0074 
0075     void Init();
0076 
0077     void Finish();
0078 
0079     void SetHisto2DMode(G4String value) {
0080         histo2DMode = value;
0081     }
0082 
0083     auto GetHisto2DMode() -> G4String {
0084         return histo2DMode;
0085     }
0086 
0087     void InsertPositionXZ(G4double x, G4double z);
0088 
0089     void InsertPositionYZ(G4double y, G4double z);
0090 
0091     void InsertEnergy(G4double energy);
0092 
0093     void InsertHits(G4int planeNumber);
0094 
0095     void setNtuple(G4double energy, G4int planeNumber, G4double x, G4double y, G4double z);
0096 
0097     static auto getInstance() -> GammaRayTelAnalysis*;
0098 
0099 private:
0100     GammaRayTelAnalysis();
0101 
0102     void Plot();
0103 
0104     static GammaRayTelAnalysis *instance;
0105 
0106     const GammaRayTelDetectorConstruction *detector{nullptr};
0107 
0108     G4String histo2DMode;
0109 
0110     G4String histogramFileName;
0111 
0112     GammaRayTelAnalysisMessenger *analysisMessenger;
0113 };
0114 #endif