00001 #ifndef ROOT_TEcnaNumbering
00002 #define ROOT_TEcnaNumbering
00003
00004 #include "TString.h"
00005 #include "TObject.h"
00006 #include "Riostream.h"
00007
00008 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParEcal.h"
00009
00010 class TEcnaNumbering : public TObject {
00011
00012 private:
00013
00014 Int_t fgMaxCar;
00015 Int_t fCnew;
00016 Int_t fCdelete;
00017
00018 TString fTTBELL;
00019
00020 TString fFlagSubDet;
00021 Int_t fFlagPrint;
00022
00023 TEcnaParEcal* fEcal;
00024
00025
00026
00027 Int_t** fT2dSMCrys;
00028 Int_t* fT1dSMCrys;
00029 Int_t* fT1dSMTow;
00030 Int_t* fT1dTowEcha;
00031
00032 TString fCodeChNumberingLvrbBot;
00033 TString fCodeChNumberingLvrbTop;
00034
00035
00036
00037 Int_t*** fT3dDeeCrys;
00038 Int_t** fT2dDeeCrys;
00039 Int_t* fT1dDeeCrys;
00040
00041 Int_t** fT2dDeeSC;
00042 Int_t* fT1dDeeSC;
00043
00044 Int_t** fT2dSCEcha;
00045 Int_t* fT1dSCEcha;
00046
00047 Int_t** fT2d_jch_JY;
00048 Int_t* fT1d_jch_JY;
00049
00050 Int_t** fT2d_ich_IX;
00051 Int_t* fT1d_ich_IX;
00052
00053 TString fCodeChNumberingITP1Bot;
00054 TString fCodeChNumberingITP2Top;
00055
00056 Int_t** fT2d_DS;
00057 Int_t* fT1d_DS;
00058
00059 Int_t** fT2d_DSSC;
00060 Int_t* fT1d_DSSC;
00061
00062 Int_t** fT2d_DeeSCCons;
00063 Int_t* fT1d_DeeSCCons;
00064
00065 Int_t** fT2d_RecovDeeSC;
00066 Int_t* fT1d_RecovDeeSC;
00067
00068
00069
00070 protected:
00071
00072 void Init();
00073
00074 public:
00075
00076
00077
00078 TEcnaNumbering();
00079 TEcnaNumbering(const TString, const TEcnaParEcal*);
00080 ~TEcnaNumbering();
00081
00082 void SetEcalSubDetector(const TString, const TEcnaParEcal*);
00083
00084
00085
00086 void BuildBarrelCrysTable();
00087
00088 Int_t Get1SMCrysFrom1SMTowAnd0TowEcha(const Int_t&, const Int_t&);
00089 Int_t Get0SMEchaFrom1SMTowAnd0TowEcha(const Int_t&, const Int_t&);
00090
00091 Int_t Get0TowEchaFrom0SMEcha(const Int_t&);
00092 Int_t Get1SMTowFrom0SMEcha(const Int_t&);
00093 Int_t Get0TowEchaFrom1SMCrys(const Int_t&);
00094 Int_t Get1SMTowFrom1SMCrys(const Int_t&);
00095
00096 Int_t GetHashedNumberFromIEtaAndIPhi(const Int_t&, const Int_t&);
00097 Int_t GetIEtaFromHashed(const Int_t&, const Int_t&);
00098 Int_t GetIPhiFromHashed(const Int_t&);
00099
00100
00101 Double_t GetEta(const Int_t&, const Int_t&, const Int_t&);
00102 Double_t GetEtaMin(const Int_t&, const Int_t&);
00103 Double_t GetEtaMax(const Int_t&, const Int_t&);
00104
00105 Double_t GetIEtaMin(const Int_t&, const Int_t&);
00106 Double_t GetIEtaMax(const Int_t&, const Int_t&);
00107
00108 Double_t GetIEtaMin(const Int_t&);
00109 Double_t GetIEtaMax(const Int_t&);
00110
00111 Double_t GetPhiInSM(const Int_t&, const Int_t&, const Int_t&);
00112 Double_t GetPhi(const Int_t&, const Int_t&, const Int_t&);
00113
00114 Double_t GetPhiMin(const Int_t&, const Int_t&);
00115 Double_t GetPhiMax(const Int_t&, const Int_t&);
00116
00117 Double_t GetJPhiMin(const Int_t&, const Int_t&);
00118 Double_t GetJPhiMax(const Int_t&, const Int_t&);
00119
00120 Double_t GetJPhiMin(const Int_t&);
00121 Double_t GetJPhiMax(const Int_t&);
00122
00123 Double_t GetPhiMin(const Int_t&);
00124 Double_t GetPhiMax(const Int_t&);
00125
00126 Double_t GetSMCentralPhi(const Int_t&);
00127
00128 TString GetXDirectionEB(const Int_t&);
00129 TString GetYDirectionEB(const Int_t&);
00130 TString GetJYDirectionEB(const Int_t&);
00131
00132 TString GetTowerLvrbType(const Int_t&);
00133 TString GetStinLvrbType(const Int_t&);
00134
00135 TString GetSMHalfBarrel(const Int_t&);
00136
00137
00138
00139 void BuildEndcapCrysTable();
00140 void BuildEndcapSCTable();
00141
00142
00143 Int_t Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(const Int_t&, const Int_t&, const TString);
00144
00145 Int_t Get1SCEchaFrom0DeeEcha(const Int_t&);
00146 Int_t Get1DeeSCEcnaFrom0DeeEcha(const Int_t&);
00147 Int_t Get1SCEchaFrom1DeeCrys(const Int_t&, const TString);
00148 Int_t Get1DeeSCEcnaFrom1DeeCrys(const Int_t&, const TString);
00149
00150 Int_t GetDSFrom1DeeSCEcna(const Int_t&, const Int_t&);
00151 Int_t GetDSSCFrom1DeeSCEcna(const Int_t&, const Int_t&, const Int_t&);
00152 Int_t GetDSSCFrom1DeeSCEcna(const Int_t&, const Int_t&);
00153 Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t&, const Int_t&);
00154 Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t&, const Int_t&, const Int_t&);
00155 Int_t Get1DeeSCEcnaFromDeeSCCons(const Int_t&, const Int_t&);
00156
00157 Int_t GetIXCrysInSC(const Int_t&, const Int_t&, const Int_t&);
00158 Int_t GetJYCrysInSC(const Int_t&, const Int_t&, const Int_t&);
00159 Int_t GetIXSCInDee(const Int_t&);
00160 Int_t GetJYSCInDee(const Int_t&);
00161 Int_t GetIXCrysInDee(const Int_t&, const Int_t&, const Int_t&);
00162 Int_t GetJYCrysInDee(const Int_t&, const Int_t&, const Int_t&);
00163
00164 Int_t GetMaxSCInDS(const Int_t&);
00165
00166 Double_t GetIIXMin(const Int_t&);
00167 Double_t GetIIXMax(const Int_t&);
00168 Double_t GetIIXMin();
00169 Double_t GetIIXMax();
00170
00171 Double_t GetJIYMin(const Int_t&, const Int_t&);
00172 Double_t GetJIYMax(const Int_t&, const Int_t&);
00173 Double_t GetJIYMin(const Int_t&);
00174 Double_t GetJIYMax(const Int_t&);
00175
00176 Int_t GetDeeDirIndex(const TString);
00177 Int_t GetSCQuadTypeIndex(const TString, const TString);
00178 TString GetDeeDirViewedFromIP(const Int_t&);
00179
00180 TString GetSCQuadFrom1DeeSCEcna(const Int_t&);
00181 TString GetEEDeeEndcap(const Int_t&);
00182 TString GetEEDeeType(const Int_t&);
00183
00184 TString GetDeeHalfEndcap(const Int_t&);
00185
00186 TString GetSCType(const Int_t&);
00187
00188 Int_t StexEchaForCons(const Int_t&, const Int_t&);
00189
00190 TString GetXDirectionEE(const Int_t&);
00191 TString GetYDirectionEE(const Int_t&);
00192 TString GetJYDirectionEE(const Int_t&);
00193
00194
00195
00196 Int_t Get1StexStinFrom0StexEcha(const Int_t&);
00197
00198 Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t&, const Int_t&);
00199 Int_t Get1StexCrysFrom1StexStinAnd0StinEcha(const Int_t&, const Int_t&, const Int_t&);
00200
00201 Double_t GetIHocoMin(const Int_t&, const Int_t&);
00202 Double_t GetIHocoMax(const Int_t&, const Int_t&);
00203
00204 Double_t GetVecoMin(const Int_t&, const Int_t&);
00205 Double_t GetVecoMax(const Int_t&, const Int_t&);
00206
00207 Double_t GetJVecoMin(const Int_t&, const Int_t&);
00208 Double_t GetJVecoMax(const Int_t&, const Int_t&);
00209
00210 TString GetStexHalfStas(const Int_t&);
00211
00212 Int_t GetSMFromFED(const Int_t&);
00213 Int_t GetDSFromFED(const Int_t&);
00214
00215 Int_t MaxCrysInStinEcna(const Int_t&, const Int_t&, const TString);
00216
00217 ClassDef(TEcnaNumbering,1)
00218 };
00219 #endif