Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -93,7 +93,7 @@ namespace CexmcAST
struct Variable
{
Variable() : index1 ( 0 ), index2( 0 ), addr( ( const int * ) NULL )
Variable() : index1( 0 ), index2( 0 ), addr( ( const int * ) NULL )
{}
std::string name;
@@ -123,7 +123,7 @@ namespace CexmcAST
struct Subtree
{
Subtree() : type ( Operator( Uninitialized ) )
Subtree() : type( Operator( Uninitialized ) )
{}
void Print( int level = 0 ) const;
@@ -60,11 +60,11 @@ class CexmcASTEval : public CexmcAST::BasicEval
{
private:
typedef boost::variant< const CexmcEnergyDepositCalorimeterCollection *,
const bool * > VarAddr;
const bool * > VarAddr;
typedef std::map< std::string, VarAddr > VarAddrMap;
typedef std::map< std::string, VarAddr > VarAddrMap;
typedef std::pair< std::string, VarAddr > VarAddrMapData;
typedef VarAddrMap::value_type VarAddrMapData;
public:
explicit CexmcASTEval(
@@ -88,7 +88,7 @@ CexmcChargeExchangeProductionModel< OutputParticle >::
outputParticle = OutputParticle::Definition();
nucleusOutputParticle = G4Neutron::Definition();
nucleusParticleMass = nucleusParticle->GetPDGMass();
nucleusParticleMass = nucleusParticle->GetPDGMass();
productionModelData.incidentParticle = incidentParticle;
productionModelData.nucleusParticle = nucleusParticle;
@@ -46,6 +46,7 @@
#include "CexmcReconstructor.hh"
#include "CexmcProductionModelData.hh"
#include "CexmcCommon.hh"
class CexmcChargeExchangeReconstructorMessenger;
class CexmcEnergyDepositStore;
@@ -56,7 +57,7 @@ class CexmcParticleGun;
class CexmcChargeExchangeReconstructor : public CexmcReconstructor
{
public:
explicit CexmcChargeExchangeReconstructor(
CexmcChargeExchangeReconstructor(
const CexmcProductionModel * productionModel );
~CexmcChargeExchangeReconstructor();
@@ -97,6 +98,12 @@ class CexmcChargeExchangeReconstructor : public CexmcReconstructor
void SetAbsorbedEnergyCutEllipseAngle( G4double value );
void SetExpectedMomentumAmp( G4double );
void SetExpectedMomentumAmpDiff( G4double );
void SetEDCollectionAlgorithm( CexmcEDCollectionAlgoritm value );
void SetupBeamParticle( void );
G4bool IsTableMassUsed( void ) const;
@@ -127,49 +134,57 @@ class CexmcChargeExchangeReconstructor : public CexmcReconstructor
G4double GetAbsorbedEnergyCutEllipseAngle( void ) const;
G4double GetExpectedMomentumAmp( void ) const;
CexmcEDCollectionAlgoritm GetEDCollectionAlgorithm( void ) const;
G4bool HasAbsorbedEnergyCutTriggered( void ) const;
G4bool HasFullTrigger( void ) const;
private:
G4double outputParticleMass;
G4double outputParticleMass;
G4double nucleusOutputParticleMass;
G4double nucleusOutputParticleMass;
private:
CexmcProductionModelData productionModelData;
CexmcProductionModelData productionModelData;
private:
G4bool useTableMass;
G4bool useTableMass;
G4bool useMassCut;
G4bool useMassCut;
G4double massCutOPCenter;
G4double massCutOPCenter;
G4double massCutNOPCenter;
G4double massCutNOPCenter;
G4double massCutOPWidth;
G4double massCutOPWidth;
G4double massCutNOPWidth;
G4double massCutNOPWidth;
G4double massCutEllipseAngle;
G4double massCutEllipseAngle;
G4bool useAbsorbedEnergyCut;
G4bool useAbsorbedEnergyCut;
G4double absorbedEnergyCutCLCenter;
G4double absorbedEnergyCutCLCenter;
G4double absorbedEnergyCutCRCenter;
G4double absorbedEnergyCutCRCenter;
G4double absorbedEnergyCutCLWidth;
G4double absorbedEnergyCutCLWidth;
G4double absorbedEnergyCutCRWidth;
G4double absorbedEnergyCutCRWidth;
G4double absorbedEnergyCutEllipseAngle;
G4double absorbedEnergyCutEllipseAngle;
G4double expectedMomentumAmp;
CexmcEDCollectionAlgoritm edCollectionAlgorithm;
private:
G4bool hasMassCutTriggered;
G4bool hasMassCutTriggered;
G4bool hasAbsorbedEnergyCutTriggered;
G4bool hasAbsorbedEnergyCutTriggered;
private:
G4bool beamParticleIsInitialized;
@@ -290,6 +305,20 @@ inline void CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutEllipseAngle(
}
inline void CexmcChargeExchangeReconstructor::SetExpectedMomentumAmp(
G4double value )
{
expectedMomentumAmp = value;
}
inline void CexmcChargeExchangeReconstructor::SetEDCollectionAlgorithm(
CexmcEDCollectionAlgoritm value )
{
edCollectionAlgorithm = value;
}
inline G4bool CexmcChargeExchangeReconstructor::IsTableMassUsed( void ) const
{
return useTableMass;
@@ -386,6 +415,20 @@ inline G4double CexmcChargeExchangeReconstructor::
}
inline G4double CexmcChargeExchangeReconstructor::GetExpectedMomentumAmp(
void ) const
{
return expectedMomentumAmp;
}
inline CexmcEDCollectionAlgoritm CexmcChargeExchangeReconstructor::
GetEDCollectionAlgorithm( void ) const
{
return edCollectionAlgorithm;
}
inline G4bool CexmcChargeExchangeReconstructor::HasAbsorbedEnergyCutTriggered(
void ) const
{
@@ -48,8 +48,8 @@
class G4UIcommand;
class G4UIcmdWithABool;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class G4String;
class CexmcChargeExchangeReconstructor;
@@ -92,6 +92,12 @@ class CexmcChargeExchangeReconstructorMessenger : public G4UImessenger
G4UIcmdWithADoubleAndUnit * aeCutCRWidth;
G4UIcmdWithADoubleAndUnit * aeCutAngle;
G4UIcmdWithADoubleAndUnit * setExpectedMomentumAmp;
G4UIcmdWithADoubleAndUnit * setExpectedMomentumAmpDiff;
G4UIcmdWithAString * setEDCollectionAlgorithm;
};
@@ -53,9 +53,11 @@
typedef std::vector< G4double > CexmcEnergyDepositCrystalRowCollection;
typedef std::vector< CexmcEnergyDepositCrystalRowCollection >
CexmcEnergyDepositCalorimeterCollection;
const G4double CexmcDblMax( std::numeric_limits< double >::max() );
const G4String CexmcStudiedProcessFirstName( "studiedProcess_" );
@@ -69,6 +71,8 @@ const G4String CexmcChargeExchangeInteractionName( "Cexmc" +
const G4String CexmcEDDigitizerName( "EDDig" );
const G4String CexmcTPDigitizerName( "TPDig" );
const G4String CexmcScenePrimitivesDescription( "CexmcScenePrimitives" );
const G4double CexmcFwhmToStddev( 0.42466 );
const G4double CexmcInvalidCosTheta( 2.0 );
@@ -169,6 +173,13 @@ enum CexmcCrystalSelectionAlgorithm
};
enum CexmcEDCollectionAlgoritm
{
CexmcCollectEDInAllCrystals,
CexmcCollectEDInAdjacentCrystals
};
enum CexmcEventDataVerboseLevel
{
CexmcWriteNoEventData,
@@ -97,9 +97,9 @@ namespace CexmcCustomFilter
struct Compiler
{
template < typename A, typename B = boost::fusion::unused_type,
typename C = boost::fusion::unused_type,
typename D = boost::fusion::unused_type >
template < typename A, typename B = boost::fusion::unused_type,
typename C = boost::fusion::unused_type,
typename D = boost::fusion::unused_type >
struct result { typedef void type; };
void operator()( ParseResult & parseResult, Action value ) const;
@@ -185,8 +185,8 @@ namespace CexmcCustomFilter
( lit( "tpt" )[ _val = KeepTPT ] |
lit( "edt" )[ _val = KeepEDT ] ) |
lit( "delete" ) >>
( lit ( "tpt" )[ _val = DeleteTPT ] |
lit ( "edt" )[ _val = DeleteEDT ] );
( lit( "tpt" )[ _val = DeleteTPT ] |
lit( "edt" )[ _val = DeleteEDT ] );
condition = lit( "if" ) >> expression[ op( _val, _1 ) ];
@@ -55,7 +55,7 @@ class CexmcEventFastSObject;
class CexmcEventSObject;
class CexmcCustomFilterEval : public CexmcAST::BasicEval
class CexmcCustomFilterEval
{
private:
typedef std::vector< CexmcCustomFilter::ParseResult >
@@ -51,7 +51,6 @@
#include "CexmcException.hh"
#include "CexmcCommon.hh"
class G4String;
class CexmcEnergyDepositDigitizerMessenger;
@@ -125,10 +124,10 @@ class CexmcEnergyDepositDigitizer : public G4VDigitizerModule
G4bool fromMessenger = true );
void SetOuterCrystalsVetoFraction( G4double value,
G4bool fromMessenger = true );
G4bool fromMessenger = true );
void ApplyFiniteCrystalResolution( G4bool value,
G4bool fromMessenger = true );
G4bool fromMessenger = true );
void AddCrystalResolutionRange( G4double bottom, G4double top,
G4double value,
@@ -165,9 +164,6 @@ class CexmcEnergyDepositDigitizer : public G4VDigitizerModule
public:
G4bool IsOuterCrystal( G4int column, G4int row ) const;
void TransformToAdjacentInnerCrystal( G4int & column,
G4int & row ) const;
private:
void InitializeData( void );
@@ -512,20 +508,6 @@ inline G4bool CexmcEnergyDepositDigitizer::IsOuterCrystal( G4int column,
}
inline void CexmcEnergyDepositDigitizer::TransformToAdjacentInnerCrystal(
G4int & column, G4int & row ) const
{
if ( column == 0 )
++column;
if ( column == nCrystalsInRow - 1 )
--column;
if ( row == 0 )
++row;
if ( row == nCrystalsInColumn - 1 )
--row;
}
inline G4double CexmcEnergyDepositDigitizer::GetMonitorThreshold( void ) const
{
return monitorEDThreshold;
@@ -56,7 +56,7 @@ class CexmcEnergyDepositInCalorimeter : public CexmcEnergyDepositInLeftRightSet
const CexmcSetup * setup );
public:
void PrintAll( void );
void PrintAll( void );
protected:
G4int GetIndex( G4Step * step );
@@ -69,7 +69,7 @@ class CexmcEnergyDepositInCalorimeter : public CexmcEnergyDepositInLeftRightSet
static G4int GetCopyDepth1BitsOffset( void );
protected:
static G4int copyDepth1BitsOffset;
static const G4int copyDepth1BitsOffset = 8;
};
@@ -58,7 +58,7 @@ class CexmcEnergyDepositInLeftRightSet : public CexmcSimpleEnergyDeposit
const CexmcSetup * setup );
public:
void PrintAll( void );
void PrintAll( void );
protected:
G4int GetIndex( G4Step * step );
@@ -72,7 +72,7 @@ class CexmcEnergyDepositInLeftRightSet : public CexmcSimpleEnergyDeposit
static G4int GetLeftRightBitsOffset( void );
protected:
static G4int leftRightBitsOffset;
static const G4int leftRightBitsOffset = 16;
};
@@ -111,7 +111,7 @@ extern G4Allocator< CexmcEnergyDepositStore > energyDepositStoreAllocator;
inline void * CexmcEnergyDepositStore::operator new( size_t )
{
return energyDepositStoreAllocator.MallocSingle();
return energyDepositStoreAllocator.MallocSingle();
}
@@ -74,11 +74,9 @@ class CexmcEventAction : public G4UserEventAction
public:
void BeamParticleChangeHook( void );
void SetVerboseOnCexmcLevel( G4int verbose_ );
void SetVerboseOnCexmcLevel( G4int value );
void SetVerboseDrawLevel( G4int verboseDraw_ );
void DrawTrajectoryMarkers( G4bool on );
void SetVerboseDrawLevel( G4int value );
CexmcChargeExchangeReconstructor * GetReconstructor( void );
@@ -95,7 +93,7 @@ class CexmcEventAction : public G4UserEventAction
const CexmcProductionModelData & pmData,
const CexmcAngularRangeList & triggeredAngularRanges ) const;
void FillRTHistos( G4bool reconstructorHasFullTrigger,
void FillRTHistos( G4bool reconstructorHasFullTrigger,
const CexmcEnergyDepositStore * edStore,
const CexmcTrackPointsStore * tpStore,
const CexmcProductionModelData & pmData,
@@ -132,8 +130,7 @@ class CexmcEventAction : public G4UserEventAction
public:
static CexmcEnergyDepositStore * MakeEnergyDepositStore(
const CexmcEnergyDepositDigitizer * digitizer,
G4bool useInnerRefCrystal );
const CexmcEnergyDepositDigitizer * digitizer );
static CexmcTrackPointsStore * MakeTrackPointsStore(
const CexmcTrackPointsDigitizer * digitizer );
@@ -151,35 +148,28 @@ class CexmcEventAction : public G4UserEventAction
private:
CexmcPhysicsManager * physicsManager;
private:
CexmcChargeExchangeReconstructor * reconstructor;
G4double opKinEnergy;
private:
G4int verbose;
G4int verboseDraw;
G4bool drawTrajectoryMarkers;
CexmcEventActionMessenger * messenger;
};
inline void CexmcEventAction::SetVerboseOnCexmcLevel( G4int verbose_ )
inline void CexmcEventAction::SetVerboseOnCexmcLevel( G4int value )
{
verbose = verbose_;
verbose = value;
}
inline void CexmcEventAction::SetVerboseDrawLevel( G4int verboseDraw_ )
inline void CexmcEventAction::SetVerboseDrawLevel( G4int value )
{
verboseDraw = verboseDraw_;
}
inline void CexmcEventAction::DrawTrajectoryMarkers( G4bool on )
{
drawTrajectoryMarkers = on;
verboseDraw = value;
}
@@ -48,8 +48,6 @@
class G4UIcommand;
class G4UIcmdWithAnInteger;
class G4UIcmdWithABool;
class G4String;
class CexmcEventAction;
@@ -69,8 +67,6 @@ class CexmcEventActionMessenger : public G4UImessenger
G4UIcmdWithAnInteger * setVerboseLevel;
G4UIcmdWithAnInteger * setVerboseDrawLevel;
G4UIcmdWithABool * drawTrajectoryMarkers;
};
@@ -46,37 +46,21 @@
#ifdef CEXMC_USE_PERSISTENCY
#include <boost/serialization/access.hpp>
#include <G4Types.hh>
class CexmcEventFastSObject
struct CexmcEventFastSObject
{
friend class boost::serialization::access;
friend class CexmcRunManager;
#ifdef CEXMC_USE_CUSTOM_FILTER
friend class CexmcASTEval;
#endif
G4int eventId;
public:
CexmcEventFastSObject();
G4double opCosThetaSCM;
CexmcEventFastSObject( G4int eventId, G4double opCosThetaSCM,
G4bool edDigitizerHasTriggered,
G4bool edDigitizerMonitorHasTriggered );
G4bool edDigitizerHasTriggered;
private:
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
G4bool edDigitizerMonitorHasTriggered;
private:
G4int eventId;
G4double opCosThetaSCM;
G4bool edDigitizerHasTriggered;
G4bool edDigitizerMonitorHasTriggered;
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
};
@@ -55,7 +55,7 @@ class CexmcEventInfo : public G4VUserEventInformation
G4bool reconstructionIsOk );
public:
void Print( void ) const;
void Print( void ) const;
public:
G4bool EdTriggerIsOk( void ) const;
@@ -46,95 +46,56 @@
#ifdef CEXMC_USE_PERSISTENCY
#include <boost/serialization/access.hpp>
#include <boost/serialization/vector.hpp>
#include "CexmcSimpleTrackPointInfoStore.hh"
#include "CexmcSimpleProductionModelDataStore.hh"
#include "CexmcCommon.hh"
class CexmcTrackPointInfo;
class CexmcProductionModelData;
class CexmcEventSObject
struct CexmcEventSObject
{
friend class boost::serialization::access;
friend class CexmcRunManager;
#ifdef CEXMC_USE_CUSTOM_FILTER
friend class CexmcASTEval;
#endif
G4int eventId;
public:
CexmcEventSObject();
G4bool edDigitizerMonitorHasTriggered;
CexmcEventSObject( G4int eventId,
G4bool edDigitizerMonitorHasTriggered, G4double monitorED,
G4double vetoCounterEDLeft, G4double vetoCounterEDRight,
G4double calorimeterEDLeft, G4double calorimeterEDRight,
const CexmcEnergyDepositCalorimeterCollection &
calorimeterEDLeftCollection,
const CexmcEnergyDepositCalorimeterCollection &
calorimeterEDRightCollection,
const CexmcTrackPointInfo & monitorTP,
const CexmcTrackPointInfo & targetTPBeamParticle,
const CexmcTrackPointInfo & targetTPOutputParticle,
const CexmcTrackPointInfo & targetTPNucleusParticle,
const CexmcTrackPointInfo &
targetTPOutputParticleDecayProductParticle1,
const CexmcTrackPointInfo &
targetTPOutputParticleDecayProductParticle2,
const CexmcTrackPointInfo & vetoCounterTPLeft,
const CexmcTrackPointInfo & vetoCounterTPRight,
const CexmcTrackPointInfo & calorimeterTPLeft,
const CexmcTrackPointInfo & calorimeterTPRight,
const CexmcProductionModelData & productionModelData );
G4double monitorED;
private:
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
G4double vetoCounterEDLeft;
private:
G4int eventId;
G4double vetoCounterEDRight;
G4bool edDigitizerMonitorHasTriggered;
G4double calorimeterEDLeft;
G4double monitorED;
G4double calorimeterEDRight;
G4double vetoCounterEDLeft;
CexmcEnergyDepositCalorimeterCollection calorimeterEDLeftCollection;
G4double vetoCounterEDRight;
CexmcEnergyDepositCalorimeterCollection calorimeterEDRightCollection;
G4double calorimeterEDLeft;
CexmcSimpleTrackPointInfoStore monitorTP;
G4double calorimeterEDRight;
CexmcSimpleTrackPointInfoStore targetTPBeamParticle;
CexmcEnergyDepositCalorimeterCollection calorimeterEDLeftCollection;
CexmcSimpleTrackPointInfoStore targetTPOutputParticle;
CexmcEnergyDepositCalorimeterCollection calorimeterEDRightCollection;
CexmcSimpleTrackPointInfoStore targetTPNucleusParticle;
CexmcSimpleTrackPointInfoStore monitorTP;
CexmcSimpleTrackPointInfoStore targetTPOutputParticleDecayProductParticle1;
CexmcSimpleTrackPointInfoStore targetTPBeamParticle;
CexmcSimpleTrackPointInfoStore targetTPOutputParticleDecayProductParticle2;
CexmcSimpleTrackPointInfoStore targetTPOutputParticle;
CexmcSimpleTrackPointInfoStore vetoCounterTPLeft;
CexmcSimpleTrackPointInfoStore targetTPNucleusParticle;
CexmcSimpleTrackPointInfoStore vetoCounterTPRight;
CexmcSimpleTrackPointInfoStore
targetTPOutputParticleDecayProductParticle1;
CexmcSimpleTrackPointInfoStore calorimeterTPLeft;
CexmcSimpleTrackPointInfoStore
targetTPOutputParticleDecayProductParticle2;
CexmcSimpleTrackPointInfoStore calorimeterTPRight;
CexmcSimpleTrackPointInfoStore vetoCounterTPLeft;
CexmcSimpleProductionModelDataStore productionModelData;
CexmcSimpleTrackPointInfoStore vetoCounterTPRight;
CexmcSimpleTrackPointInfoStore calorimeterTPLeft;
CexmcSimpleTrackPointInfoStore calorimeterTPRight;
CexmcSimpleProductionModelDataStore productionModelData;
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
};
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/*
* =============================================================================
*
* Filename: CexmcFakeCrossSectionData.hh
*
* Description: fake cross section data (to be never really applied)
*
* Version: 1.0
* Created: 18.09.2011 21:47:10
* Revision: none
* Compiler: gcc
*
* Author: Alexey Radkov (),
* Company: PNPI
*
* =============================================================================
*/
#ifndef CEXMC_FAKE_CROSS_SECTION_DATA_HH
#define CEXMC_FAKE_CROSS_SECTION_DATA_HH
#include <G4VCrossSectionDataSet.hh>
class G4DynamicParticle;
class G4Element;
class G4ParticleDefinition;
class CexmcFakeCrossSectionData : public G4VCrossSectionDataSet
{
public:
G4bool IsApplicable( const G4DynamicParticle *, const G4Element * )
{
return false;
}
G4double GetCrossSection( const G4DynamicParticle *,
const G4Element *, G4double )
{
return 0;
}
void BuildPhysicsTable( const G4ParticleDefinition & )
{}
void DumpPhysicsTable( const G4ParticleDefinition & )
{}
};
#endif
@@ -72,13 +72,13 @@ class CexmcHadronicProcess : public G4HadronicProcess
G4bool IsApplicable( const G4ParticleDefinition & particle );
public:
void RegisterProductionModel( CexmcProductionModel * model );
void RegisterProductionModel( CexmcProductionModel * model );
private:
void CalculateTargetNucleus( const G4Material * material );
void CalculateTargetNucleus( const G4Material * material );
void FillTotalResult( G4HadFinalState * hadFinalState,
const G4Track & track );
void FillTotalResult( G4HadFinalState * hadFinalState,
const G4Track & track );
private:
CexmcProductionModel * productionModel;
@@ -65,6 +65,7 @@ enum CexmcHistoType
{
CexmcMomentumBP_TPT_Histo,
CexmcMomentumBP_RT_Histo,
CexmcMomentumIP_TPT_Histo,
CexmcTPInMonitor_TPT_Histo,
CexmcTPInTarget_TPT_Histo,
CexmcTPInTarget_RT_Histo,
@@ -113,11 +114,11 @@ enum CexmcHistoType
class CexmcHistoManager
{
private:
typedef std::vector< TH1 * > CexmcHistoVector;
typedef std::vector< TH1 * > CexmcHistoVector;
typedef std::map< CexmcHistoType, CexmcHistoVector > CexmcHistosMap;
typedef std::map< CexmcHistoType, CexmcHistoVector > CexmcHistosMap;
typedef std::pair< CexmcHistoType, CexmcHistoVector > CexmcHistoPair;
typedef CexmcHistosMap::value_type CexmcHistoPair;
struct CexmcHistoAxisData
{
@@ -136,7 +137,7 @@ class CexmcHistoManager
Double_t nBinsMax;
};
typedef std::vector< CexmcHistoAxisData > CexmcHistoAxes;
typedef std::vector< CexmcHistoAxisData > CexmcHistoAxes;
enum CexmcHistoImpl
{
@@ -217,6 +218,11 @@ class CexmcHistoManager
const G4String & histoDrawOptions = "" );
#endif
public:
void SetVerboseLevel( G4int value );
G4int GetVerboseLevel( void ) const;
private:
void AddHisto( const CexmcHistoData & data,
const CexmcAngularRange & aRange = CexmcAngularRange() );
@@ -242,6 +248,8 @@ class CexmcHistoManager
G4double nopMass;
G4int verboseLevel;
#ifdef CEXMC_USE_ROOTQT
private:
@@ -255,8 +263,19 @@ class CexmcHistoManager
static CexmcHistoManager * instance;
};
#endif
inline void CexmcHistoManager::SetVerboseLevel( G4int value )
{
verboseLevel = value;
}
inline G4int CexmcHistoManager::GetVerboseLevel( void ) const
{
return verboseLevel;
}
#endif
#endif
@@ -50,13 +50,16 @@
class G4UIcommand;
class G4UIcmdWithoutParameter;
class G4UIcmdWithAnInteger;
class G4UIcmdWithAString;
class CexmcHistoManager;
class CexmcHistoManagerMessenger : public G4UImessenger
{
public:
CexmcHistoManagerMessenger();
explicit CexmcHistoManagerMessenger(
CexmcHistoManager * histoManager );
~CexmcHistoManagerMessenger();
@@ -64,6 +67,10 @@ class CexmcHistoManagerMessenger : public G4UImessenger
void SetNewValue( G4UIcommand * cmd, G4String value );
private:
CexmcHistoManager * histoManager;
G4UIcmdWithAnInteger * setVerboseLevel;
G4UIcmdWithoutParameter * listHistos;
G4UIcmdWithAString * printHisto;
@@ -75,6 +82,5 @@ class CexmcHistoManagerMessenger : public G4UImessenger
#endif
#endif
@@ -62,7 +62,7 @@ class CexmcParticleGunMessenger : public G4UImessenger
~CexmcParticleGunMessenger();
public:
void SetNewValue( G4UIcommand * cnd, G4String value );
void SetNewValue( G4UIcommand * cmd, G4String value );
private:
CexmcParticleGun * particleGun;
@@ -49,8 +49,6 @@
#include <G4StepPoint.hh>
#include <G4ThreeVector.hh>
#include <G4AffineTransform.hh>
#include "CexmcStudiedPhysics.hh"
#include "CexmcStudiedProcess.hh"
#include "CexmcPhysicsManager.hh"
#include "CexmcProductionModel.hh"
#include "CexmcIncidentParticleTrackInfo.hh"
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/*
* =============================================================================
*
* Filename: CexmcPrimitiveScorer.hh
*
* Description: primitive scorer with a messenger
*
* Version: 1.0
* Created: 24.01.2011 18:22:41
* Revision: none
* Compiler: gcc
*
* Author: Alexey Radkov (),
* Company: PNPI
*
* =============================================================================
*/
#ifndef CEXMC_PRIMITIVE_SCORER_HH
#define CEXMC_PRIMITIVE_SCORER_HH
#include <G4VPrimitiveScorer.hh>
class CexmcSensitiveDetectorMessenger;
class CexmcPrimitiveScorer : public G4VPrimitiveScorer
{
public:
explicit CexmcPrimitiveScorer( const G4String & name );
virtual ~CexmcPrimitiveScorer();
public:
void InitializeMessenger( void );
protected:
void PrintHeader( G4int nmbOfEntries ) const;
private:
CexmcSensitiveDetectorMessenger * messenger;
};
#endif
@@ -50,9 +50,7 @@
#include <G4ParticleDefinition.hh>
#include "CexmcAngularRange.hh"
#include "CexmcProductionModelData.hh"
#ifdef CEXMC_USE_ROOT
#include "CexmcHistoManager.hh"
#endif
#include "CexmcException.hh"
#include "CexmcCommon.hh"
@@ -53,26 +53,23 @@
namespace CexmcPrivate
{
template < typename BasePhysics >
class CexmcBasePhysicsInstance
template < typename >
struct CexmcBasePhysicsInstance
{
public:
static const CexmcBasePhysicsUsed value = CexmcNoBasePhysics;
static const CexmcBasePhysicsUsed value = CexmcNoBasePhysics;
};
#ifdef CEXMC_USE_QGSP_BIC_EMY
template<>
class CexmcBasePhysicsInstance< QGSP_BIC_EMY >
template <>
struct CexmcBasePhysicsInstance< QGSP_BIC_EMY >
{
public:
static const CexmcBasePhysicsUsed value = Cexmc_QGSP_BIC_EMY;
static const CexmcBasePhysicsUsed value = Cexmc_QGSP_BIC_EMY;
};
#else
template<>
class CexmcBasePhysicsInstance< QGSP_BERT >
template <>
struct CexmcBasePhysicsInstance< QGSP_BERT >
{
public:
static const CexmcBasePhysicsUsed value = Cexmc_QGSP_BERT;
static const CexmcBasePhysicsUsed value = Cexmc_QGSP_BERT;
};
#endif
}
@@ -56,7 +56,7 @@ class CexmcEnergyDepositStore;
class CexmcReconstructor
{
public:
CexmcReconstructor();
explicit CexmcReconstructor();
virtual ~CexmcReconstructor();
@@ -131,6 +131,19 @@ class CexmcReconstructor
void ReconstructAngle( void );
private:
void CollectEDInAdjacentCrystals(
const CexmcEnergyDepositCalorimeterCollection & edHits,
G4int row, G4int column, G4double & ed );
void CalculateWeightedEPPosition(
const CexmcEnergyDepositCalorimeterCollection & edHits,
G4int row, G4int column, G4double & x, G4double & y,
G4double & ed );
void TransformToAdjacentInnerCrystal( G4int & column,
G4int & row ) const;
protected:
G4bool hasBasicTrigger;
@@ -173,6 +186,13 @@ class CexmcReconstructor
G4double theAngle;
protected:
G4double calorimeterEDLeftAdjacent;
G4double calorimeterEDRightAdjacent;
G4bool collectEDInAdjacentCrystals;
private:
CexmcSetup::CalorimeterGeometryData calorimeterGeometry;
@@ -355,5 +375,19 @@ inline G4bool CexmcReconstructor::HasBasicTrigger( void ) const
}
inline void CexmcReconstructor::TransformToAdjacentInnerCrystal(
G4int & column, G4int & row ) const
{
if ( column == 0 )
++column;
if ( column == calorimeterGeometry.nCrystalsInRow - 1 )
--column;
if ( row == 0 )
++row;
if ( row == calorimeterGeometry.nCrystalsInColumn - 1 )
--row;
}
#endif
@@ -47,10 +47,9 @@
#include <G4UImessenger.hh>
class G4UIcommand;
class G4UIcmdWithAString;
class G4UIcmdWithABool;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class G4String;
class CexmcReconstructor;
@@ -61,11 +61,8 @@ class CexmcReimplementedGenbod : public CexmcPhaseSpaceGenerator
void FermiEnergyDepStatusChangeHook( void );
private:
void SetMaxWeight( void );
G4double PDK( G4double a, G4double b, G4double c );
private:
G4double maxWeight;
@@ -48,7 +48,9 @@
#include <G4Run.hh>
typedef std::map< G4int, G4int > CexmcNmbOfHitsInRanges;
typedef std::map< G4int, G4int > CexmcNmbOfHitsInRanges;
typedef CexmcNmbOfHitsInRanges::value_type CexmcNmbOfHitsInRangesData;
class CexmcRun : public G4Run
@@ -90,6 +90,8 @@ class CexmcRunManager : public G4RunManager
void SetEventDataVerboseLevel( CexmcEventDataVerboseLevel value );
void RegisterScenePrimitives( void );
#ifdef CEXMC_USE_PERSISTENCY
void ReadProject( void );
@@ -114,6 +116,10 @@ class CexmcRunManager : public G4RunManager
void EnableLiveHistograms( G4bool on = true );
void BeamParticleChangeHook( void );
void SetupConstructionHook( void );
public:
CexmcPhysicsManager * GetPhysicsManager( void );
@@ -143,8 +149,6 @@ class CexmcRunManager : public G4RunManager
CexmcEventDataVerboseLevel GetEventDataVerboseLevel( void ) const;
void BeamParticleChangeHook( void );
protected:
void DoEventLoop( G4int nEvent, const char * macroFile,
G4int nSelect );
@@ -51,6 +51,7 @@ class G4UIcommand;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithABool;
class G4UIcmdWithoutParameter;
class CexmcRunManagerMessenger : public G4UImessenger
@@ -64,27 +65,29 @@ class CexmcRunManagerMessenger : public G4UImessenger
void SetNewValue( G4UIcommand * cmd, G4String value );
private:
CexmcRunManager * runManager;
CexmcRunManager * runManager;
G4UIcmdWithAString * setProductionModel;
G4UIcmdWithAString * setProductionModel;
G4UIcmdWithAString * setGdmlFile;
G4UIcmdWithAString * setGdmlFile;
G4UIcmdWithAString * setGuiMacro;
G4UIcmdWithAString * setGuiMacro;
G4UIcmdWithAString * setEventCountPolicy;
G4UIcmdWithAString * setEventCountPolicy;
G4UIcmdWithAString * setEventDataVerboseLevel;
G4UIcmdWithAString * setEventDataVerboseLevel;
#ifdef CEXMC_USE_PERSISTENCY
G4UIcmdWithAnInteger * replayEvents;
G4UIcmdWithAnInteger * replayEvents;
G4UIcmdWithAnInteger * seekTo;
G4UIcmdWithAnInteger * seekTo;
G4UIcmdWithABool * skipInteractionsWithoutEDT;
G4UIcmdWithABool * skipInteractionsWithoutEDT;
#endif
G4UIcmdWithABool * validateGdmlFile;
G4UIcmdWithoutParameter * registerScenePrimitives;
G4UIcmdWithABool * validateGdmlFile;
};
@@ -46,10 +46,10 @@
#ifdef CEXMC_USE_PERSISTENCY
#include <boost/serialization/access.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/version.hpp>
#include "CexmcSimpleDecayTableStore.hh"
#include "CexmcSimpleThreeVectorStore.hh"
#include "CexmcAngularRange.hh"
@@ -58,207 +58,145 @@
#include "CexmcCommon.hh"
#define CEXMC_RUN_SOBJECT_VERSION 3
#define CEXMC_RUN_SOBJECT_VERSION 4
class CexmcRunSObject
struct CexmcRunSObject
{
friend class boost::serialization::access;
friend class CexmcRunManager;
public:
CexmcRunSObject();
CexmcRunSObject( CexmcBasePhysicsUsed basePhysicsUsed,
CexmcProductionModelType productionModelType,
const std::string & gdmlFileName,
const CexmcSimpleDecayTableStore & etaDecayTable,
const CexmcAngularRangeList & angularRanges,
G4bool fermiMotionIsOn,
const std::vector< G4double > & calorimeterRegCuts,
CexmcEventCountPolicy eventCountPolicy,
const std::string & beamParticle,
const CexmcSimpleThreeVectorStore & beamPos,
const CexmcSimpleThreeVectorStore & beamDir,
G4double beamMomentumAmp, G4double beamFwhmPosX,
G4double beamFwhmPosY, G4double beamFwhmDirX,
G4double beamFwhmDirY,
G4double beamFwhmMomentumAmp,
G4double monitorEDThreshold,
G4double vetoCounterEDLeftThreshold,
G4double vetoCounterEDRightThreshold,
G4double calorimeterEDLeftThreshold,
G4double calorimeterEDRightThreshold,
CexmcCalorimeterTriggerAlgorithm
calorimeterTriggerAlgorithm,
CexmcOuterCrystalsVetoAlgorithm
outerCrystalsVetoAlgorithm,
G4double outerCrystalsVetoFraction,
G4bool applyFiniteCrystalResolution,
const CexmcEnergyRangeWithDoubleValueList &
crystalResolutionData,
CexmcCalorimeterEntryPointDefinitionAlgorithm
epDefinitionAlgorithm,
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
epDepthDefinitionAlgorithm,
CexmcCrystalSelectionAlgorithm csAlgorithm,
G4bool useInnerRefCrystal, G4double epDepth,
G4bool useTableMass, G4bool useMassCut,
G4double mCutOPCenter, G4double mCutNOPCenter,
G4double mCutOPWidth, G4double mCutNOPWidth,
G4double mCutAngle, G4bool useAbsorbedEnergyCut,
G4double aeCutCLCenter, G4double aeCutCRCenter,
G4double aeCutCLWidth, G4double aeCutCRWidth,
G4double aeCutAngle,
CexmcNmbOfHitsInRanges nmbOfHitsSampled,
CexmcNmbOfHitsInRanges nmbOfHitsSampledFull,
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange,
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange,
CexmcNmbOfHitsInRanges nmbOfOrphanHits,
G4int nmbOfFalseHitsTriggeredEDT,
G4int nmbOfFalseHitsTriggeredRec,
G4int nmbOfSavedEvents, G4int nmbOfSavedFastEvents,
G4int numberOfEventsProcessed,
G4int numberOfEventsProcessedEffective,
G4int numberOfEventsToBeProcessed,
const std::string & rProject,
G4bool interactionsWithoutEDTWereSkipped,
const std::string & cfFileName,
CexmcEventDataVerboseLevel evDataVerboseLevel,
G4double proposedMaxIL );
CexmcBasePhysicsUsed basePhysicsUsed;
private:
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
CexmcProductionModelType productionModelType;
private:
CexmcBasePhysicsUsed basePhysicsUsed;
std::string gdmlFileName;
CexmcProductionModelType productionModelType;
CexmcSimpleDecayTableStore etaDecayTable;
std::string gdmlFileName;
CexmcAngularRangeList angularRanges;
CexmcSimpleDecayTableStore etaDecayTable;
G4bool fermiMotionIsOn;
CexmcAngularRangeList angularRanges;
std::vector< G4double > calorimeterRegCuts;
G4bool fermiMotionIsOn;
CexmcEventCountPolicy eventCountPolicy;
std::vector< G4double > calorimeterRegCuts;
std::string beamParticle;
CexmcEventCountPolicy eventCountPolicy;
CexmcSimpleThreeVectorStore beamPos;
std::string beamParticle;
CexmcSimpleThreeVectorStore beamDir;
CexmcSimpleThreeVectorStore beamPos;
G4double beamMomentumAmp;
CexmcSimpleThreeVectorStore beamDir;
G4double beamFwhmPosX;
G4double beamMomentumAmp;
G4double beamFwhmPosY;
G4double beamFwhmPosX;
G4double beamFwhmDirX;
G4double beamFwhmPosY;
G4double beamFwhmDirY;
G4double beamFwhmDirX;
G4double beamFwhmMomentumAmp;
G4double beamFwhmDirY;
G4double monitorEDThreshold;
G4double beamFwhmMomentumAmp;
G4double vetoCounterEDLeftThreshold;
G4double monitorEDThreshold;
G4double vetoCounterEDRightThreshold;
G4double vetoCounterEDLeftThreshold;
G4double calorimeterEDLeftThreshold;
G4double vetoCounterEDRightThreshold;
G4double calorimeterEDRightThreshold;
G4double calorimeterEDLeftThreshold;
CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm;
G4double calorimeterEDRightThreshold;
CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm;
CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm;
G4double outerCrystalsVetoFraction;
CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm;
G4bool applyFiniteCrystalResolution;
G4double outerCrystalsVetoFraction;
CexmcEnergyRangeWithDoubleValueList crystalResolutionData;
G4bool applyFiniteCrystalResolution;
CexmcCalorimeterEntryPointDefinitionAlgorithm
epDefinitionAlgorithm;
CexmcEnergyRangeWithDoubleValueList crystalResolutionData;
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
epDepthDefinitionAlgorithm;
CexmcCalorimeterEntryPointDefinitionAlgorithm epDefinitionAlgorithm;
CexmcCrystalSelectionAlgorithm csAlgorithm;
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
epDepthDefinitionAlgorithm;
G4bool useInnerRefCrystal;
CexmcCrystalSelectionAlgorithm csAlgorithm;
G4double epDepth;
G4bool useInnerRefCrystal;
G4bool useTableMass;
G4double epDepth;
G4bool useMassCut;
G4bool useTableMass;
G4double mCutOPCenter;
G4bool useMassCut;
G4double mCutNOPCenter;
G4double mCutOPCenter;
G4double mCutOPWidth;
G4double mCutNOPCenter;
G4double mCutNOPWidth;
G4double mCutOPWidth;
G4double mCutAngle;
G4double mCutNOPWidth;
G4bool useAbsorbedEnergyCut;
G4double mCutAngle;
G4double aeCutCLCenter;
G4bool useAbsorbedEnergyCut;
G4double aeCutCRCenter;
G4double aeCutCLCenter;
G4double aeCutCLWidth;
G4double aeCutCRCenter;
G4double aeCutCRWidth;
G4double aeCutCLWidth;
G4double aeCutAngle;
G4double aeCutCRWidth;
CexmcNmbOfHitsInRanges nmbOfHitsSampled;
G4double aeCutAngle;
CexmcNmbOfHitsInRanges nmbOfHitsSampledFull;
CexmcNmbOfHitsInRanges nmbOfHitsSampled;
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange;
CexmcNmbOfHitsInRanges nmbOfHitsSampledFull;
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange;
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange;
CexmcNmbOfHitsInRanges nmbOfOrphanHits;
CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange;
G4int nmbOfFalseHitsTriggeredEDT;
CexmcNmbOfHitsInRanges nmbOfOrphanHits;
G4int nmbOfFalseHitsTriggeredRec;
G4int nmbOfFalseHitsTriggeredEDT;
G4int nmbOfSavedEvents;
G4int nmbOfFalseHitsTriggeredRec;
G4int nmbOfSavedFastEvents;
G4int nmbOfSavedEvents;
G4int numberOfEventsProcessed;
G4int nmbOfSavedFastEvents;
G4int numberOfEventsProcessedEffective;
G4int numberOfEventsProcessed;
G4int numberOfEventsToBeProcessed;
G4int numberOfEventsProcessedEffective;
std::string rProject;
G4int numberOfEventsToBeProcessed;
G4bool interactionsWithoutEDTWereSkipped;
std::string rProject;
std::string cfFileName;
G4bool interactionsWithoutEDTWereSkipped;
CexmcEventDataVerboseLevel evDataVerboseLevel;
std::string cfFileName;
G4double proposedMaxIL;
CexmcEventDataVerboseLevel evDataVerboseLevel;
G4double expectedMomentumAmp;
G4double proposedMaxIL;
CexmcEDCollectionAlgoritm edCollectionAlgorithm;
private:
unsigned int actualVersion;
unsigned int actualVersion;
template < typename Archive >
void serialize( Archive & archive, const unsigned int version );
};
@@ -266,8 +204,6 @@ template < typename Archive >
void CexmcRunSObject::serialize( Archive & archive,
const unsigned int version )
{
actualVersion = version;
archive & basePhysicsUsed;
archive & productionModelType;
archive & gdmlFileName;
@@ -335,6 +271,13 @@ void CexmcRunSObject::serialize( Archive & archive,
}
if ( version > 2 )
archive & proposedMaxIL;
if ( version > 3 )
{
archive & expectedMomentumAmp;
archive & edCollectionAlgorithm;
}
actualVersion = version;
}
@@ -0,0 +1,177 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/*
* =============================================================================
*
* Filename: CexmcScenePrimitives.hh
*
* Description: auxiliary scene primitives (radial lines etc.)
*
* Version: 1.0
* Created: 03.01.2011 11:27:34
* Revision: none
* Compiler: gcc
*
* Author: Alexey Radkov (),
* Company: PNPI
*
* =============================================================================
*/
#ifndef CEXMC_SCENE_PRIMITIVES_HH
#define CEXMC_SCENE_PRIMITIVES_HH
#include <vector>
#include <map>
#include <G4Colour.hh>
#include <G4ThreeVector.hh>
#include <G4VModel.hh>
#include <G4VVisManager.hh>
class G4VGraphicsScene;
class CexmcSetup;
class CexmcScenePrimitivesMessenger;
enum CexmcSPType
{
CexmcTargetCenterMark_SP,
CexmcRadialLine_SP,
CexmcInnerCrystalsHl_SP
};
class CexmcScenePrimitives : public G4VModel
{
private:
struct CexmcRadialLine
{
CexmcRadialLine( const G4ThreeVector & line ) :
theta( line.x() ), phi( line.y() ), length( line.z() )
{}
G4double theta;
G4double phi;
G4double length;
};
typedef std::vector< CexmcRadialLine > CexmcRadialLines;
typedef std::map< CexmcSPType, G4Colour > CexmcSPColourMap;
public:
explicit CexmcScenePrimitives( CexmcSetup * setup );
~CexmcScenePrimitives();
public:
void DescribeYourselfTo( G4VGraphicsScene & scene );
public:
void MarkTargetCenter( G4bool on = true );
void DrawRadialLine( const G4ThreeVector & line );
void HighlightInnerCrystals( G4bool = true );
void ClearRadialLines( void );
void SetColour( CexmcSPType primitive, const G4Colour & colour );
private:
void DrawRadialLine( G4VGraphicsScene & scene,
const CexmcRadialLine * rLine );
void MarkTargetCenter( G4VGraphicsScene & scene );
void HighlightInnerCrystals( G4VGraphicsScene & scene );
private:
void UpdateScene( void );
private:
CexmcSetup * setup;
G4bool markTargetCenter;
G4bool highlightInnerCrystals;
CexmcRadialLines radialLines;
CexmcSPColourMap spColours;
private:
CexmcScenePrimitivesMessenger * messenger;
};
inline void CexmcScenePrimitives::SetColour( CexmcSPType primitive,
const G4Colour & colour )
{
spColours[ primitive ] = colour;
}
inline void CexmcScenePrimitives::DrawRadialLine( const G4ThreeVector & line )
{
radialLines.push_back( line );
UpdateScene();
}
inline void CexmcScenePrimitives::MarkTargetCenter( G4bool on )
{
markTargetCenter = on;
UpdateScene();
}
inline void CexmcScenePrimitives::HighlightInnerCrystals( G4bool on )
{
highlightInnerCrystals = on;
UpdateScene();
}
inline void CexmcScenePrimitives::ClearRadialLines( void )
{
radialLines.clear();
UpdateScene();
}
inline void CexmcScenePrimitives::UpdateScene( void )
{
G4VVisManager * visManager( G4VVisManager::GetConcreteInstance() );
if ( visManager )
visManager->NotifyHandlers();
}
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/*
* =============================================================================
*
* Filename: CexmcScenePrimitivesMessenger.hh
*
* Description: draw auxiliary scene primitives
*
* Version: 1.0
* Created: 03.01.2011 12:34:09
* Revision: none
* Compiler: gcc
*
* Author: Alexey Radkov (),
* Company: PNPI
*
* =============================================================================
*/
#ifndef CEXMC_SCENE_PRIMITIVES_MESSENGER_HH
#define CEXMC_SCENE_PRIMITIVES_MESSENGER_HH
#include <G4UImessenger.hh>
class G4UIcommand;
class G4UIcmdWith3Vector;
class G4UIcmdWithABool;
class G4UIcmdWithoutParameter;
class CexmcScenePrimitives;
class CexmcScenePrimitivesMessenger : public G4UImessenger
{
public:
explicit CexmcScenePrimitivesMessenger(
CexmcScenePrimitives * scenePrimitives );
~CexmcScenePrimitivesMessenger();
public:
void SetNewValue( G4UIcommand * cmd, G4String value );
private:
CexmcScenePrimitives * scenePrimitives;
G4UIcmdWith3Vector * drawRadialLine;
G4UIcmdWithoutParameter * clearRadialLines;
G4UIcmdWithABool * markTargetCenter;
G4UIcmdWithABool * highlightInnerCrystals;
G4UIcommand * setColour;
};
#endif
@@ -50,14 +50,13 @@ class G4VPrimitiveScorer;
class G4UIcommand;
class G4UIcmdWithAnInteger;
class G4UIdirectory;
class G4String;
class CexmcSensitiveDetectorMessenger : public G4UImessenger
{
public:
CexmcSensitiveDetectorMessenger( G4VPrimitiveScorer * scorer,
const G4String & detectorName );
explicit CexmcSensitiveDetectorMessenger(
G4VPrimitiveScorer * scorer );
~CexmcSensitiveDetectorMessenger();
@@ -110,11 +110,11 @@ class CexmcSetup : public G4VUserDetectorConstruction
G4bool IsRightCalorimeter( const G4VPhysicalVolume * pVolume ) const;
private:
void SetupSpecialVolumes( G4GDMLParser & gdmlParser );
void SetupSpecialVolumes( const G4GDMLParser & gdmlParser );
void ReadTransforms( const G4GDMLParser & gdmlParser );
void ReadTransforms( const G4GDMLParser & gdmlParser );
void ReadCalorimeterGeometryData( const G4LogicalVolume * lVolume );
void ReadCalorimeterGeometryData( const G4LogicalVolume * lVolume );
void ReadRightDetectors( void );
@@ -199,10 +199,8 @@ inline const G4LogicalVolume * CexmcSetup::GetVolume(
case Target :
return targetVolume;
default :
break;
return NULL;
}
return NULL;
}
@@ -44,24 +44,23 @@
#ifndef CEXMC_SIMPLE_ENERGY_DEPOSIT_HH
#define CEXMC_SIMPLE_ENERGY_DEPOSIT_HH
#include <G4VPrimitiveScorer.hh>
#include <G4THitsMap.hh>
#include "CexmcPrimitiveScorer.hh"
class G4HCofThisEvent;
class G4Step;
class CexmcSensitiveDetectorMessenger;
typedef G4THitsMap< G4double > CexmcEnergyDepositCollection;
typedef G4THitsMap< G4double > CexmcEnergyDepositCollection;
typedef std::map< G4int, G4double * > CexmcEnergyDepositCollectionData;
class CexmcSimpleEnergyDeposit : public G4VPrimitiveScorer
class CexmcSimpleEnergyDeposit : public CexmcPrimitiveScorer
{
public:
explicit CexmcSimpleEnergyDeposit( const G4String & name );
virtual ~CexmcSimpleEnergyDeposit();
public:
void Initialize( G4HCofThisEvent * hcOfThisEvent );
@@ -79,12 +78,10 @@ class CexmcSimpleEnergyDeposit : public G4VPrimitiveScorer
G4bool ProcessHits( G4Step * step, G4TouchableHistory * tHistory );
protected:
CexmcEnergyDepositCollection * eventMap;
CexmcEnergyDepositCollection * eventMap;
private:
CexmcSensitiveDetectorMessenger * messenger;
G4int hcId;
G4int hcId;
};
@@ -52,7 +52,7 @@
class CexmcSimpleLorentzVectorStore
{
friend class boost::serialization::access;
friend class boost::serialization::access;
#ifdef CEXMC_USE_CUSTOM_FILTER
friend class CexmcASTEval;
#endif
@@ -45,7 +45,7 @@
#define CEXMC_SIMPLE_RANGE_WITH_VALUE_HH
#include <vector>
#include <iostream>
#include <iosfwd>
#include <G4Types.hh>
@@ -108,7 +108,8 @@ inline bool operator<(
typedef CexmcSimpleRangeWithValue< CexmcEnergyValueCategory >
CexmcEnergyRangeWithDoubleValue;
CexmcEnergyRangeWithDoubleValue;
typedef std::vector< CexmcEnergyRangeWithDoubleValue >
CexmcEnergyRangeWithDoubleValueList;
@@ -116,6 +117,7 @@ typedef std::vector< CexmcEnergyRangeWithDoubleValue >
std::ostream & operator<<( std::ostream & out,
const CexmcEnergyRangeWithDoubleValue & range );
std::ostream & operator<<( std::ostream & out,
const CexmcEnergyRangeWithDoubleValueList & range );
@@ -47,6 +47,7 @@
#include <G4VPhysicsConstructor.hh>
#include <G4ProcessManager.hh>
#include <G4ParticleDefinition.hh>
#include "CexmcFakeCrossSectionData.hh"
#include "CexmcStudiedProcess.hh"
#include "CexmcPhysicsManager.hh"
#include "CexmcProductionModel.hh"
@@ -106,7 +107,7 @@ void CexmcStudiedPhysics< Process >::ConstructParticle( void )
}
template <typename Process >
template < typename Process >
void CexmcStudiedPhysics< Process >::ConstructProcess( void )
{
if ( wasActivated )
@@ -116,6 +117,8 @@ void CexmcStudiedPhysics< Process >::ConstructProcess( void )
Process * process( new Process );
process->AddDataSet( new CexmcFakeCrossSectionData );
CexmcStudiedProcess * studiedProcess( new CexmcStudiedProcess(
physicsManager, process->GetProcessType() ) );
@@ -52,10 +52,10 @@ class CexmcTrackInfo : public G4VUserTrackInformation
{
public:
explicit CexmcTrackInfo( CexmcTrackType trackType = CexmcInsipidTrack,
G4int copyNumber = 0 );
G4int copyNumber = 0 );
public:
void Print( void ) const;
void Print( void ) const;
public:
virtual G4int GetTypeInfo( void ) const;
@@ -110,7 +110,7 @@ extern G4Allocator< CexmcTrackPointInfo > trackPointInfoAllocator;
inline void * CexmcTrackPointInfo::operator new( size_t )
{
return trackPointInfoAllocator.MallocSingle();
return trackPointInfoAllocator.MallocSingle();
}
@@ -124,5 +124,6 @@ inline void CexmcTrackPointInfo::operator delete( void * obj )
std::ostream & operator<<( std::ostream & out,
const CexmcTrackPointInfo & trackPointInfo );
#endif
@@ -44,25 +44,25 @@
#ifndef CEXMC_TRACK_POINTS_HH
#define CEXMC_TRACK_POINTS_HH
#include <G4VPrimitiveScorer.hh>
#include <G4THitsMap.hh>
#include "CexmcPrimitiveScorer.hh"
#include "CexmcTrackPointInfo.hh"
class G4HCofThisEvent;
class G4Step;
class CexmcSensitiveDetectorMessenger;
typedef G4THitsMap< CexmcTrackPointInfo > CexmcTrackPointsCollection;
typedef std::map< G4int, CexmcTrackPointInfo * >
CexmcTrackPointsCollectionData;
class CexmcTrackPoints : public G4VPrimitiveScorer
class CexmcTrackPoints : public CexmcPrimitiveScorer
{
public:
explicit CexmcTrackPoints( const G4String & name );
virtual ~CexmcTrackPoints();
public:
void Initialize( G4HCofThisEvent * hcOfThisEvent );
@@ -82,12 +82,10 @@ class CexmcTrackPoints : public G4VPrimitiveScorer
G4bool ProcessHits( G4Step * step, G4TouchableHistory * tHistory );
protected:
CexmcTrackPointsCollection * eventMap;
CexmcTrackPointsCollection * eventMap;
private:
CexmcSensitiveDetectorMessenger * messenger;
G4int hcId;
G4int hcId;
};
@@ -56,7 +56,7 @@ class CexmcTrackPointsInCalorimeter : public CexmcTrackPointsInLeftRightSet
const CexmcSetup * setup );
public:
void PrintAll( void );
void PrintAll( void );
protected:
G4int GetIndex( G4Step * step );
@@ -71,9 +71,9 @@ class CexmcTrackPointsInCalorimeter : public CexmcTrackPointsInLeftRightSet
static G4int GetCopyDepth1BitsOffset( void );
protected:
static G4int copyDepth0BitsOffset;
static const G4int copyDepth0BitsOffset = 8;
static G4int copyDepth1BitsOffset;
static const G4int copyDepth1BitsOffset = 16;
};
@@ -58,7 +58,7 @@ class CexmcTrackPointsInLeftRightSet : public CexmcTrackPoints
const CexmcSetup * setup );
public:
void PrintAll( void );
void PrintAll( void );
protected:
G4int GetIndex( G4Step * step );
@@ -69,10 +69,10 @@ class CexmcTrackPointsInLeftRightSet : public CexmcTrackPoints
public:
static CexmcSide GetSide( G4int index );
static G4int GetLeftRightBitsOffset( void );
static G4int GetLeftRightBitsOffset( void );
protected:
static G4int leftRightBitsOffset;
static const G4int leftRightBitsOffset = 24;
};
@@ -63,7 +63,7 @@ struct CexmcTrackPointsStore
monitorTP( monitorTP ), targetTPBeamParticle( targetTPBeamParticle ),
targetTPOutputParticle( targetTPOutputParticle ),
targetTPNucleusParticle( targetTPNucleusParticle ),
targetTPOutputParticleDecayProductParticle1 (
targetTPOutputParticleDecayProductParticle1(
targetTPOutputParticleDecayProductParticle1 ),
targetTPOutputParticleDecayProductParticle2(
targetTPOutputParticleDecayProductParticle2 ),
@@ -104,7 +104,7 @@ extern G4Allocator< CexmcTrackPointsStore > trackPointsStoreAllocator;
inline void * CexmcTrackPointsStore::operator new( size_t )
{
return trackPointsStoreAllocator.MallocSingle();
return trackPointsStoreAllocator.MallocSingle();
}