00001 #ifndef ROOT_TEBNumbering
00002 #define ROOT_TEBNumbering
00003
00004 #include "TString.h"
00005 #include "TObject.h"
00006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEBParameters.h"
00007
00008 class TEBNumbering : public TObject {
00009
00010 private:
00011
00012 Int_t fCnew;
00013 Int_t fCdelete;
00014
00015 TString fTTBELL;
00016
00017 TEBParameters* fEcal;
00018
00019
00020
00021 Int_t fMaxSMInBarPlus;
00022 Int_t fMaxSMInBarMinus;
00023 Int_t fMaxSMInBarrel;
00024
00025 Int_t fMaxTowEtaInSM;
00026 Int_t fMaxTowPhiInSM;
00027 Int_t fMaxTowInSM;
00028
00029
00030 Int_t fMaxCrysEtaInTow;
00031 Int_t fMaxCrysPhiInTow;
00032 Int_t fMaxCrysInTow;
00033
00034
00035 Int_t fMaxCrysEtaInSM;
00036
00037
00038 Int_t fMaxCrysPhiInSM;
00039
00040
00041 Int_t fMaxCrysInSM;
00042
00043
00044 Int_t fMaxSampADC;
00045
00046 Int_t fMaxEvtsInBurstPedRun;
00047
00048
00049
00050 Int_t** fT2dSMCrys;
00051 Int_t* fT1dSMCrys;
00052 Int_t* fT1dSMTow;
00053 Int_t* fT1dTowEcha;
00054
00055 TString fCodeChNumberingLvrbBot;
00056 TString fCodeChNumberingLvrbTop;
00057
00058 Int_t fFlagPrint;
00059 Int_t fCodePrintComments, fCodePrintWarnings, fCodePrintAllComments, fCodePrintNoComment;
00060
00061 protected:
00062
00063 void Init();
00064
00065 public:
00066
00067
00068
00069 TEBNumbering();
00070 ~TEBNumbering();
00071
00072 void BuildCrysTable();
00073
00074 Int_t GetSMCrysFromSMTowAndTowEcha(const Int_t&, const Int_t&);
00075 Int_t GetSMCrysFromSMEcha(const Int_t&);
00076 Int_t GetTowEchaFromSMEcha(const Int_t&);
00077 Int_t GetSMTowFromSMEcha(const Int_t&);
00078 Int_t GetTowEchaFromSMCrys(const Int_t&);
00079 Int_t GetSMTowFromSMCrys(const Int_t&);
00080
00081 Double_t GetEta(const Int_t&, const Int_t&, const Int_t&);
00082 Double_t GetEtaMin(const Int_t&, const Int_t&);
00083 Double_t GetEtaMax(const Int_t&, const Int_t&);
00084
00085 Double_t GetIEtaMin(const Int_t&, const Int_t&);
00086 Double_t GetIEtaMax(const Int_t&, const Int_t&);
00087 Double_t GetIEtaMin(const Int_t&);
00088 Double_t GetIEtaMax(const Int_t&);
00089
00090 Double_t GetPhi(const Int_t&, const Int_t&, const Int_t&);
00091 Double_t GetPhiMin(const Int_t&, const Int_t&);
00092 Double_t GetPhiMax(const Int_t&, const Int_t&);
00093
00094 Double_t GetJPhiMin(const Int_t&, const Int_t&);
00095 Double_t GetJPhiMax(const Int_t&, const Int_t&);
00096 Double_t GetJPhiMin(const Int_t&);
00097 Double_t GetJPhiMax(const Int_t&);
00098
00099 Double_t GetPhiMin(const Int_t&);
00100 Double_t GetPhiMax(const Int_t&);
00101
00102 Double_t GetSMCentralPhi(const Int_t&);
00103
00104 TString GetXDirection(const Int_t&);
00105 TString GetYDirection(const Int_t&);
00106 TString GetJYDirection(const Int_t&);
00107
00108
00109 TString GetTowerLvrbType(const Int_t&);
00110 TString GetSMHalfBarrel(const Int_t&);
00111
00112
00113
00114 void PrintNoComment();
00115
00116 void PrintWarnings();
00117 void PrintComments();
00118
00119 void PrintAllComments();
00120
00121 ClassDef(TEBNumbering,1)
00122 };
00123 #endif