/** \file \author Maximo Ave \author Javier Gonzalez \version $Id: TankResponse.h 21526 2012-08-01 12:26:58Z javierg $ \date 05 Mar 2010 */ #ifndef __TankResponse_h_ #define __TankResponse_h_ static const char CVSId__TankResponse[] = "$Id: TankResponse.h 21526 2012-08-01 12:26:58Z javierg $"; #include #include #include #define NTYPES 3 #define NPECUT 10 #define NCDFMAX 300 #define DEBUG 0 #define DecaySignal 0.134 namespace TabulatedTankSimulatorNS { /*CDF for one Specie and (to,ke)*/ class PeCDF{ public: int itype; int decayFlag; double lke, theta, theta_deg; //--KE in GeV, theta in rad, theta in deg double mean, rms, median; int nentries,nentriesCut; double probCut,dprobCut; double probDecay,dprobDecay; std::vector > prob; //-- Differential Probabilities (removed after CDFs are created) std::vector > cdf; //-- Cummulative Probability Distribution }; /*! \brief Tank Response Class. This is an interpolation of the response of Auger WCDs using Geant4. \author Maximo Ave \author Javier Gonzalez (wrapping) \date 05 Mar 2010 \ingroup tls */ class TankResponse { private: static const double VEMperPE; static const double tankarea; // lengths in cm static const double tankh; static const double tankr; std::vector fElectronCDFs, fGammaCDFs, fMuonCDFs, fMuonCDFs_d; std::string fDataDir; public: TankResponse(bool flag, std::string dir = ""); ~TankResponse(){} void SetDecayProb(); double GetVEMperPE() {return VEMperPE;} double Interpolate(double *x, double *y, double f); double GetSignalBin(double f, PeCDF &fPeCDF); double GetPeDecay(double rnd, double ptheta); double GetPe(double ke, double theta, int itype , double f, bool &decayFlag,bool &outsideRange); // f= -100 Mean Interpolation | f=(0,1) CDF Interpolation int GetBin(double lkeo,double to, int itype, int *ibins, bool &flag ); PeCDF GetCDF(int itype, int ibin, bool combineMuon ); const char *GetParticleName(int itype); bool ReadG4File(PeCDF &pCDF, PeCDF &pCDF_dec ); void SetUpCDFs(PeCDF &pCDF); bool ReadCDFFile( std::vector *fCDFs, int size); bool WriteCDFFile( std::vector *fCDFs ); double GetHeight() {return tankh;} double GetRadius() {return tankr;} double GetArea() {return tankarea;} double ErrorRatio(double n1,double n2); }; } // #endif // __TankResponse_h_ // Configure (x)emacs for this file ... // Local Variables: // mode:c++ // compile-command: "make -C .. -k" // End: