//____________________________________________________________________________ /*! \class genie::GGenerateEvent \brief A base generation driver for an under-water neutrino telescope \author Carla Distefano LNS-INFN, Catania Included modifications by Alfonso Garcia NIKHEF, Amsterdam (January 2019) Included JPP propagation by Victor Carretero IFIC, Valencia (October 2020) \created July 19, 2017 \cpright Copyright (c) 2017-2019, The KM3NeT Collaboration For the full text of the license see $GSEAGEN/LICENSE */ //____________________________________________________________________________ #ifndef _GGENERATEEVENT_ #define _GGENERATEEVENT_ #include #include #include #include #include #include #include #include #include "SeaEvent/GBinParam.h" #include "SeaEvent/GSeaEvent.h" #include "SeaNuDrivers/GSeaRealAtmoFlux.h" #include "SeaNuDrivers/GSeaRealPointFlux.h" #include "SeaNuDrivers/GSeaAntaresFileFlux.h" #include "SeaNuDrivers/GSeaCORSIKAFileFlux.h" #include "SeaNuDrivers/GSeaFileFlux.h" #include "PropaMuon/PropaMuon.h" #ifdef _PROPOSAL_ENABLED__ #include "PROPOSAL/PROPOSAL.h" #endif #ifdef _MUSIC_ENABLED__ #include #endif #ifdef _JPP_ENABLED__ //#include "JPhysics/JRadiation.hh" #include "JPhysics/JRadiationSource.hh" #include "JSirene/JSireneToolkit.hh" #include "JLang/JSharedPointer.hh" //using namespace JPP; #endif using namespace std; using namespace genie; using namespace genie::flux; using namespace genie::constants; namespace genie { class GGenerateEvent { public : GGenerateEvent(GenParam * GenPar); virtual ~GGenerateEvent(); virtual vector GetGeneratorTracks (void) = 0; virtual void Initialize (void) = 0; virtual void Configure (int NTot) = 0; virtual double GlobProbScale (void) = 0; virtual void SetGeometry (string RootGeomFile) = 0; virtual TLorentzVector GetVertex (void) = 0; virtual double GetGlobalGenWeight (void) = 0; virtual void FillSeaEvent (GSeaEvent * SeaEvent) = 0; virtual void ComputeWeights (GSeaEvent * SeaEvt) = 0; virtual void InitGenBin (double Emin, double Emax, double RL, double RT, double X0, double Y0, double Z0) = 0; virtual double GetNFluxNeutrinos (void) = 0; virtual void GenerateEvent (void) = 0; virtual void WriteNative (GSeaEvent * SeaEvt) = 0; virtual void CleanEvent (void) = 0; virtual void CalcXSecWater (void) = 0; virtual map CalcXsecTot (map MediaComp) = 0; #ifdef _JPP_ENABLED__ vector> radiationSW, ionizationSW, radiationSR, ionizationSR; #endif GenParam * fGenPar; GSeaEvent * fSeaEvent; #ifdef _ANTARES_ENABLED__ event * fAntaresEvt; #endif PropaMuon * PropaMuonSW; PropaMuon * PropaMuonSR; #ifdef _PROPOSAL_ENABLED__ PROPOSAL::Propagator * ProposalMu; #endif vector gPropagatedTracks; vector gWritenTracks; int fNEvt; int fNTot; double fDistaCan; double fDistaX,fDistaY,fDistaZ; GSeaRealAtmoFlux * flux_driver_diffuse; GSeaRealPointFlux * flux_driver_point; GSeaAtmoFlux * fFluxDriver; GSeaFileFlux * fFileDriver; bool EoF; // check if end of file if neutrinos rad from input file GSeaRealAtmoFlux * GetFluxDiffuse (void); GSeaRealPointFlux * GetFluxPoint (void); int PosInCan (double VertX, double VertY, double VertZ); bool PropagationMu (GSeaTrack *t); bool PropagationMu (PropaTrack * trackf); #ifdef _HETAU_ENABLED__ double PropagationTau (GSeaTrack * t); double PropagationTau (PropaTrack * trackf); vector DecayTau (GSeaTrack tau, double tauti); #endif int DistToCan (PropaTrack track); bool PropagateTracks (vector GeneratorTracks); bool WriteTracks (bool LepInCan); void FillEvent (void); double GetXSecWater (int neutrino_pdg, double Energy); double GetXSecSW (int neutrino_pdg, double Energy); protected: void ConfigProposal (void); void CalcMediaParams (void); #ifdef _PROPOSAL_ENABLED__ #if _PROPOSAL_VERSION_MAJOR__ == 5 || (_PROPOSAL_VERSION_MAJOR__ == 6 && _PROPOSAL_VERSION_MINOR__ == 0 && _PROPOSAL_VERSION_PATCH__ == 0 ) vector> ComponentSW, ComponentSR; #else vector ComponentSW, ComponentSR; #endif #endif }; } // genie namespace #endif // _GGENERATEEVENT_