#include "ISimHitMergerMain.hxx" #include "IVInputFile.hxx" #include "ICOMETOutput.hxx" #include "IG4VHit.hxx" #include "IG4HitSegment.hxx" #include "IG4HitCalo.hxx" #include "IG4HitGas.hxx" #include "IG4Trajectory.hxx" #include "IMergedEventList.hxx" #include "IIntegerDatum.hxx" #include "IProfileData.hxx" #include "ITimeShiftedTrajectory.hxx" #include "ITimeShiftedSegHit.hxx" #include "ITimeShiftedCaloHit.hxx" #include "ITimeShiftedGasHit.hxx" #include "ITimeShiftedMonHit.hxx" #include "ITimeShiftedCherenHit.hxx" #include "IVTimeShiftGenerator.hxx" #include "ITimeShiftedGasRegionDR.hxx" #include "IOADatabase.hxx" #include "IPAIDeltaRay.hxx" #include #include #include #include using namespace COMET; ISimHitMergerMain::ISimHitMergerMain(): fCurrentInput(NULL), fTrajectories(NULL), fTimeShiftGenerator(NULL), fMergedEvents(0), fMergedPOTs(0), fDesiredEventsPerBunch(0), fDesiredEvents(0), fNoBunches(1), fUseRandomBunch(true), fMinimumTime(-std::numeric_limits::max()), fMaximumTime(std::numeric_limits::max()), fGlobalShift(0), fBunchSeparation(1.17e3), fOutputEventNo(0), fSaveTrajectories(true), fProfileEvents(false), fWasEventsSet(false), fUseAllEvents(false), fWasRunNoSet(false), fWasTotalEventsSet(false) { } void ISimHitMergerMain::PrepareNewOutputEvent(){ // Reset the number of events fMergedEvents=0; // Reset the number of protons fMergedPOTs=0; // Clear the contents of the map fHitContainers.clear(); // Delete the trajectories if they exist fTrajectories=NULL; // Reset the event contributors fEventContributors = new IMergedEventList("event_contributors"); } ISimHitMergerMain::~ISimHitMergerMain(){ } void ISimHitMergerMain::Usage() { std::cout << " -------------------------------------------------------------------------------------\n" " The full details of SimHitMerger can be found in the GitLab wiki page below:\n" " https://gitlab.in2p3.fr/comet/ICEDUST_packages/-/wikis/SimHitMerger\n" " -------------------------------------------------------------------------------------\n" "\n" " -O no-trajectories Don't save trajectories.\n" "\n" " -O events= Set the number of input events per bunch.\n" " -O protons= [Obsolete] Set the number of events in total for all the bunches.\n" "\n" " -O all-events Use all availible events in one event.\n" " NOTE: This option cannot be used with the\n" " previous option or with the geometry \n" " options (-G or -g)\n" " -O all-protons [Obsolete] Equivalent to all-events.\n" "\n" " -O bunches= Set the number of bunches to include in an event.\n" "\n" " -O bunch-separation= Set the separation of bunches (in nanoseconds)\n" "\n" " -O global-shift= Set the global time shift (in nanoseconds)\n" "\n" " -O minimum-time=