/** \defgroup has_tools Inclined Air Showers \ingroup tls \file \author Javier Gonzalez \date 24 Jan 2008 */ #ifndef _tls_EMComponent_h_ #define _tls_EMComponent_h_ #include #include namespace utl { class Branch; } namespace tls { /** \class EMComponent \brief Facade for any instance of EMComponent. This class encapsulates multiple implementations of parametrizations of the electromagnetic component. The specific model that is used is specified by the name of the utl::Branch that gets passed to the constructor. The currently available models are: \author Javier Gonzalez \date 24 Jan 2008 \ingroup has_tools */ class EMComponent { public: EMComponent(utl::Branch branch); virtual ~EMComponent() {}; /// Ratio between electromagnetic and muon signal inline double SignalRatio(double x, double y, double rmu, double theta, double phi) { return fEMComponent->SignalRatio(x,y,rmu,theta,phi); } /// Ratio between electromagnetic and total signal inline double TotalSignalFraction(double x, double y, double rmu, double theta, double phi) { const double emRatio = fEMComponent->SignalRatio(x,y,rmu,theta,phi); return emRatio > 0.0 ? 1.0 - 1.0/(1.0+emRatio) : 0.0; } virtual double GetThetaMax(){return fEMComponent->GetThetaMax();} virtual double GetThetaMin(){return fEMComponent->GetThetaMin();} private: boost::shared_ptr fEMComponent; }; } // tls #endif // _tls_EMComponent_h_ // Configure (x)emacs for this file ... // Local Variables: // mode:c++ // compile-command: "make -C .. -k" // End: