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