#ifndef _TUNIVREC_H #define _TUNIVREC_H #include "cdas_er_config.h" #include "TReconstruct.h" #include "Ec.h" #include "Er.h" // Basic RecTypes // To know more, or use other rectypes, see UnivRec.h in Universality package #define DefaultUnivRec 4 // fixes Nmu, fits Energy and Xmax #define HybridUnivRec 0 // need to call SetEnergy, SetXmax and SetDirection, fits Nmu #define NmuUnivRec 5 // need to call SetEnergy, fits Xmax and Nmu #define AMIGAUnivRec 3 // need to set mdev to md::Event class TUnivRec : virtual public TReconstruct { private: static TUnivRec * _instance; public: int gRecType; int gRecSys; bool gRecInfill; int gIsSignalCut_low; int verbose; int debug; #ifdef HAVE_IOMD md::Event *mdev; #endif UnivRecNS::UnivRec theRec; TUnivRec(); ~TUnivRec(); static TUnivRec * Instance(); bool _Reconstruct(); void SetInfill(bool set) { gRecInfill=set;} void SetRecType(int set) { gRecType=set;} // Valid rectypes: // TODO: rectype 0, setting refinfo // 2: Signal only, Xmax and Nmu fixed // 3: AMIGA, Signal only, Xmax and Nmu fixed // 4: Signal and timing, Nmu fixed <-- default // 6: Signal and timing, Nmu fixed to 0.15 (photon rec) // 8: Signal and timing, Nmu fixed without correcting for Xmax-Nmu correlation void SetVerbose(int set) { verbose=set;} //void SetErEvent(TErEvent *ev) {fevt=ev}; //int InitReconstruction(); // get reconstruction results double GetLogE() { return theRec.GetRecInfo()->logE_ref; } double GetdLogE() { return theRec.GetRecInfo()->logE_ref_err; } double GetE() { return pow(10,theRec.GetRecInfo()->logE_ref-18); } double GetdE() { return (pow(10,theRec.GetRecInfo()->logE_ref_err)-1)*GetE(); } double GetXmax() { return theRec.GetRecInfo()->Xmax; } double GetdXmax() { return theRec.GetRecInfo()->Xmax_err; } double GetTheta() { return theRec.GetRecInfo()->theta*kCdasUtil::RAD2DEG; } double GetPhi() { return theRec.GetRecInfo()->azi*kCdasUtil::RAD2DEG; } double GetX() { return theRec.GetRecInfo()->xgcore/100; } double GetdX() { return theRec.GetRecInfo()->xgcore_err/100; } double GetY() { return theRec.GetRecInfo()->ygcore/100; } double GetdY() { return theRec.GetRecInfo()->ygcore_err/100; } double GetZ() { return theRec.GetRecInfo()->zgcore/100; } double GetNmu() { return theRec.GetRecInfo()->Nmu; } // experts can access more data within theRec.GetRecInfo() // get station data double GetExpectedSignal(int station_id,int component=-1,int detector=0); double GetR(int station_id); // different reconstruction types void SetEnergy(double e); void SetLogE(double loge); void SetXmax(double xmax); void SetDirection(double theta,double phi); // in radians }; TUnivRec& theUnivRec(); #endif