/* * ProfilerPlaneSliceSimulator.hh * * Created on: Oct 17, 2015 * Author: Hovanes Egiyan */ #ifndef PROFILERPLANESLICESIMULATOR_HH_ #define PROFILERPLANESLICESIMULATOR_HH_ //#include "linux/time.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "TMath.h" #include "TH1D.h" #include "TF1.h" #include "TRandom.h" #include "TRandom2.h" #include "TRandom3.h" #include "MtxLock.hh" #include "CauchyDistribution.hh" #include "ProfilerPlaneSlice.hh" class ProfilerPlaneSliceSimulator: public ProfilerPlaneSlice { protected: TH1D* ppssHist; TF1* ppssFunc; TRandom ppssRandGenerator; public: ProfilerPlaneSliceSimulator( const std::string name, const std::vector& xAxis, const std::vector& yAxis ); ProfilerPlaneSliceSimulator( const ProfilerPlaneSliceSimulator& s ); virtual ~ProfilerPlaneSliceSimulator(); ProfilerPlaneSliceSimulator& operator =( const ProfilerPlaneSliceSimulator& s ); inline virtual ProfilerPlaneSliceSimulator* cloneSlice() { return new ProfilerPlaneSliceSimulator( *this ); } virtual void simulateValues( const std::vector& effcCorr ); virtual TH1D* defineHistogram(); virtual TF1* defineDistFunc(); static double cauchyDistribution( double* x, double* par ); inline double getBinContent( const unsigned iFiber ) const { if ( ppssHist != 0 && !ppssHist->IsZombie() ) return ppssHist->GetBinContent( iFiber ); else return 0; } inline virtual unsigned getParNumb() const { if ( ppssFunc != 0 && !ppssFunc->IsZombie() ) return ppssFunc->GetNpar(); else return 0; } inline TF1* getFunc() const { return ppssFunc; } inline TH1D* getHist() const { return ppssHist; } }; #endif /* PROFILERPLANESLICESIMULATOR_HH_ */