Geant4  10.01.p02
CexmcRunSObject.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 /*
27  * =============================================================================
28  *
29  * Filename: CexmcRunSObject.hh
30  *
31  * Description: run data serialization helper
32  *
33  * Version: 1.0
34  * Created: 23.12.2009 14:24:20
35  * Revision: none
36  * Compiler: gcc
37  *
38  * Author: Alexey Radkov (),
39  * Company: PNPI
40  *
41  * =============================================================================
42  */
43 
44 #ifndef CEXMC_RUN_SOBJECT_HH
45 #define CEXMC_RUN_SOBJECT_HH
46 
47 #ifdef CEXMC_USE_PERSISTENCY
48 
49 #include <boost/serialization/vector.hpp>
50 #include <boost/serialization/map.hpp>
51 #include <boost/serialization/string.hpp>
52 #include <boost/serialization/version.hpp>
55 #include "CexmcAngularRange.hh"
57 #include "CexmcRun.hh"
58 #include "CexmcCommon.hh"
59 
60 
61 #define CEXMC_RUN_SOBJECT_VERSION 4
62 
63 
64 struct CexmcRunSObject
65 {
66  CexmcBasePhysicsUsed basePhysicsUsed;
67 
68  CexmcProductionModelType productionModelType;
69 
70  std::string gdmlFileName;
71 
72  CexmcSimpleDecayTableStore etaDecayTable;
73 
74  CexmcAngularRangeList angularRanges;
75 
76  G4bool fermiMotionIsOn;
77 
78  std::vector< G4double > calorimeterRegCuts;
79 
80  CexmcEventCountPolicy eventCountPolicy;
81 
82  std::string beamParticle;
83 
84  CexmcSimpleThreeVectorStore beamPos;
85 
86  CexmcSimpleThreeVectorStore beamDir;
87 
88  G4double beamMomentumAmp;
89 
90  G4double beamFwhmPosX;
91 
92  G4double beamFwhmPosY;
93 
94  G4double beamFwhmDirX;
95 
96  G4double beamFwhmDirY;
97 
98  G4double beamFwhmMomentumAmp;
99 
100  G4double monitorEDThreshold;
101 
102  G4double vetoCounterEDLeftThreshold;
103 
104  G4double vetoCounterEDRightThreshold;
105 
106  G4double calorimeterEDLeftThreshold;
107 
108  G4double calorimeterEDRightThreshold;
109 
110  CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm;
111 
112  CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm;
113 
114  G4double outerCrystalsVetoFraction;
115 
116  G4bool applyFiniteCrystalResolution;
117 
118  CexmcEnergyRangeWithDoubleValueList crystalResolutionData;
119 
121  epDefinitionAlgorithm;
122 
124  epDepthDefinitionAlgorithm;
125 
126  CexmcCrystalSelectionAlgorithm csAlgorithm;
127 
128  G4bool useInnerRefCrystal;
129 
130  G4double epDepth;
131 
132  G4bool useTableMass;
133 
134  G4bool useMassCut;
135 
136  G4double mCutOPCenter;
137 
138  G4double mCutNOPCenter;
139 
140  G4double mCutOPWidth;
141 
142  G4double mCutNOPWidth;
143 
144  G4double mCutAngle;
145 
146  G4bool useAbsorbedEnergyCut;
147 
148  G4double aeCutCLCenter;
149 
150  G4double aeCutCRCenter;
151 
152  G4double aeCutCLWidth;
153 
154  G4double aeCutCRWidth;
155 
156  G4double aeCutAngle;
157 
158  CexmcNmbOfHitsInRanges nmbOfHitsSampled;
159 
160  CexmcNmbOfHitsInRanges nmbOfHitsSampledFull;
161 
162  CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange;
163 
164  CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange;
165 
166  CexmcNmbOfHitsInRanges nmbOfOrphanHits;
167 
168  G4int nmbOfFalseHitsTriggeredEDT;
169 
170  G4int nmbOfFalseHitsTriggeredRec;
171 
172  G4int nmbOfSavedEvents;
173 
174  G4int nmbOfSavedFastEvents;
175 
176  G4int numberOfEventsProcessed;
177 
178  G4int numberOfEventsProcessedEffective;
179 
180  G4int numberOfEventsToBeProcessed;
181 
182  std::string rProject;
183 
184  G4bool interactionsWithoutEDTWereSkipped;
185 
186  std::string cfFileName;
187 
188  CexmcEventDataVerboseLevel evDataVerboseLevel;
189 
190  G4double proposedMaxIL;
191 
192  G4double expectedMomentumAmp;
193 
194  CexmcEDCollectionAlgoritm edCollectionAlgorithm;
195 
196  unsigned int actualVersion;
197 
198  template < typename Archive >
199  void serialize( Archive & archive, const unsigned int version );
200 };
201 
202 
203 template < typename Archive >
204 void CexmcRunSObject::serialize( Archive & archive,
205  const unsigned int version )
206 {
207  archive & basePhysicsUsed;
208  archive & productionModelType;
209  archive & gdmlFileName;
210  archive & etaDecayTable;
211  archive & angularRanges;
212  archive & fermiMotionIsOn;
213  archive & calorimeterRegCuts;
214  archive & eventCountPolicy;
215  archive & beamParticle;
216  archive & beamPos;
217  archive & beamDir;
218  archive & beamMomentumAmp;
219  archive & beamFwhmPosX;
220  archive & beamFwhmPosY;
221  archive & beamFwhmDirX;
222  archive & beamFwhmDirY;
223  archive & beamFwhmMomentumAmp;
224  archive & monitorEDThreshold;
225  archive & vetoCounterEDLeftThreshold;
226  archive & vetoCounterEDRightThreshold;
227  archive & calorimeterEDLeftThreshold;
228  archive & calorimeterEDRightThreshold;
229  archive & calorimeterTriggerAlgorithm;
230  archive & outerCrystalsVetoAlgorithm;
231  archive & outerCrystalsVetoFraction;
232  archive & applyFiniteCrystalResolution;
233  archive & crystalResolutionData;
234  archive & epDefinitionAlgorithm;
235  archive & epDepthDefinitionAlgorithm;
236  archive & csAlgorithm;
237  if ( version > 0 )
238  archive & useInnerRefCrystal;
239  archive & epDepth;
240  archive & useTableMass;
241  archive & useMassCut;
242  archive & mCutOPCenter;
243  archive & mCutNOPCenter;
244  archive & mCutOPWidth;
245  archive & mCutNOPWidth;
246  archive & mCutAngle;
247  archive & useAbsorbedEnergyCut;
248  archive & aeCutCLCenter;
249  archive & aeCutCRCenter;
250  archive & aeCutCLWidth;
251  archive & aeCutCRWidth;
252  archive & aeCutAngle;
253  archive & nmbOfHitsSampled;
254  archive & nmbOfHitsSampledFull;
255  archive & nmbOfHitsTriggeredRealRange;
256  archive & nmbOfHitsTriggeredRecRange;
257  archive & nmbOfOrphanHits;
258  archive & nmbOfFalseHitsTriggeredEDT;
259  archive & nmbOfFalseHitsTriggeredRec;
260  archive & nmbOfSavedEvents;
261  archive & nmbOfSavedFastEvents;
262  archive & numberOfEventsProcessed;
263  archive & numberOfEventsProcessedEffective;
264  archive & numberOfEventsToBeProcessed;
265  if ( version > 1 )
266  {
267  archive & rProject;
268  archive & interactionsWithoutEDTWereSkipped;
269  archive & cfFileName;
270  archive & evDataVerboseLevel;
271  }
272  if ( version > 2 )
273  archive & proposedMaxIL;
274  if ( version > 3 )
275  {
276  archive & expectedMomentumAmp;
277  archive & edCollectionAlgorithm;
278  }
279 
280  actualVersion = version;
281 }
282 
283 
284 BOOST_CLASS_VERSION( CexmcRunSObject, CEXMC_RUN_SOBJECT_VERSION )
285 
286 #endif
287 
288 #endif
289 
int G4int
Definition: G4Types.hh:78
CexmcProductionModelType
Definition: CexmcCommon.hh:91
CexmcBasePhysicsUsed
Definition: CexmcCommon.hh:82
bool G4bool
Definition: G4Types.hh:79
CexmcCrystalSelectionAlgorithm
Definition: CexmcCommon.hh:170
CexmcEventCountPolicy
Definition: CexmcCommon.hh:107
CexmcEDCollectionAlgoritm
Definition: CexmcCommon.hh:177
CexmcEventDataVerboseLevel
Definition: CexmcCommon.hh:184
std::vector< CexmcAngularRange > CexmcAngularRangeList
CexmcOuterCrystalsVetoAlgorithm
Definition: CexmcCommon.hh:139
double G4double
Definition: G4Types.hh:76
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
Definition: CexmcCommon.hh:163
CexmcCalorimeterTriggerAlgorithm
Definition: CexmcCommon.hh:147
std::map< G4int, G4int > CexmcNmbOfHitsInRanges
Definition: CexmcRun.hh:51
CexmcCalorimeterEntryPointDefinitionAlgorithm
Definition: CexmcCommon.hh:154
std::vector< CexmcEnergyRangeWithDoubleValue > CexmcEnergyRangeWithDoubleValueList