Geant4  10.01.p02
ExG4HbookP2DummyManager.hh
Go to the documentation of this file.
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 // $Id: ExG4HbookP2DummyManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
27 
30 
31 // Author: Ivana Hrivnacova, 24/07/2014 (ivana@ipno.in2p3.fr)
32 
33 #ifndef ExG4HbookP2DummyManager_h
34 #define ExG4HbookP2DummyManager_h 1
35 
36 #include "G4VP2Manager.hh"
37 
38 namespace tools {
39 namespace histo {
40 class h3d;
41 }
42 }
43 
47 
49 {
50  public:
52  virtual ~ExG4HbookP2DummyManager();
53 
54  protected:
55  // Virtual functions from base class
56  //
57 
58  // Methods to create histograms
59  //
60  virtual G4int CreateP2(const G4String& name, const G4String& title,
61  G4int nxbins, G4double xmin, G4double xmax,
62  G4int nybins, G4double ymin, G4double ymax,
63  G4double zmin = 0, G4double zmax = 0,
64  const G4String& xunitName = "none",
65  const G4String& yunitName = "none",
66  const G4String& zunitName = "none",
67  const G4String& xfcnName = "none",
68  const G4String& yfcnName = "none",
69  const G4String& zfcnName = "none",
70  const G4String& xbinScheme = "linear",
71  const G4String& ybinScheme = "linear");
72 
73  virtual G4int CreateP2(const G4String& name, const G4String& title,
74  const std::vector<G4double>& xedges,
75  const std::vector<G4double>& yedges,
76  G4double zmin = 0, G4double zmax = 0,
77  const G4String& xunitName = "none",
78  const G4String& yunitName = "none",
79  const G4String& zunitName = "none",
80  const G4String& xfcnName = "none",
81  const G4String& yfcnName = "none",
82  const G4String& zfcnName = "none");
83 
84  virtual G4bool SetP2(G4int id,
85  G4int nxbins, G4double xmin, G4double xmax,
86  G4int nybins, G4double ymin, G4double ymax,
87  G4double zmin = 0, G4double zmax = 0,
88  const G4String& xunitName = "none",
89  const G4String& yunitName = "none",
90  const G4String& zunitName = "none",
91  const G4String& xfcnName = "none",
92  const G4String& yfcnName = "none",
93  const G4String& zfcnName = "none",
94  const G4String& xbinScheme = "linear",
95  const G4String& ybinScheme = "linear");
96 
97  virtual G4bool SetP2(G4int id,
98  const std::vector<G4double>& xedges,
99  const std::vector<G4double>& yedges,
100  G4double zmin = 0, G4double zmax = 0,
101  const G4String& xunitName = "none",
102  const G4String& yunitName = "none",
103  const G4String& zunitName = "none",
104  const G4String& xfcnName = "none",
105  const G4String& yfcnName = "none",
106  const G4String& zfcnName = "none");
107 
108  virtual G4bool ScaleP2(G4int id, G4double factor);
109 
110  // Method to fill histograms
111  //
112  virtual G4bool FillP2(G4int id,
113  G4double xvalue, G4double yvalue, G4double zvalue,
114  G4double weight = 1.0);
115 
116 
117  // Methods to manipulate histograms
118  //
119 
120  // Access methods
121  virtual G4int GetP2Id(const G4String& name, G4bool warn = true) const;
122 
123  // Access to P2 parameters
124  virtual G4int GetP2Nxbins(G4int id) const;
125  virtual G4double GetP2Xmin(G4int id) const;
126  virtual G4double GetP2Xmax(G4int id) const;
127  virtual G4double GetP2XWidth(G4int id) const;
128  virtual G4int GetP2Nybins(G4int id) const;
129  virtual G4double GetP2Ymin(G4int id) const;
130  virtual G4double GetP2Ymax(G4int id) const;
131  virtual G4double GetP2YWidth(G4int id) const;
132  virtual G4double GetP2Zmin(G4int id) const;
133  virtual G4double GetP2Zmax(G4int id) const;
134 
135  // Setters for attributes for plotting
136  virtual G4bool SetP2Title(G4int id, const G4String& title);
137  virtual G4bool SetP2XAxisTitle(G4int id, const G4String& title);
138  virtual G4bool SetP2YAxisTitle(G4int id, const G4String& title);
139  virtual G4bool SetP2ZAxisTitle(G4int id, const G4String& title);
140 
141  // Access attributes for plotting
142  virtual G4String GetP2Title(G4int id) const;
143  virtual G4String GetP2XAxisTitle(G4int id) const;
144  virtual G4String GetP2YAxisTitle(G4int id) const;
145  virtual G4String GetP2ZAxisTitle(G4int id) const;
146 
147  // Write data on ASCII file
148  virtual G4bool WriteOnAscii(std::ofstream& output);
149 
150  private:
151  // methods
152  void ExceptionForProfiles(const G4String& functionName);
153  void ExceptionForProfilesConst(const G4String& functionName) const;
154 
155  // data members
157 };
158 
159 #endif
160 
virtual G4String GetP2ZAxisTitle(G4int id) const
virtual G4int CreateP2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")
G4String name
Definition: TRTMaterials.hh:40
virtual G4String GetP2Title(G4int id) const
virtual G4double GetP2Xmax(G4int id) const
virtual G4bool SetP2ZAxisTitle(G4int id, const G4String &title)
virtual G4String GetP2XAxisTitle(G4int id) const
virtual G4String GetP2YAxisTitle(G4int id) const
void ExceptionForProfiles(const G4String &functionName)
int G4int
Definition: G4Types.hh:78
virtual G4bool SetP2XAxisTitle(G4int id, const G4String &title)
void ExceptionForProfilesConst(const G4String &functionName) const
virtual G4double GetP2Ymax(G4int id) const
virtual G4int GetP2Nxbins(G4int id) const
Manager class for P2 with dummy implementation.
virtual G4bool ScaleP2(G4int id, G4double factor)
bool G4bool
Definition: G4Types.hh:79
ExG4HbookP2DummyManager(const G4AnalysisManagerState &state)
virtual G4double GetP2YWidth(G4int id) const
virtual G4double GetP2Xmin(G4int id) const
virtual G4double GetP2XWidth(G4int id) const
virtual G4bool SetP2Title(G4int id, const G4String &title)
static const G4double factor
virtual G4bool WriteOnAscii(std::ofstream &output)
virtual G4int GetP2Nybins(G4int id) const
virtual G4bool SetP2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")
virtual G4int GetP2Id(const G4String &name, G4bool warn=true) const
virtual G4double GetP2Zmax(G4int id) const
virtual G4bool SetP2YAxisTitle(G4int id, const G4String &title)
double G4double
Definition: G4Types.hh:76
virtual G4bool FillP2(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
virtual G4double GetP2Zmin(G4int id) const
virtual G4double GetP2Ymin(G4int id) const