File indexing completed on 2024-04-06 11:57:43
0001
0002
0003
0004
0005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParEcal.h"
0006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h"
0007
0008
0009
0010
0011
0012
0013
0014 ClassImp(TEcnaParEcal);
0015
0016
0017 TEcnaParEcal::TEcnaParEcal() {
0018
0019
0020
0021
0022 Init();
0023 }
0024
0025 TEcnaParEcal::TEcnaParEcal(TEcnaObject* pObjectManager, const TString& SubDet) {
0026
0027
0028
0029
0030 Init();
0031 Long_t i_this = (Long_t)this;
0032 pObjectManager->RegisterPointer("TEcnaParEcal", i_this);
0033
0034 SetEcalSubDetector(SubDet.Data());
0035 }
0036
0037 TEcnaParEcal::TEcnaParEcal(const TString& SubDet) {
0038
0039
0040
0041
0042 Init();
0043 SetEcalSubDetector(SubDet.Data());
0044 }
0045
0046 TEcnaParEcal::~TEcnaParEcal() {
0047
0048
0049
0050 }
0051
0052 void TEcnaParEcal::Init() {
0053
0054
0055
0056
0057 fTTBELL = '\007';
0058
0059 fCnew = 0;
0060 fCdelete = 0;
0061
0062
0063
0064
0065
0066 fMaxSampADCEB = (Int_t)10;
0067
0068
0069
0070 fMaxSMEtaInEB = (Int_t)2;
0071 fMaxSMPhiInEB = (Int_t)18;
0072
0073 fMaxSMInEBPlus = (Int_t)18;
0074 fMaxSMInEBMinus = (Int_t)18;
0075
0076 fMaxTowEtaInSM = (Int_t)17;
0077 fMaxTowPhiInSM = (Int_t)4;
0078
0079 fMaxCrysEtaInTow = (Int_t)5;
0080 fMaxCrysPhiInTow = (Int_t)5;
0081
0082
0083
0084 fMaxTowEtaInEB = fMaxSMEtaInEB * fMaxTowEtaInSM;
0085 fMaxTowPhiInEB = fMaxSMPhiInEB * fMaxTowPhiInSM;
0086 fMaxTowInEB = fMaxTowEtaInEB * fMaxTowPhiInEB;
0087
0088 fMaxSMInEB = fMaxSMInEBPlus + fMaxSMInEBMinus;
0089 fMaxTowInSM = (Int_t)(fMaxTowEtaInSM * fMaxTowPhiInSM);
0090 fMaxCrysInTow = (Int_t)(fMaxCrysEtaInTow * fMaxCrysPhiInTow);
0091
0092 fMaxCrysEtaInSM = (Int_t)(fMaxTowEtaInSM * fMaxCrysEtaInTow);
0093 fMaxCrysPhiInSM = (Int_t)(fMaxTowPhiInSM * fMaxCrysPhiInTow);
0094 fMaxCrysInSM = (Int_t)(fMaxTowInSM * fMaxCrysInTow);
0095
0096
0097
0098 fMaxSampADCEE = (Int_t)10;
0099
0100
0101
0102 fMaxDeeIXInEE = (Int_t)4;
0103 fMaxDeeIYInEE = (Int_t)1;
0104
0105 fMaxDeeInEEPlus = (Int_t)2;
0106 fMaxDeeInEEMinus = (Int_t)2;
0107
0108 fMaxSCIXInDee = (Int_t)10;
0109 fMaxSCIYInDee = (Int_t)20;
0110 fMaxSCForConsInDee = (Int_t)149;
0111
0112 fMaxCrysIXInSC = (Int_t)5;
0113 fMaxCrysIYInSC = (Int_t)5;
0114
0115 fEmptyChannelsForIncompleteSCInDee = (Int_t)63;
0116
0117 fMaxDSInEEPlus = (Int_t)9;
0118 fMaxDSInEEMinus = (Int_t)9;
0119
0120 fNumberOfNotConnectedSCs = (Int_t)7;
0121 fNumberOfNotCompleteSCs = (Int_t)4;
0122
0123
0124 fMaxDeeInEE = fMaxDeeInEEPlus + fMaxDeeInEEMinus;
0125
0126 fMaxSCIXInEE = fMaxDeeIXInEE * fMaxSCIXInDee;
0127 fMaxSCIYInEE = fMaxDeeIYInEE * fMaxSCIYInDee;
0128 fMaxSCEcnaInEE = fMaxSCIXInEE * fMaxSCIYInEE;
0129 fMaxSCForConsInEE = fMaxDeeInEE * fMaxSCForConsInDee;
0130
0131 fMaxSCEcnaInDee = fMaxSCIXInDee * fMaxSCIYInDee;
0132
0133 fMaxCrysIXInDee = fMaxSCIXInDee * fMaxCrysIXInSC;
0134 fMaxCrysIYInDee = fMaxSCIYInDee * fMaxCrysIYInSC;
0135
0136 fMaxCrysInSC = fMaxCrysIXInSC * fMaxCrysIYInSC;
0137 fMaxCrysEcnaInDee = fMaxSCEcnaInDee * fMaxCrysInSC;
0138 fMaxCrysForConsInDee = fMaxSCForConsInDee * fMaxCrysInSC;
0139
0140 fEmptyChannelsInDeeMatrixIncompleteSCIncluded =
0141 fMaxCrysEcnaInDee - fMaxCrysForConsInDee + fEmptyChannelsForIncompleteSCInDee;
0142
0143 fMaxDSInEE = fMaxDSInEEPlus + fMaxDSInEEMinus;
0144
0145
0146
0147 fMaxSampADC = 0;
0148
0149
0150
0151 fMaxStexHocoInStas = 0;
0152 fMaxStexVecoInStas = 0;
0153
0154 fMaxStexInStasPlus = 0;
0155 fMaxStexInStasMinus = 0;
0156 fMaxStexInStas = 0;
0157
0158 fMaxStinHocoInStas = 0;
0159 fMaxStinVecoInStas = 0;
0160 fMaxStinEcnaInStas = 0;
0161
0162 fMaxStinHocoInStex = 0;
0163 fMaxStinVecoInStex = 0;
0164 fMaxStinEcnaInStex = 0;
0165
0166 fMaxCrysHocoInStin = 0;
0167 fMaxCrysVecoInStin = 0;
0168 fMaxCrysInStin = 0;
0169
0170 fMaxCrysHocoInStex = 0;
0171 fMaxCrysVecoInStex = 0;
0172 fMaxCrysEcnaInStex = 0;
0173
0174
0175
0176 fMaxStinInStex = 0;
0177 fMaxCrysInStex = 0;
0178
0179
0180 fgMaxCar = (Int_t)512;
0181
0182 Int_t MaxCar = fgMaxCar;
0183 fCodeEB.Resize(MaxCar);
0184 fCodeEB = "EB";
0185
0186 MaxCar = fgMaxCar;
0187 fCodeEE.Resize(MaxCar);
0188 fCodeEE = "EE";
0189
0190 MaxCar = fgMaxCar;
0191 fFlagSubDet.Resize(MaxCar);
0192 fFlagSubDet = "No info";
0193
0194 }
0195
0196 void TEcnaParEcal::SetEcalSubDetector(const TString& SubDet) {
0197
0198
0199 if (SubDet != fCodeEB && SubDet != fCodeEE) {
0200 std::cout << "!TEcnaParEcal::SetEcalSubDetector(...)> " << SubDet
0201 << " : unknown subdetector code (requested: EB or EE)" << fTTBELL << std::endl;
0202 } else {
0203 Int_t MaxCar = fgMaxCar;
0204 fFlagSubDet.Resize(MaxCar);
0205 fFlagSubDet = SubDet.Data();
0206
0207 if (fFlagSubDet != fCodeEB && fFlagSubDet != fCodeEE) {
0208 std::cout << "!TEcnaParEcal::SetEcalSubDetector(...)> fFlagSubDet = " << fFlagSubDet
0209 << " : CODE PROBLEM, subdetector flag not initialized." << fTTBELL << std::endl;
0210 }
0211
0212 if (fFlagSubDet == fCodeEB) {
0213 fMaxSampADC = fMaxSampADCEB;
0214
0215
0216 fMaxStexHocoInStas = fMaxSMEtaInEB;
0217 fMaxStexVecoInStas = fMaxSMPhiInEB;
0218
0219 fMaxStexInStasPlus = fMaxSMInEBPlus;
0220 fMaxStexInStasMinus = fMaxSMInEBMinus;
0221 fMaxStexInStas = fMaxSMInEB;
0222
0223 fMaxStinHocoInStas = fMaxTowEtaInEB;
0224 fMaxStinVecoInStas = fMaxTowPhiInEB;
0225 fMaxStinEcnaInStas = fMaxTowEtaInEB * fMaxTowPhiInEB;
0226
0227 fMaxStinHocoInStex = fMaxTowEtaInSM;
0228 fMaxStinVecoInStex = fMaxTowPhiInSM;
0229 fMaxStinEcnaInStex = fMaxTowInSM;
0230
0231 fMaxCrysHocoInStin = fMaxCrysEtaInTow;
0232 fMaxCrysVecoInStin = fMaxCrysPhiInTow;
0233 fMaxCrysInStin = fMaxCrysInTow;
0234
0235 fMaxCrysHocoInStex = fMaxCrysEtaInSM;
0236 fMaxCrysVecoInStex = fMaxCrysPhiInSM;
0237 fMaxCrysEcnaInStex = fMaxCrysInSM;
0238
0239 fMaxStinInStex = fMaxTowInSM;
0240 fMaxCrysInStex = fMaxCrysInSM;
0241 }
0242
0243 if (fFlagSubDet == fCodeEE) {
0244 fMaxSampADC = fMaxSampADCEE;
0245
0246
0247 fMaxStexHocoInStas = fMaxDeeIXInEE;
0248 fMaxStexVecoInStas = fMaxDeeIYInEE;
0249
0250 fMaxStexInStasPlus = fMaxDeeInEEPlus;
0251 fMaxStexInStasMinus = fMaxDeeInEEMinus;
0252 fMaxStexInStas = fMaxDeeInEE;
0253
0254 fMaxStinHocoInStas = fMaxSCIXInEE;
0255 fMaxStinVecoInStas = fMaxSCIYInEE;
0256 fMaxStinEcnaInStas = fMaxSCIXInEE * fMaxSCIYInEE;
0257
0258 fMaxStinHocoInStex = fMaxSCIXInDee;
0259 fMaxStinVecoInStex = fMaxSCIYInDee;
0260 fMaxStinEcnaInStex = fMaxSCEcnaInDee;
0261
0262 fMaxCrysHocoInStin = fMaxCrysIXInSC;
0263 fMaxCrysVecoInStin = fMaxCrysIYInSC;
0264 fMaxCrysInStin = fMaxCrysInSC;
0265
0266 fMaxCrysHocoInStex = fMaxCrysIXInDee;
0267 fMaxCrysVecoInStex = fMaxCrysIYInDee;
0268 fMaxCrysEcnaInStex = fMaxCrysEcnaInDee;
0269
0270 fMaxStinInStex = fMaxSCForConsInDee;
0271 fMaxCrysInStex = fMaxCrysForConsInDee;
0272 }
0273 }
0274 }
0275
0276
0277
0278
0279
0280
0281 TString TEcnaParEcal::GetEcalSubDetector() { return fFlagSubDet; }
0282
0283
0284 Int_t TEcnaParEcal::MaxSampADCEB() { return fMaxSampADCEB; }
0285
0286
0287
0288 Int_t TEcnaParEcal::MaxSMEtaInEB() { return fMaxSMEtaInEB; }
0289 Int_t TEcnaParEcal::MaxSMPhiInEB() { return fMaxSMPhiInEB; }
0290
0291 Int_t TEcnaParEcal::MaxSMInEBPlus() { return fMaxSMInEBPlus; }
0292 Int_t TEcnaParEcal::MaxSMInEBMinus() { return fMaxSMInEBMinus; }
0293 Int_t TEcnaParEcal::MaxSMInEB() { return fMaxSMInEB; }
0294
0295 Int_t TEcnaParEcal::MaxTowEtaInEB() { return fMaxTowEtaInEB; }
0296 Int_t TEcnaParEcal::MaxTowPhiInEB() { return fMaxTowPhiInEB; }
0297 Int_t TEcnaParEcal::MaxTowInEB() { return fMaxTowInEB; }
0298
0299 Int_t TEcnaParEcal::MaxTowEtaInSM() { return fMaxTowEtaInSM; }
0300 Int_t TEcnaParEcal::MaxTowPhiInSM() { return fMaxTowPhiInSM; }
0301 Int_t TEcnaParEcal::MaxTowInSM() { return fMaxTowInSM; }
0302
0303 Int_t TEcnaParEcal::MaxCrysEtaInTow() { return fMaxCrysEtaInTow; }
0304 Int_t TEcnaParEcal::MaxCrysPhiInTow() { return fMaxCrysPhiInTow; }
0305 Int_t TEcnaParEcal::MaxCrysInTow() { return fMaxCrysInTow; }
0306
0307 Int_t TEcnaParEcal::MaxCrysEtaInSM() { return fMaxCrysEtaInSM; }
0308 Int_t TEcnaParEcal::MaxCrysPhiInSM() { return fMaxCrysPhiInSM; }
0309 Int_t TEcnaParEcal::MaxCrysInSM() { return fMaxCrysInSM; }
0310
0311
0312
0313 Int_t TEcnaParEcal::MaxSampADCEE() { return fMaxSampADCEE; }
0314
0315
0316
0317 Int_t TEcnaParEcal::MaxDeeIXInEE() { return fMaxDeeIXInEE; }
0318 Int_t TEcnaParEcal::MaxDeeIYInEE() { return fMaxDeeIYInEE; }
0319
0320 Int_t TEcnaParEcal::MaxDeeInEEPlus() { return fMaxDeeInEEPlus; }
0321 Int_t TEcnaParEcal::MaxDeeInEEMinus() { return fMaxDeeInEEMinus; }
0322 Int_t TEcnaParEcal::MaxDeeInEE() { return fMaxDeeInEE; }
0323
0324 Int_t TEcnaParEcal::MaxSCIXInEE() { return fMaxSCIXInEE; }
0325 Int_t TEcnaParEcal::MaxSCIYInEE() { return fMaxSCIYInEE; }
0326 Int_t TEcnaParEcal::MaxSCEcnaInEE() {
0327 return fMaxSCEcnaInEE;
0328 }
0329 Int_t TEcnaParEcal::MaxSCInEE() { return fMaxSCEcnaInEE; }
0330 Int_t TEcnaParEcal::MaxSCForConsInEE() { return fMaxSCForConsInEE; }
0331
0332 Int_t TEcnaParEcal::MaxSCIXInDee() { return fMaxSCIXInDee; }
0333 Int_t TEcnaParEcal::MaxSCIYInDee() { return fMaxSCIYInDee; }
0334 Int_t TEcnaParEcal::MaxSCEcnaInDee() {
0335 return fMaxSCEcnaInDee;
0336 }
0337 Int_t TEcnaParEcal::MaxSCInDee() { return fMaxSCEcnaInDee; }
0338 Int_t TEcnaParEcal::MaxSCForConsInDee() { return fMaxSCForConsInDee; }
0339
0340 Int_t TEcnaParEcal::MaxCrysIXInSC() { return fMaxCrysIXInSC; }
0341 Int_t TEcnaParEcal::MaxCrysIYInSC() { return fMaxCrysIYInSC; }
0342 Int_t TEcnaParEcal::MaxCrysInSC() { return fMaxCrysInSC; }
0343
0344 Int_t TEcnaParEcal::MaxCrysIXInDee() { return fMaxCrysIXInDee; }
0345 Int_t TEcnaParEcal::MaxCrysIYInDee() { return fMaxCrysIYInDee; }
0346 Int_t TEcnaParEcal::MaxCrysEcnaInDee() {
0347 return fMaxCrysEcnaInDee;
0348 }
0349 Int_t TEcnaParEcal::MaxCrysInDee() { return fMaxCrysEcnaInDee; }
0350 Int_t TEcnaParEcal::MaxCrysForConsInDee() {
0351 return fMaxCrysForConsInDee;
0352 }
0353 Int_t TEcnaParEcal::EmptyChannelsInDeeMatrixIncompleteSCIncluded() {
0354 return fEmptyChannelsInDeeMatrixIncompleteSCIncluded;
0355 }
0356
0357 Int_t TEcnaParEcal::MaxDSInEE() { return fMaxDSInEE; }
0358
0359 Int_t TEcnaParEcal::NumberOfNotConnectedSCs() { return fNumberOfNotConnectedSCs; }
0360 Int_t TEcnaParEcal::NumberOfNotCompleteSCs() { return fNumberOfNotCompleteSCs; }
0361
0362
0363
0364 Int_t TEcnaParEcal::MaxSampADC() { return fMaxSampADC; }
0365
0366
0367
0368 Int_t TEcnaParEcal::MaxStexHocoInStas() { return fMaxStexHocoInStas; }
0369 Int_t TEcnaParEcal::MaxStexVecoInStas() { return fMaxStexVecoInStas; }
0370
0371 Int_t TEcnaParEcal::MaxStexInStasPlus() { return fMaxStexInStasPlus; }
0372 Int_t TEcnaParEcal::MaxStexInStasMinus() { return fMaxStexInStasMinus; }
0373 Int_t TEcnaParEcal::MaxStexInStas() { return fMaxStexInStas; }
0374
0375 Int_t TEcnaParEcal::MaxStinHocoInStas() { return fMaxStinHocoInStas; }
0376 Int_t TEcnaParEcal::MaxStinVecoInStas() { return fMaxStinVecoInStas; }
0377 Int_t TEcnaParEcal::MaxStinEcnaInStas() { return fMaxStinEcnaInStas; }
0378
0379 Int_t TEcnaParEcal::MaxStinHocoInStex() { return fMaxStinHocoInStex; }
0380 Int_t TEcnaParEcal::MaxStinVecoInStex() { return fMaxStinVecoInStex; }
0381 Int_t TEcnaParEcal::MaxStinEcnaInStex() { return fMaxStinEcnaInStex; }
0382 Int_t TEcnaParEcal::MaxStinInStex() { return fMaxStinInStex; }
0383
0384
0385 Int_t TEcnaParEcal::MaxCrysHocoInStin() { return fMaxCrysHocoInStin; }
0386 Int_t TEcnaParEcal::MaxCrysVecoInStin() { return fMaxCrysVecoInStin; }
0387 Int_t TEcnaParEcal::MaxCrysInStin() { return fMaxCrysInStin; }
0388
0389 Int_t TEcnaParEcal::MaxCrysHocoInStex() { return fMaxCrysHocoInStex; }
0390 Int_t TEcnaParEcal::MaxCrysVecoInStex() { return fMaxCrysVecoInStex; }
0391 Int_t TEcnaParEcal::MaxCrysEcnaInStex() { return fMaxCrysEcnaInStex; }
0392 Int_t TEcnaParEcal::MaxCrysInStex() { return fMaxCrysInStex; }