ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExGflashHistoManager.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ExGflashHistoManager.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
29 //
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "ExGflashHistoManager.hh"
34 #include "G4SystemOfUnits.hh"
35 #include "G4UnitsTable.hh"
37 
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41  : fFileName("gflash01"),fDet(myDet)
42 {
43  Book();
44 }
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
49 {
51 }
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54 
56 {
57  // Create or get analysis manager
58  // The choice of analysis technology is done via selection of a namespace
59  // in ExGflashHistoManager.hh
60  G4AnalysisManager* fAnalysisManager = G4AnalysisManager::Instance();
61  fAnalysisManager->SetFileName(fFileName);
62  fAnalysisManager->SetVerboseLevel(1);
63  fAnalysisManager->SetActivation(true); // enable inactivation of histograms
64  //
65  // Creating histograms
66  //
67  // const G4int kMaxHisto = 9;
68  // const G4int kMaxProf = 2;
69  G4int nLbin = fDet->GetnLtot();
70  G4int nRbin = fDet->GetnRtot();
71  G4double dLradl = fDet->GetdLradl();
72  G4double dRradl = fDet->GetdRradl();
73 
74 
75  fAnalysisManager->CreateH1( "h0","total energy deposit(percent of Einc)",
76  100,95.,105.);
77 
78  fAnalysisManager->CreateH1( "h1","The number of Hits per event",
79  200,0.,4.0e5);
80 
81  fAnalysisManager->CreateH1( "h2","The energy of Hit (in MeV)",
82  200,0.,10.);
83 
84  // fAnalysisManager->CreateH1( "h3","longit energy profile (% of E inc)",
85  // nLbin,0.,nLbin*dLradl);
86 
87  // fAnalysisManager->CreateH1( "h4","radial energy profile (% of E inc)",
88  // nRbin,0.,nRbin*dRradl);
89 
90  fAnalysisManager->CreateP1( "p0","longit energy profile (% of E inc)",
91  nLbin,0.,nLbin*dLradl, 0., 2000.);
92 
93  fAnalysisManager->CreateP1( "p1","radial energy profile (% of E inc)",
94  nRbin,0.,nRbin*dRradl, 0., 2000.);
95 
96  fAnalysisManager->CreateP1( "p2","Comul longit energy profile (% of E inc)",
97  nLbin,0.,nLbin*dLradl, 0., 20000.);
98 
99  fAnalysisManager->CreateP1( "p3","Cuml radial energy profile (% of E inc)",
100  nRbin,0.,nRbin*dRradl, 0., 20000.);
101 
102  // Create all histograms as inactivated
103  // for (G4int k=0; k<kMaxHisto; k++) {
104  // fAnalysisManager->SetH1Activation(k, false);
105  // }
106  // for (G4int k=0; k<kMaxProf; k++) {
107  // fAnalysisManager->SetP1Activation(k, false);
108  // }
109  G4cout << "\n----> Histogram file " << fFileName << G4endl;
110 }