Geant4  10.02.p03
CexmcEventAction Class Reference

#include <CexmcEventAction.hh>

Inheritance diagram for CexmcEventAction:
Collaboration diagram for CexmcEventAction:

Public Member Functions

 CexmcEventAction (CexmcPhysicsManager *physicsManager, G4int verbose=0)
 
virtual ~CexmcEventAction ()
 
void BeginOfEventAction (const G4Event *event)
 
void EndOfEventAction (const G4Event *event)
 
void BeamParticleChangeHook (void)
 
void SetVerboseOnCexmcLevel (G4int value)
 
void SetVerboseDrawLevel (G4int value)
 
CexmcChargeExchangeReconstructorGetReconstructor (void)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Static Public Member Functions

static CexmcEnergyDepositStoreMakeEnergyDepositStore (const CexmcEnergyDepositDigitizer *digitizer)
 
static CexmcTrackPointsStoreMakeTrackPointsStore (const CexmcTrackPointsDigitizer *digitizer)
 
static void PrintEnergyDeposit (const CexmcEnergyDepositStore *edStore)
 
static void PrintTrackPoints (const CexmcTrackPointsStore *tpStore)
 
static void PrintProductionModelData (const CexmcAngularRangeList &angularRanges, const CexmcProductionModelData &pmData)
 

Private Member Functions

void PrintReconstructedData (const CexmcAngularRangeList &angularRanges, const CexmcAngularRange &angularGap) const
 
void DrawTrajectories (const G4Event *event)
 
void DrawTrackPoints (const CexmcTrackPointsStore *tpStore) const
 
void DrawReconstructionData (void)
 
void UpdateRunHits (const CexmcAngularRangeList &aRangesReal, const CexmcAngularRangeList &aRangesRec, G4bool tpDigitizerHasTriggered, G4bool edDigitizerHasTriggered, G4bool edDigitizerMonitorHasTriggered, G4bool reconstructorHasTriggered, const CexmcAngularRange &aGap)
 

Private Attributes

CexmcPhysicsManagerphysicsManager
 
CexmcChargeExchangeReconstructorreconstructor
 
G4double opKinEnergy
 
G4int verbose
 
G4int verboseDraw
 
CexmcEventActionMessengermessenger
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 61 of file CexmcEventAction.hh.

Constructor & Destructor Documentation

◆ CexmcEventAction()

CexmcEventAction::CexmcEventAction ( CexmcPhysicsManager physicsManager,
G4int  verbose = 0 
)
explicit

Definition at line 94 of file CexmcEventAction.cc.

95  :
96  physicsManager( physicsManager ), reconstructor( NULL ), opKinEnergy( 0. ),
97  verbose( verbose ), verboseDraw( 4 ), messenger( NULL )
98 {
99  G4DigiManager * digiManager( G4DigiManager::GetDMpointer() );
100  digiManager->AddNewModule( new CexmcEnergyDepositDigitizer(
102  digiManager->AddNewModule( new CexmcTrackPointsDigitizer(
105  physicsManager->GetProductionModel() );
106  messenger = new CexmcEventActionMessenger( this );
107 }
CexmcEventActionMessenger * messenger
const G4String CexmcTPDigitizerName("TPDig")
CexmcChargeExchangeReconstructor * reconstructor
static G4DigiManager * GetDMpointer()
const G4String CexmcEDDigitizerName("EDDig")
CexmcPhysicsManager * physicsManager
virtual CexmcProductionModel * GetProductionModel(void)=0
Here is the call graph for this function:

◆ ~CexmcEventAction()

CexmcEventAction::~CexmcEventAction ( )
virtual

Definition at line 110 of file CexmcEventAction.cc.

111 {
112  delete reconstructor;
113  delete messenger;
114 }
CexmcEventActionMessenger * messenger
CexmcChargeExchangeReconstructor * reconstructor

Member Function Documentation

◆ BeamParticleChangeHook()

void CexmcEventAction::BeamParticleChangeHook ( void  )

Definition at line 117 of file CexmcEventAction.cc.

118 {
120 }
CexmcChargeExchangeReconstructor * reconstructor
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginOfEventAction()

void CexmcEventAction::BeginOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 123 of file CexmcEventAction.cc.

124 {
125  G4RunManager * runManager( G4RunManager::GetRunManager() );
126  CexmcTrackingAction * trackingAction
127  ( static_cast< CexmcTrackingAction * >(
128  const_cast< G4UserTrackingAction * >(
129  runManager->GetUserTrackingAction() ) ) );
130  trackingAction->BeginOfEventAction();
131 
133 }
CexmcPhysicsManager * physicsManager
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
void ResetNumberOfTriggeredStudiedInteractions(void)
Here is the call graph for this function:

◆ DrawReconstructionData()

void CexmcEventAction::DrawReconstructionData ( void  )
private

Definition at line 645 of file CexmcEventAction.cc.

646 {
647  G4VisManager * visManager( static_cast< G4VisManager * >(
649  if ( ! visManager || ! visManager->GetCurrentGraphicsSystem() )
650  return;
651 
653  circle.SetScreenSize( CexmcSmallCircleScreenSize );
654  circle.SetFillStyle( G4Circle::filled );
655  G4VisAttributes visAttributes( CexmcRecTrackPointsMarkerColour );
656  circle.SetVisAttributes( visAttributes );
657  visManager->Draw( circle );
658 
659  circle.SetScreenSize( CexmcBigCircleScreenSize );
660  circle.SetPosition( reconstructor->GetCalorimeterEPLeftWorldPosition() );
661  visManager->Draw( circle );
662 
663  circle.SetPosition( reconstructor->GetCalorimeterEPRightWorldPosition() );
664  visManager->Draw( circle );
665 }
static G4VVisManager * GetConcreteInstance()
CexmcChargeExchangeReconstructor * reconstructor
const G4ThreeVector & GetCalorimeterEPLeftWorldPosition(void) const
const G4ThreeVector & GetCalorimeterEPRightWorldPosition(void) const
const G4ThreeVector & GetTargetEPWorldPosition(void) const
void SetScreenSize(G4double)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawTrackPoints()

void CexmcEventAction::DrawTrackPoints ( const CexmcTrackPointsStore tpStore) const
private

Definition at line 587 of file CexmcEventAction.cc.

589 {
590  G4VisManager * visManager( static_cast< G4VisManager * >(
592  if ( ! visManager || ! visManager->GetCurrentGraphicsSystem() )
593  return;
594 
595  G4Circle circle;
596  G4VisAttributes visAttributes( CexmcTrackPointsMarkerColour );
597  circle.SetScreenSize( CexmcSmallCircleScreenSize );
598  circle.SetFillStyle( G4Circle::filled );
599  circle.SetVisAttributes( visAttributes );
600 
601  if ( tpStore->monitorTP.IsValid() )
602  {
603  circle.SetPosition( tpStore->monitorTP.positionWorld );
604  visManager->Draw( circle );
605  }
606 
607  if ( tpStore->targetTPBeamParticle.IsValid() )
608  {
610  visManager->Draw( circle );
611  }
612 
613  if ( tpStore->targetTPOutputParticle.IsValid() )
614  {
616  visManager->Draw( circle );
617  }
618 
619  if ( tpStore->vetoCounterTPLeft.IsValid() )
620  {
621  circle.SetPosition( tpStore->vetoCounterTPLeft.positionWorld );
622  visManager->Draw( circle );
623  }
624 
625  if ( tpStore->vetoCounterTPRight.IsValid() )
626  {
627  circle.SetPosition( tpStore->vetoCounterTPRight.positionWorld );
628  visManager->Draw( circle );
629  }
630 
631  if ( tpStore->calorimeterTPLeft.IsValid() )
632  {
633  circle.SetPosition( tpStore->calorimeterTPLeft.positionWorld );
634  visManager->Draw( circle );
635  }
636 
637  if ( tpStore->calorimeterTPRight.IsValid() )
638  {
639  circle.SetPosition( tpStore->calorimeterTPRight.positionWorld );
640  visManager->Draw( circle );
641  }
642 }
static G4VVisManager * GetConcreteInstance()
G4bool IsValid(void) const
void SetFillStyle(FillStyle)
const CexmcTrackPointInfo & calorimeterTPRight
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
void SetPosition(const G4Point3D &)
const CexmcTrackPointInfo & vetoCounterTPRight
const CexmcTrackPointInfo & vetoCounterTPLeft
const CexmcTrackPointInfo & targetTPOutputParticle
const CexmcTrackPointInfo & calorimeterTPLeft
const CexmcTrackPointInfo & targetTPBeamParticle
const CexmcTrackPointInfo & monitorTP
void SetScreenSize(G4double)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawTrajectories()

void CexmcEventAction::DrawTrajectories ( const G4Event event)
private

Definition at line 564 of file CexmcEventAction.cc.

565 {
566  G4VisManager * visManager( static_cast< G4VisManager * >(
568  if ( ! visManager || ! visManager->GetCurrentGraphicsSystem() )
569  return;
570 
571  G4int nTraj( 0 );
572  G4TrajectoryContainer * trajContainer( event->GetTrajectoryContainer() );
573 
574  if ( ! trajContainer )
575  return;
576 
577  nTraj = trajContainer->entries();
578 
579  for ( int i( 0 ); i < nTraj; ++i )
580  {
581  G4VTrajectory * traj( ( *trajContainer )[ i ] );
582  traj->DrawTrajectory();
583  }
584 }
static G4VVisManager * GetConcreteInstance()
int G4int
Definition: G4Types.hh:78
G4TrajectoryContainer * GetTrajectoryContainer() const
Definition: G4Event.hh:189
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndOfEventAction()

void CexmcEventAction::EndOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 799 of file CexmcEventAction.cc.

800 {
801  G4DigiManager * digiManager( G4DigiManager::GetDMpointer() );
802  CexmcEnergyDepositDigitizer * energyDepositDigitizer(
803  static_cast< CexmcEnergyDepositDigitizer * >( digiManager->
804  FindDigitizerModule( CexmcEDDigitizerName ) ) );
805  CexmcTrackPointsDigitizer * trackPointsDigitizer(
806  static_cast< CexmcTrackPointsDigitizer * >( digiManager->
807  FindDigitizerModule( CexmcTPDigitizerName ) ) );
808 
809  energyDepositDigitizer->Digitize();
810  trackPointsDigitizer->Digitize();
811 
812  G4bool edDigitizerMonitorHasTriggered(
813  energyDepositDigitizer->MonitorHasTriggered() );
814  G4bool edDigitizerHasTriggered( false );
815 
816  CexmcEventInfo * eventInfo( static_cast< CexmcEventInfo * >(
817  event->GetUserInformation() ) );
818  if ( ! eventInfo || eventInfo->EdTriggerIsOk() )
819  edDigitizerHasTriggered = energyDepositDigitizer->HasTriggered();
820 
821  G4bool tpDigitizerHasTriggered( trackPointsDigitizer->HasTriggered() );
822  G4bool reconstructorHasBasicTrigger( false );
823  G4bool reconstructorHasFullTrigger( false );
824 
826  energyDepositDigitizer ) );
828  trackPointsDigitizer ) );
829 
830  try
831  {
832  CexmcProductionModel * productionModel(
834 
835  if ( ! productionModel )
837 
838  const CexmcAngularRangeList & angularRanges(
839  productionModel->GetAngularRanges() );
840  const CexmcAngularRangeList & triggeredAngularRanges(
841  productionModel->GetTriggeredAngularRanges() );
842  const CexmcProductionModelData & pmData(
843  productionModel->GetProductionModelData() );
844 
845  if ( edDigitizerHasTriggered )
846  {
847  reconstructor->Reconstruct( edStore );
848  reconstructorHasBasicTrigger = reconstructor->HasBasicTrigger();
849  reconstructorHasFullTrigger = reconstructor->HasFullTrigger();
850  }
851 
852  CexmcAngularRangeList triggeredRecAngularRanges;
853 
854  if ( reconstructorHasBasicTrigger )
855  {
856  for ( CexmcAngularRangeList::const_iterator
857  k( angularRanges.begin() ); k != angularRanges.end(); ++k )
858  {
860  outputParticleSCM.cosTheta() );
861  if ( cosTheta <= k->top && cosTheta > k->bottom )
862  triggeredRecAngularRanges.push_back( CexmcAngularRange(
863  k->top, k->bottom, k->index ) );
864  }
865  }
866 
867  CexmcAngularRange angularGap( 0.0, 0.0, 0 );
868  if ( triggeredRecAngularRanges.empty() )
869  {
870  CexmcAngularRangeList angularGaps;
871  GetAngularGaps( angularRanges, angularGaps );
872  for ( CexmcAngularRangeList::const_iterator
873  k( angularGaps.begin() ); k != angularGaps.end(); ++k )
874  {
876  outputParticleSCM.cosTheta() );
877  if ( cosTheta <= k->top && cosTheta > k->bottom )
878  {
879  angularGap = *k;
880  break;
881  }
882  }
883  }
884 
885  UpdateRunHits( triggeredAngularRanges, triggeredRecAngularRanges,
886  tpDigitizerHasTriggered, edDigitizerHasTriggered,
887  edDigitizerMonitorHasTriggered,
888  reconstructorHasFullTrigger, angularGap );
889 
890  if ( verbose > 0 )
891  {
892  G4bool printMessages( verbose > 3 ||
893  ( ( verbose == 1 ) && tpDigitizerHasTriggered ) ||
894  ( ( verbose == 2 ) && edDigitizerHasTriggered ) ||
895  ( ( verbose == 3 ) && ( tpDigitizerHasTriggered ||
896  edDigitizerHasTriggered ) ) );
897  if ( printMessages )
898  {
899  G4cout << "Event " << event->GetEventID() << G4endl;
900  if ( tpDigitizerHasTriggered )
901  {
902  PrintTrackPoints( tpStore );
903  PrintProductionModelData( triggeredAngularRanges, pmData );
904  }
905  if ( reconstructorHasBasicTrigger )
906  PrintReconstructedData( triggeredRecAngularRanges,
907  angularGap );
908  if ( edDigitizerHasTriggered )
909  PrintEnergyDeposit( edStore );
910  }
911  }
912 
913  if ( verboseDraw > 0 )
914  {
915  G4bool drawTrajectories( verboseDraw > 3 ||
916  ( ( verboseDraw == 1 ) && tpDigitizerHasTriggered ) ||
917  ( ( verboseDraw == 2 ) && edDigitizerHasTriggered ) ||
918  ( ( verboseDraw == 3 ) && ( tpDigitizerHasTriggered ||
919  edDigitizerHasTriggered ) ) );
920  if ( drawTrajectories )
921  {
922  DrawTrajectories( event );
923  if ( tpDigitizerHasTriggered )
924  DrawTrackPoints( tpStore );
925  if ( reconstructorHasBasicTrigger )
927  }
928  }
929 
930 #ifdef CEXMC_USE_PERSISTENCY
931  if ( edDigitizerHasTriggered || tpDigitizerHasTriggered )
932  {
933  SaveEventFast( event, tpDigitizerHasTriggered,
934  edDigitizerHasTriggered,
935  edDigitizerMonitorHasTriggered,
936  pmData.outputParticleSCM.cosTheta() );
937  SaveEvent( event, edDigitizerHasTriggered, edStore, tpStore,
938  pmData );
939  }
940 #endif
941 
942 #ifdef CEXMC_USE_ROOT
943  /* opKinEnergy will be used in several histos */
944  if ( tpStore->targetTPOutputParticle.IsValid() )
945  {
946  opKinEnergy = CexmcGetKinEnergy(
947  tpStore->targetTPOutputParticle.momentumAmp,
948  tpStore->targetTPOutputParticle.particle->GetPDGMass() );
949  }
950 
951  if ( edDigitizerHasTriggered )
952  FillEDTHistos( edStore, triggeredAngularRanges );
953 
954  /* fill TPT histos only when the monitor has triggered because events
955  * when it was missed have less value for us */
956  if ( tpDigitizerHasTriggered && edDigitizerMonitorHasTriggered )
957  FillTPTHistos( tpStore, pmData, triggeredAngularRanges );
958 
959  if ( reconstructorHasBasicTrigger )
960  FillRTHistos( reconstructorHasFullTrigger, edStore, tpStore,
961  pmData, triggeredAngularRanges );
962 #endif
963 
964  G4Event * theEvent( const_cast< G4Event * >( event ) );
965  if ( eventInfo )
966  {
967  delete eventInfo;
968  theEvent->SetUserInformation( NULL );
969  }
970  theEvent->SetUserInformation( new CexmcEventInfo(
971  edDigitizerHasTriggered,
972  tpDigitizerHasTriggered,
973  reconstructorHasFullTrigger ) );
974  }
975  catch ( CexmcException & e )
976  {
977  G4cout << e.what() << G4endl;
978  }
979  catch ( ... )
980  {
981  G4cout << "Unknown exception caught" << G4endl;
982  }
983 
984  delete edStore;
985  delete tpStore;
986 }
const G4String CexmcTPDigitizerName("TPDig")
const char * what(void) const
CexmcChargeExchangeReconstructor * reconstructor
static G4DigiManager * GetDMpointer()
static void PrintProductionModelData(const CexmcAngularRangeList &angularRanges, const CexmcProductionModelData &pmData)
void DrawReconstructionData(void)
const G4String CexmcEDDigitizerName("EDDig")
void UpdateRunHits(const CexmcAngularRangeList &aRangesReal, const CexmcAngularRangeList &aRangesRec, G4bool tpDigitizerHasTriggered, G4bool edDigitizerHasTriggered, G4bool edDigitizerMonitorHasTriggered, G4bool reconstructorHasTriggered, const CexmcAngularRange &aGap)
G4VUserEventInformation * GetUserInformation() const
Definition: G4Event.hh:199
G4GLOB_DLL std::ostream G4cout
CexmcPhysicsManager * physicsManager
void Reconstruct(const CexmcEnergyDepositStore *edStore)
bool G4bool
Definition: G4Types.hh:79
static CexmcEnergyDepositStore * MakeEnergyDepositStore(const CexmcEnergyDepositDigitizer *digitizer)
static void PrintTrackPoints(const CexmcTrackPointsStore *tpStore)
static void PrintEnergyDeposit(const CexmcEnergyDepositStore *edStore)
static CexmcTrackPointsStore * MakeTrackPointsStore(const CexmcTrackPointsDigitizer *digitizer)
void DrawTrajectories(const G4Event *event)
void DrawTrackPoints(const CexmcTrackPointsStore *tpStore) const
std::vector< CexmcAngularRange > CexmcAngularRangeList
#define G4endl
Definition: G4ios.hh:61
const CexmcProductionModelData & GetProductionModelData(void) const
double G4double
Definition: G4Types.hh:76
virtual CexmcProductionModel * GetProductionModel(void)=0
void GetAngularGaps(const CexmcAngularRangeList &src, CexmcAngularRangeList &dst)
G4bool HasBasicTrigger(void) const
void PrintReconstructedData(const CexmcAngularRangeList &angularRanges, const CexmcAngularRange &angularGap) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReconstructor()

CexmcChargeExchangeReconstructor * CexmcEventAction::GetReconstructor ( void  )
inline

Definition at line 177 of file CexmcEventAction.hh.

178 {
179  return reconstructor;
180 }
CexmcChargeExchangeReconstructor * reconstructor
Here is the caller graph for this function:

◆ MakeEnergyDepositStore()

CexmcEnergyDepositStore * CexmcEventAction::MakeEnergyDepositStore ( const CexmcEnergyDepositDigitizer digitizer)
static

Definition at line 136 of file CexmcEventAction.cc.

138 {
139  G4double monitorED( digitizer->GetMonitorED() );
140  G4double vetoCounterEDLeft( digitizer->GetVetoCounterEDLeft() );
141  G4double vetoCounterEDRight( digitizer->GetVetoCounterEDRight() );
142  G4double calorimeterEDLeft( digitizer->GetCalorimeterEDLeft() );
143  G4double calorimeterEDRight( digitizer->GetCalorimeterEDRight() );
144  G4int calorimeterEDLeftMaxX( digitizer->GetCalorimeterEDLeftMaxX() );
145  G4int calorimeterEDLeftMaxY( digitizer->GetCalorimeterEDLeftMaxY() );
146  G4int calorimeterEDRightMaxX( digitizer->GetCalorimeterEDRightMaxX() );
147  G4int calorimeterEDRightMaxY( digitizer->GetCalorimeterEDRightMaxY() );
148 
150  calorimeterEDLeftCollection(
151  digitizer->GetCalorimeterEDLeftCollection() );
153  calorimeterEDRightCollection(
154  digitizer->GetCalorimeterEDRightCollection() );
155 
156  /* ATTENTION: return object in heap - must be freed by caller! */
157  return new CexmcEnergyDepositStore( monitorED, vetoCounterEDLeft,
158  vetoCounterEDRight, calorimeterEDLeft, calorimeterEDRight,
159  calorimeterEDLeftMaxX, calorimeterEDLeftMaxY,
160  calorimeterEDRightMaxX, calorimeterEDRightMaxY,
161  calorimeterEDLeftCollection, calorimeterEDRightCollection );
162 }
const CexmcEnergyDepositCalorimeterCollection & GetCalorimeterEDLeftCollection(void) const
int G4int
Definition: G4Types.hh:78
std::vector< CexmcEnergyDepositCrystalRowCollection > CexmcEnergyDepositCalorimeterCollection
Definition: CexmcCommon.hh:58
const CexmcEnergyDepositCalorimeterCollection & GetCalorimeterEDRightCollection(void) const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeTrackPointsStore()

CexmcTrackPointsStore * CexmcEventAction::MakeTrackPointsStore ( const CexmcTrackPointsDigitizer digitizer)
static

Definition at line 165 of file CexmcEventAction.cc.

167 {
168  const CexmcTrackPointInfo &
169  monitorTP( digitizer->GetMonitorTP() );
170  const CexmcTrackPointInfo &
171  targetTPBeamParticle(
172  digitizer->GetTargetTPBeamParticle() );
173  const CexmcTrackPointInfo &
174  targetTPOutputParticle(
175  digitizer->GetTargetTPOutputParticle() );
176  const CexmcTrackPointInfo &
177  targetTPNucleusParticle(
178  digitizer->GetTargetTPNucleusParticle() );
179  const CexmcTrackPointInfo &
180  targetTPOutputParticleDecayProductParticle1(
181  digitizer->
182  GetTargetTPOutputParticleDecayProductParticle( 0 ) );
183  const CexmcTrackPointInfo &
184  targetTPOutputParticleDecayProductParticle2(
185  digitizer->
186  GetTargetTPOutputParticleDecayProductParticle( 1 ) );
187  const CexmcTrackPointInfo &
188  vetoCounterTPLeft(
189  digitizer->GetVetoCounterTPLeft() );
190  const CexmcTrackPointInfo &
191  vetoCounterTPRight(
192  digitizer->GetVetoCounterTPRight() );
193  const CexmcTrackPointInfo &
194  calorimeterTPLeft(
195  digitizer->GetCalorimeterTPLeft() );
196  const CexmcTrackPointInfo &
197  calorimeterTPRight(
198  digitizer->GetCalorimeterTPRight() );
199 
200  /* ATTENTION: return object in heap - must be freed by caller! */
201  return new CexmcTrackPointsStore( monitorTP, targetTPBeamParticle,
202  targetTPOutputParticle, targetTPNucleusParticle,
203  targetTPOutputParticleDecayProductParticle1,
204  targetTPOutputParticleDecayProductParticle2,
205  vetoCounterTPLeft, vetoCounterTPRight,
206  calorimeterTPLeft, calorimeterTPRight );
207 }
const CexmcTrackPointInfo & GetCalorimeterTPLeft(void) const
const CexmcTrackPointInfo & GetMonitorTP(void) const
const CexmcTrackPointInfo & GetVetoCounterTPLeft(void) const
const CexmcTrackPointInfo & GetCalorimeterTPRight(void) const
const CexmcTrackPointInfo & GetVetoCounterTPRight(void) const
const CexmcTrackPointInfo & GetTargetTPOutputParticle(void) const
const CexmcTrackPointInfo & GetTargetTPBeamParticle(void) const
const CexmcTrackPointInfo & GetTargetTPNucleusParticle(void) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintEnergyDeposit()

void CexmcEventAction::PrintEnergyDeposit ( const CexmcEnergyDepositStore edStore)
static

Definition at line 210 of file CexmcEventAction.cc.

212 {
213  G4cout << " --- Energy Deposit" << G4endl;
214  G4cout << " monitor : " <<
215  G4BestUnit( edStore->monitorED, "Energy" ) << G4endl;
216  G4cout << " vc (l) : " <<
217  G4BestUnit( edStore->vetoCounterEDLeft, "Energy" ) << G4endl;
218  G4cout << " vc (r) : " <<
219  G4BestUnit( edStore->vetoCounterEDRight, "Energy" ) << G4endl;
220  G4cout << " cal (l) : " <<
221  G4BestUnit( edStore->calorimeterEDLeft, "Energy" );
223  G4cout << " cal (r) : " <<
224  G4BestUnit( edStore->calorimeterEDRight, "Energy" );
226 }
const CexmcEnergyDepositCalorimeterCollection & calorimeterEDLeftCollection
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const CexmcEnergyDepositCalorimeterCollection & calorimeterEDRightCollection
Here is the caller graph for this function:

◆ PrintProductionModelData()

void CexmcEventAction::PrintProductionModelData ( const CexmcAngularRangeList angularRanges,
const CexmcProductionModelData pmData 
)
static

Definition at line 259 of file CexmcEventAction.cc.

262 {
263  G4cout << " --- Triggered angular ranges: " << angularRanges;
264  G4cout << " --- Production model data: " << pmData;
265 }
G4GLOB_DLL std::ostream G4cout
Here is the caller graph for this function:

◆ PrintReconstructedData()

void CexmcEventAction::PrintReconstructedData ( const CexmcAngularRangeList angularRanges,
const CexmcAngularRange angularGap 
) const
private

Definition at line 268 of file CexmcEventAction.cc.

271 {
272  G4cout << " --- Reconstructed data: " << G4endl;
273  G4cout << " -- entry points:" << G4endl;
274  G4cout << " left: " << G4BestUnit(
275  reconstructor->GetCalorimeterEPLeftPosition(), "Length" ) << G4endl;
276  G4cout << " right: " << G4BestUnit(
277  reconstructor->GetCalorimeterEPRightPosition(), "Length" ) << G4endl;
278  G4cout << " target: " << G4BestUnit(
279  reconstructor->GetTargetEPPosition(), "Length" ) << G4endl;
280  G4cout << " -- the angle: " << reconstructor->GetTheAngle() / deg <<
281  " deg" << G4endl;
282  G4cout << " -- mass of the output particle: " << G4BestUnit(
283  reconstructor->GetOutputParticleMass(), "Energy" ) << G4endl;
284  G4cout << " -- mass of the nucleus output particle: " << G4BestUnit(
285  reconstructor->GetNucleusOutputParticleMass(), "Energy" ) << G4endl;
286  if ( reconstructor->IsMassCutUsed() )
287  {
289  G4cout << " < mass cut passed >" << G4endl;
290  else
291  G4cout << " < mass cut failed >" << G4endl;
292  }
294  {
296  G4cout << " < absorbed energy cut passed >" << G4endl;
297  else
298  G4cout << " < absorbed energy cut failed >" << G4endl;
299  }
300  const CexmcProductionModelData & pmData(
302  G4cout << " -- production model data: " << pmData;
303  G4cout << " -- triggered angular ranges: ";
304  if ( triggeredRecAngularRanges.empty() )
305  G4cout << "< orphan detected, gap " << angularGap << " >" << G4endl;
306  else
307  G4cout << triggeredRecAngularRanges;
308 }
CexmcChargeExchangeReconstructor * reconstructor
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
static const double deg
Definition: G4SIunits.hh:151
G4double GetTheAngle(void) const
#define G4endl
Definition: G4ios.hh:61
const G4ThreeVector & GetCalorimeterEPRightPosition(void) const
const G4ThreeVector & GetCalorimeterEPLeftPosition(void) const
const CexmcProductionModelData & GetProductionModelData(void) const
const G4ThreeVector & GetTargetEPPosition(void) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintTrackPoints()

void CexmcEventAction::PrintTrackPoints ( const CexmcTrackPointsStore tpStore)
static

Definition at line 229 of file CexmcEventAction.cc.

231 {
232  if ( ! tpStore )
233  return;
234 
235  G4cout << " --- Track Points" << G4endl;
236  G4cout << " monitor : " << tpStore->monitorTP << G4endl;
237  G4cout << " target : " << tpStore->targetTPBeamParticle << G4endl;
238  G4cout << " : " << tpStore->targetTPOutputParticle << G4endl;
239  G4cout << " : " << tpStore->targetTPNucleusParticle << G4endl;
240  G4cout << " : " <<
242  G4cout << " : " <<
244  G4cout << " vc (l) : " << tpStore->vetoCounterTPLeft << G4endl;
245  G4cout << " vc (r) : " << tpStore->vetoCounterTPRight << G4endl;
246  G4cout << " cal (l) : " << tpStore->calorimeterTPLeft << G4endl;
247  G4cout << " cal (r) : " << tpStore->calorimeterTPRight << G4endl;
248  G4cout << " ---" << G4endl;
249  G4cout << " angle between the " <<
251  " decay products : " <<
253  angle(
255  deg << " deg" << G4endl;
256 }
static G4double angle[DIM]
const CexmcTrackPointInfo & targetTPNucleusParticle
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static const double deg
Definition: G4SIunits.hh:151
const CexmcTrackPointInfo & calorimeterTPRight
const CexmcTrackPointInfo & vetoCounterTPRight
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle2
const CexmcTrackPointInfo & vetoCounterTPLeft
#define G4endl
Definition: G4ios.hh:61
const CexmcTrackPointInfo & targetTPOutputParticle
const CexmcTrackPointInfo & calorimeterTPLeft
const CexmcTrackPointInfo & targetTPBeamParticle
const CexmcTrackPointInfo & monitorTP
G4ThreeVector directionWorld
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle1
const G4ParticleDefinition * particle
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerboseDrawLevel()

void CexmcEventAction::SetVerboseDrawLevel ( G4int  value)
inline

Definition at line 170 of file CexmcEventAction.hh.

171 {
172  verboseDraw = value;
173 }
Here is the caller graph for this function:

◆ SetVerboseOnCexmcLevel()

void CexmcEventAction::SetVerboseOnCexmcLevel ( G4int  value)
inline

Definition at line 164 of file CexmcEventAction.hh.

165 {
166  verbose = value;
167 }
Here is the caller graph for this function:

◆ UpdateRunHits()

void CexmcEventAction::UpdateRunHits ( const CexmcAngularRangeList aRangesReal,
const CexmcAngularRangeList aRangesRec,
G4bool  tpDigitizerHasTriggered,
G4bool  edDigitizerHasTriggered,
G4bool  edDigitizerMonitorHasTriggered,
G4bool  reconstructorHasTriggered,
const CexmcAngularRange aGap 
)
private

Definition at line 668 of file CexmcEventAction.cc.

676 {
677  G4RunManager * runManager( G4RunManager::GetRunManager() );
678  const CexmcRun * run( static_cast< const CexmcRun * >(
679  runManager->GetCurrentRun() ) );
680  CexmcRun * theRun( const_cast< CexmcRun * >( run ) );
681 
682  if ( tpDigitizerHasTriggered )
683  {
684  for ( CexmcAngularRangeList::const_iterator k( aRangesReal.begin() );
685  k != aRangesReal.end(); ++k )
686  {
687  theRun->IncrementNmbOfHitsSampledFull( k->index );
688  if ( edDigitizerMonitorHasTriggered )
689  theRun->IncrementNmbOfHitsSampled( k->index );
690  if ( reconstructorHasFullTrigger )
691  theRun->IncrementNmbOfHitsTriggeredRealRange( k->index );
692  }
693  if ( reconstructorHasFullTrigger )
694  {
695  if ( aRangesRec.empty() )
696  {
697  theRun->IncrementNmbOfOrphanHits( aGap.index );
698  }
699  else
700  {
701  for ( CexmcAngularRangeList::const_iterator
702  k( aRangesRec.begin() ); k != aRangesRec.end(); ++k )
703  {
704  theRun->IncrementNmbOfHitsTriggeredRecRange( k->index );
705  }
706  }
707  }
708  }
709  else
710  {
711  if ( edDigitizerHasTriggered )
712  theRun->IncrementNmbOfFalseHitsTriggeredEDT();
713  if ( reconstructorHasFullTrigger )
714  theRun->IncrementNmbOfFalseHitsTriggeredRec();
715  }
716 }
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ messenger

CexmcEventActionMessenger* CexmcEventAction::messenger
private

Definition at line 160 of file CexmcEventAction.hh.

◆ opKinEnergy

G4double CexmcEventAction::opKinEnergy
private

Definition at line 153 of file CexmcEventAction.hh.

◆ physicsManager

CexmcPhysicsManager* CexmcEventAction::physicsManager
private

Definition at line 149 of file CexmcEventAction.hh.

◆ reconstructor

CexmcChargeExchangeReconstructor* CexmcEventAction::reconstructor
private

Definition at line 151 of file CexmcEventAction.hh.

◆ verbose

G4int CexmcEventAction::verbose
private

Definition at line 156 of file CexmcEventAction.hh.

◆ verboseDraw

G4int CexmcEventAction::verboseDraw
private

Definition at line 158 of file CexmcEventAction.hh.


The documentation for this class was generated from the following files: