// ESAF : Euso Simulation and Analysis Framework // $Id: ERunParameters.hh,v 1.25 2005/04/20 12:26:36 thea Exp $ // M. Pallavicini, A. Thea created Sep, 19 2003 #ifndef __ERUNPARAMETERS_HH_ #define __ERUNPARAMETERS_HH_ #include #include #include #include #include "ERunParsFiller.hh" #include "EPmtData.hh" #include "EPmtGeo.hh" #include "EAnglePixelMap.hh" enum ESquareCorner { kTopLeftCorner = 0, kTopRightCorner = 1, kBottomRightCorner = 2, kBottomLeftCorner = 3 }; // ERunParameters: container of the Detector configuration class ERunParameters : public TObject { public: ERunParameters(); ERunParameters( const ERunParameters& ); virtual ~ERunParameters(); inline static ERunParameters* GetCurrent() { return fgCurrent; } inline static void SetCurrent(ERunParameters *rp) { fgCurrent=rp; } // set current instance virtual void Copy( TObject& ) const ; virtual void Clear( Option_t* ="" ); inline Int_t GetNumPmts() const { return fNumPmts; } inline const TArrayF& GetChipNightGlowRates() const { return fChipNightGlowRates; } inline const TClonesArray* GetPmts() const { return fPmts; } const EPmtGeo* GetPmtGeo(Int_t id) const; inline const EPmtData& GetPmtData() const {return fPmtData;} inline const EAnglePixelMap& GetPixelMap() const { return fAnglePixelMap; } const EPmtGeo* GetPmtGeoByUId(Int_t uid) const; TVector3 PmtCorner( Int_t, Int_t ) const; TVector3 PixelCenter( Int_t ) const; TVector3 PixelCorner( Int_t, Int_t ) const; Int_t Pmt( Int_t ) const; Int_t ElementaryCell( Int_t ) const; Int_t FrontEndChip( Int_t ) const; Int_t MacroCell( Int_t ) const; inline Bool_t IsValidPmt( Int_t id ) const; inline void Fill( ERunParsFiller& f) { f.Fill( this ); } Bool_t IsInsidePixel(Int_t uid, const TVector2&) const; void DrawFocalSurface(); private: Int_t fNumPmts; // number of photomultipliers TClonesArray *fPmts; //-> description of the pmts TArrayF fChipNightGlowRates; // FE nightglow rates in p.e./microsec per pixel EPmtData fPmtData; // common parameters of the pmts EAnglePixelMap fAnglePixelMap; // map angle pixel static ERunParameters *fgCurrent; ClassDef(ERunParameters,1) ERunParsVisitable() }; inline Bool_t ERunParameters::IsValidPmt( Int_t id ) const{ return (id > 0 && id <= fNumPmts); } #endif