803 static_cast< CexmcEnergyDepositDigitizer * >( digiManager->
806 static_cast< CexmcTrackPointsDigitizer * >( digiManager->
809 energyDepositDigitizer->Digitize();
810 trackPointsDigitizer->Digitize();
812 G4bool edDigitizerMonitorHasTriggered(
813 energyDepositDigitizer->MonitorHasTriggered() );
814 G4bool edDigitizerHasTriggered(
false );
818 if ( ! eventInfo || eventInfo->EdTriggerIsOk() )
819 edDigitizerHasTriggered = energyDepositDigitizer->HasTriggered();
821 G4bool tpDigitizerHasTriggered( trackPointsDigitizer->HasTriggered() );
822 G4bool reconstructorHasBasicTrigger(
false );
823 G4bool reconstructorHasFullTrigger(
false );
826 energyDepositDigitizer ) );
828 trackPointsDigitizer ) );
835 if ( ! productionModel )
839 productionModel->GetAngularRanges() );
841 productionModel->GetTriggeredAngularRanges() );
843 productionModel->GetProductionModelData() );
845 if ( edDigitizerHasTriggered )
854 if ( reconstructorHasBasicTrigger )
856 for ( CexmcAngularRangeList::const_iterator
857 k( angularRanges.begin() ); k != angularRanges.end(); ++k )
860 outputParticleSCM.cosTheta() );
861 if ( cosTheta <= k->top && cosTheta > k->bottom )
863 k->top, k->bottom, k->index ) );
868 if ( triggeredRecAngularRanges.empty() )
872 for ( CexmcAngularRangeList::const_iterator
873 k( angularGaps.begin() ); k != angularGaps.end(); ++k )
876 outputParticleSCM.cosTheta() );
877 if ( cosTheta <= k->top && cosTheta > k->bottom )
885 UpdateRunHits( triggeredAngularRanges, triggeredRecAngularRanges,
886 tpDigitizerHasTriggered, edDigitizerHasTriggered,
887 edDigitizerMonitorHasTriggered,
888 reconstructorHasFullTrigger, angularGap );
892 G4bool printMessages( verbose > 3 ||
893 ( ( verbose == 1 ) && tpDigitizerHasTriggered ) ||
894 ( ( verbose == 2 ) && edDigitizerHasTriggered ) ||
895 ( ( verbose == 3 ) && ( tpDigitizerHasTriggered ||
896 edDigitizerHasTriggered ) ) );
900 if ( tpDigitizerHasTriggered )
905 if ( reconstructorHasBasicTrigger )
906 PrintReconstructedData( triggeredRecAngularRanges,
908 if ( edDigitizerHasTriggered )
913 if ( verboseDraw > 0 )
915 G4bool drawTrajectories( verboseDraw > 3 ||
916 ( ( verboseDraw == 1 ) && tpDigitizerHasTriggered ) ||
917 ( ( verboseDraw == 2 ) && edDigitizerHasTriggered ) ||
918 ( ( verboseDraw == 3 ) && ( tpDigitizerHasTriggered ||
919 edDigitizerHasTriggered ) ) );
920 if ( drawTrajectories )
922 DrawTrajectories( event );
923 if ( tpDigitizerHasTriggered )
924 DrawTrackPoints( tpStore );
925 if ( reconstructorHasBasicTrigger )
926 DrawReconstructionData();
930 #ifdef CEXMC_USE_PERSISTENCY
931 if ( edDigitizerHasTriggered || tpDigitizerHasTriggered )
933 SaveEventFast( event, tpDigitizerHasTriggered,
934 edDigitizerHasTriggered,
935 edDigitizerMonitorHasTriggered,
936 pmData.outputParticleSCM.cosTheta() );
937 SaveEvent( event, edDigitizerHasTriggered, edStore, tpStore,
942 #ifdef CEXMC_USE_ROOT
944 if ( tpStore->targetTPOutputParticle.IsValid() )
946 opKinEnergy = CexmcGetKinEnergy(
947 tpStore->targetTPOutputParticle.momentumAmp,
948 tpStore->targetTPOutputParticle.particle->GetPDGMass() );
951 if ( edDigitizerHasTriggered )
952 FillEDTHistos( edStore, triggeredAngularRanges );
956 if ( tpDigitizerHasTriggered && edDigitizerMonitorHasTriggered )
957 FillTPTHistos( tpStore, pmData, triggeredAngularRanges );
959 if ( reconstructorHasBasicTrigger )
960 FillRTHistos( reconstructorHasFullTrigger, edStore, tpStore,
961 pmData, triggeredAngularRanges );
964 G4Event * theEvent( const_cast< G4Event * >( event ) );
968 theEvent->SetUserInformation( NULL );
971 edDigitizerHasTriggered,
972 tpDigitizerHasTriggered,
973 reconstructorHasFullTrigger ) );
const G4String CexmcTPDigitizerName("TPDig")
G4VUserEventInformation * GetUserInformation() const
static G4DigiManager * GetDMpointer()
static void PrintProductionModelData(const CexmcAngularRangeList &angularRanges, const CexmcProductionModelData &pmData)
const G4String CexmcEDDigitizerName("EDDig")
G4GLOB_DLL std::ostream G4cout
void Reconstruct(const CexmcEnergyDepositStore *edStore)
G4bool HasBasicTrigger(void) const
static CexmcEnergyDepositStore * MakeEnergyDepositStore(const CexmcEnergyDepositDigitizer *digitizer)
static void PrintTrackPoints(const CexmcTrackPointsStore *tpStore)
static void PrintEnergyDeposit(const CexmcEnergyDepositStore *edStore)
static CexmcTrackPointsStore * MakeTrackPointsStore(const CexmcTrackPointsDigitizer *digitizer)
G4bool HasFullTrigger(void) const
const char * what(void) const
const CexmcProductionModelData & GetProductionModelData(void) const
std::vector< CexmcAngularRange > CexmcAngularRangeList
virtual CexmcProductionModel * GetProductionModel(void)=0
void GetAngularGaps(const CexmcAngularRangeList &src, CexmcAngularRangeList &dst)