Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:14

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 #ifndef G4TScoreHistFiller_h
0028 #define G4TScoreHistFiller_h 1
0029 
0030 #include "G4VScoreHistFiller.hh"
0031 #include "globals.hh"
0032 
0033 #include <memory>
0034 
0035 // class description:
0036 //
0037 // This class implements filling histogram
0038 // In order to avoid introducing dependency on the analysis category,
0039 // the analysis manager type is defined via template.
0040 //
0041 // Created : M. Asai (Sept. 2020)
0042 //
0043 
0044 template <typename T>
0045 class G4TScoreHistFiller : public G4VScoreHistFiller
0046 {
0047  public:
0048   G4TScoreHistFiller() = default;
0049   virtual ~G4TScoreHistFiller() = default;
0050 
0051   // methods
0052   virtual void FillH1(G4int id, G4double value, G4double weight = 1.0);
0053   virtual void FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight = 1.0);
0054   virtual void FillH3(
0055     G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight = 1.0);
0056   virtual void FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight = 1.0);
0057   virtual void FillP2(
0058     G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight = 1.0);
0059 
0060   virtual G4bool CheckH1(G4int id);
0061   virtual G4bool CheckH2(G4int id);
0062   virtual G4bool CheckH3(G4int id);
0063   virtual G4bool CheckP1(G4int id);
0064   virtual G4bool CheckP2(G4int id);
0065 
0066   void SetVerboseLevel(G4int value);
0067   G4int GetVerboseLevel() const { return fVerboseLevel; }
0068 
0069  protected:
0070   // methods
0071   virtual G4VScoreHistFiller* CreateInstance() const;
0072 
0073  private:
0074   // methods
0075   void CreateAnalysisManager();
0076 
0077   // data members
0078   T* fAnalysisManager = nullptr;
0079   G4int fVerboseLevel = 0;
0080   G4bool fIsInitialized = false;
0081 };
0082 
0083 #include "G4TScoreHistFiller.icc"
0084 
0085 #endif