Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:21:50

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  *
0029  *       Filename:  CexmcRunSObject.hh
0030  *
0031  *    Description:  run data serialization helper
0032  *
0033  *        Version:  1.0
0034  *        Created:  23.12.2009 14:24:20
0035  *       Revision:  none
0036  *       Compiler:  gcc
0037  *
0038  *         Author:  Alexey Radkov (), 
0039  *        Company:  PNPI
0040  *
0041  * =============================================================================
0042  */
0043 
0044 #ifndef CEXMC_RUN_SOBJECT_HH
0045 #define CEXMC_RUN_SOBJECT_HH
0046 
0047 #ifdef CEXMC_USE_PERSISTENCY
0048 
0049 #include <boost/serialization/vector.hpp>
0050 #include <boost/serialization/map.hpp>
0051 #include <boost/serialization/string.hpp>
0052 #include <boost/serialization/version.hpp>
0053 #include "CexmcSimpleDecayTableStore.hh"
0054 #include "CexmcSimpleThreeVectorStore.hh"
0055 #include "CexmcAngularRange.hh"
0056 #include "CexmcSimpleRangeWithValue.hh"
0057 #include "CexmcRun.hh"
0058 #include "CexmcCommon.hh"
0059 
0060 
0061 #define CEXMC_RUN_SOBJECT_VERSION 4
0062 
0063 
0064 struct  CexmcRunSObject
0065 {
0066     CexmcBasePhysicsUsed                 basePhysicsUsed;
0067 
0068     CexmcProductionModelType             productionModelType;
0069 
0070     std::string                          gdmlFileName;
0071 
0072     CexmcSimpleDecayTableStore           etaDecayTable;
0073 
0074     CexmcAngularRangeList                angularRanges;
0075 
0076     G4bool                               fermiMotionIsOn;
0077 
0078     std::vector< G4double >              calorimeterRegCuts;
0079 
0080     CexmcEventCountPolicy                eventCountPolicy;
0081 
0082     std::string                          beamParticle;
0083 
0084     CexmcSimpleThreeVectorStore          beamPos;
0085 
0086     CexmcSimpleThreeVectorStore          beamDir;
0087 
0088     G4double                             beamMomentumAmp;
0089 
0090     G4double                             beamFwhmPosX;
0091 
0092     G4double                             beamFwhmPosY;
0093 
0094     G4double                             beamFwhmDirX;
0095 
0096     G4double                             beamFwhmDirY;
0097 
0098     G4double                             beamFwhmMomentumAmp;
0099 
0100     G4double                             monitorEDThreshold;
0101 
0102     G4double                             vetoCounterEDLeftThreshold;
0103 
0104     G4double                             vetoCounterEDRightThreshold;
0105 
0106     G4double                             calorimeterEDLeftThreshold;
0107 
0108     G4double                             calorimeterEDRightThreshold;
0109 
0110     CexmcCalorimeterTriggerAlgorithm     calorimeterTriggerAlgorithm;
0111 
0112     CexmcOuterCrystalsVetoAlgorithm      outerCrystalsVetoAlgorithm;
0113 
0114     G4double                             outerCrystalsVetoFraction;
0115 
0116     G4bool                               applyFiniteCrystalResolution;
0117 
0118     CexmcEnergyRangeWithDoubleValueList  crystalResolutionData;
0119 
0120     CexmcCalorimeterEntryPointDefinitionAlgorithm
0121                                          epDefinitionAlgorithm;
0122 
0123     CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
0124                                          epDepthDefinitionAlgorithm;
0125 
0126     CexmcCrystalSelectionAlgorithm       csAlgorithm;
0127 
0128     G4bool                               useInnerRefCrystal;
0129 
0130     G4double                             epDepth;
0131 
0132     G4bool                               useTableMass;
0133 
0134     G4bool                               useMassCut;
0135 
0136     G4double                             mCutOPCenter;
0137 
0138     G4double                             mCutNOPCenter;
0139 
0140     G4double                             mCutOPWidth;
0141 
0142     G4double                             mCutNOPWidth;
0143 
0144     G4double                             mCutAngle;
0145 
0146     G4bool                               useAbsorbedEnergyCut;
0147 
0148     G4double                             aeCutCLCenter;
0149 
0150     G4double                             aeCutCRCenter;
0151 
0152     G4double                             aeCutCLWidth;
0153 
0154     G4double                             aeCutCRWidth;
0155 
0156     G4double                             aeCutAngle;
0157 
0158     CexmcNmbOfHitsInRanges               nmbOfHitsSampled;
0159 
0160     CexmcNmbOfHitsInRanges               nmbOfHitsSampledFull;
0161 
0162     CexmcNmbOfHitsInRanges               nmbOfHitsTriggeredRealRange;
0163 
0164     CexmcNmbOfHitsInRanges               nmbOfHitsTriggeredRecRange;
0165 
0166     CexmcNmbOfHitsInRanges               nmbOfOrphanHits;
0167 
0168     G4int                                nmbOfFalseHitsTriggeredEDT;
0169 
0170     G4int                                nmbOfFalseHitsTriggeredRec;
0171 
0172     G4int                                nmbOfSavedEvents;
0173 
0174     G4int                                nmbOfSavedFastEvents;
0175 
0176     G4int                                numberOfEventsProcessed;
0177 
0178     G4int                                numberOfEventsProcessedEffective;
0179 
0180     G4int                                numberOfEventsToBeProcessed;
0181 
0182     std::string                          rProject;
0183 
0184     G4bool                               interactionsWithoutEDTWereSkipped;
0185 
0186     std::string                          cfFileName;
0187 
0188     CexmcEventDataVerboseLevel           evDataVerboseLevel;
0189 
0190     G4double                             proposedMaxIL;
0191 
0192     G4double                             expectedMomentumAmp;
0193 
0194     CexmcEDCollectionAlgoritm            edCollectionAlgorithm;
0195 
0196     unsigned int                         actualVersion;
0197 
0198     template  < typename  Archive >
0199     void  serialize( Archive &  archive, const unsigned int  version );
0200 };
0201 
0202 
0203 template  < typename  Archive >
0204 void  CexmcRunSObject::serialize( Archive &  archive,
0205                                   const unsigned int  version )
0206 {
0207     archive & basePhysicsUsed;
0208     archive & productionModelType;
0209     archive & gdmlFileName;
0210     archive & etaDecayTable;
0211     archive & angularRanges;
0212     archive & fermiMotionIsOn;
0213     archive & calorimeterRegCuts;
0214     archive & eventCountPolicy;
0215     archive & beamParticle;
0216     archive & beamPos;
0217     archive & beamDir;
0218     archive & beamMomentumAmp;
0219     archive & beamFwhmPosX;
0220     archive & beamFwhmPosY;
0221     archive & beamFwhmDirX;
0222     archive & beamFwhmDirY;
0223     archive & beamFwhmMomentumAmp;
0224     archive & monitorEDThreshold;
0225     archive & vetoCounterEDLeftThreshold;
0226     archive & vetoCounterEDRightThreshold;
0227     archive & calorimeterEDLeftThreshold;
0228     archive & calorimeterEDRightThreshold;
0229     archive & calorimeterTriggerAlgorithm;
0230     archive & outerCrystalsVetoAlgorithm;
0231     archive & outerCrystalsVetoFraction;
0232     archive & applyFiniteCrystalResolution;
0233     archive & crystalResolutionData;
0234     archive & epDefinitionAlgorithm;
0235     archive & epDepthDefinitionAlgorithm;
0236     archive & csAlgorithm;
0237     if ( version > 0 )
0238         archive & useInnerRefCrystal;
0239     archive & epDepth;
0240     archive & useTableMass;
0241     archive & useMassCut;
0242     archive & mCutOPCenter;
0243     archive & mCutNOPCenter;
0244     archive & mCutOPWidth;
0245     archive & mCutNOPWidth;
0246     archive & mCutAngle;
0247     archive & useAbsorbedEnergyCut;
0248     archive & aeCutCLCenter;
0249     archive & aeCutCRCenter;
0250     archive & aeCutCLWidth;
0251     archive & aeCutCRWidth;
0252     archive & aeCutAngle;
0253     archive & nmbOfHitsSampled;
0254     archive & nmbOfHitsSampledFull;
0255     archive & nmbOfHitsTriggeredRealRange;
0256     archive & nmbOfHitsTriggeredRecRange;
0257     archive & nmbOfOrphanHits;
0258     archive & nmbOfFalseHitsTriggeredEDT;
0259     archive & nmbOfFalseHitsTriggeredRec;
0260     archive & nmbOfSavedEvents;
0261     archive & nmbOfSavedFastEvents;
0262     archive & numberOfEventsProcessed;
0263     archive & numberOfEventsProcessedEffective;
0264     archive & numberOfEventsToBeProcessed;
0265     if ( version > 1 )
0266     {
0267         archive & rProject;
0268         archive & interactionsWithoutEDTWereSkipped;
0269         archive & cfFileName;
0270         archive & evDataVerboseLevel;
0271     }
0272     if ( version > 2 )
0273         archive & proposedMaxIL;
0274     if ( version > 3 )
0275     {
0276         archive & expectedMomentumAmp;
0277         archive & edCollectionAlgorithm;
0278     }
0279 
0280     actualVersion = version;
0281 }
0282 
0283 
0284 BOOST_CLASS_VERSION( CexmcRunSObject, CEXMC_RUN_SOBJECT_VERSION )
0285 
0286 #endif
0287 
0288 #endif
0289