CMS 3D CMS Logo

TEBNumbering.h

Go to the documentation of this file.
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;          // flags for dynamical allocation
00013   Int_t       fCdelete;       
00014 
00015   TString     fTTBELL;
00016 
00017   TEBParameters*  fEcal;
00018 
00019   //....... ECAL parameters
00020 
00021   Int_t   fMaxSMInBarPlus;       // Maximum number of SuperModules in the barrel+
00022   Int_t   fMaxSMInBarMinus;      // Maximum number of SuperModules in the barrel- 
00023   Int_t   fMaxSMInBarrel;        // Maximum number of SuperModules in the barrel
00024 
00025   Int_t   fMaxTowEtaInSM;        // Maximum number of towers in eta in a SuperModule
00026   Int_t   fMaxTowPhiInSM;        // Maximum number of towers in phi in a SuperModule
00027   Int_t   fMaxTowInSM;           // Maximum number of towers in a SuperModule
00028                                  // ( = fMaxTowEtaInSM*fMaxTowPhiInSM )
00029 
00030   Int_t   fMaxCrysEtaInTow;      // Maximum number of crystals in eta in a tower
00031   Int_t   fMaxCrysPhiInTow;      // Maximum number of crystals in phi in a tower
00032   Int_t   fMaxCrysInTow;         // Maximum number of crystals in a tower
00033                                  // ( = fMaxCrysEtaInTow*fMaxCrysPhiInTow )
00034 
00035   Int_t   fMaxCrysEtaInSM;       // Maximum number of crystals in eta in a SuperModule
00036                                  // ( = fMaxTowEtaInSM*fMaxCrysEtaInTow )
00037 
00038   Int_t   fMaxCrysPhiInSM;       // Maximum number of crystals in phi in a SuperModule
00039                                  // ( = fMaxTowPhiInSM*fMaxCrysPhiInTow )
00040 
00041   Int_t   fMaxCrysInSM;          // Maximum number of crystals in a SuperModule
00042                                  // ( = fMaxTowInSM*fMaxCrysInTow )
00043 
00044   Int_t   fMaxSampADC;           // Maximum number of samples ADC
00045 
00046   Int_t   fMaxEvtsInBurstPedRun; // Maximum number of events per burst in Pedestal Runs
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   //------------------------------- methods
00068 
00069   TEBNumbering();
00070   ~TEBNumbering();
00071 
00072   void  BuildCrysTable();   // correspondance crystal# in super-module <-> (tower number, channel# in tower)
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&);    // only for axis of TowerCrystalNumbering (+0.5 shift)
00086   Double_t  GetIEtaMax(const Int_t&, const Int_t&);    // only for axis of TowerCrystalNumbering (-0.5 shift)
00087   Double_t  GetIEtaMin(const Int_t&);                  // only for axis of SMTowerNumbering (+0.5 shift)
00088   Double_t  GetIEtaMax(const Int_t&);                  // only for axis of SMTowerNumbering (-0.5 shift)
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   //............... Flags Print Comments/Debug
00113 
00114   void  PrintNoComment();   // (default) Set flags to forbid the printing of all the comments
00115                             // except ERRORS
00116   void  PrintWarnings();    // Set flags to authorize printing of some warnings
00117   void  PrintComments();    // Set flags to authorize printing of infos and some comments
00118                             // concerning initialisations
00119   void  PrintAllComments(); // Set flags to authorize printing of all the comments
00120 
00121   ClassDef(TEBNumbering,1)  //Channel Numbering for CNA
00122 };
00123 #endif

Generated on Tue Jun 9 17:25:16 2009 for CMSSW by  doxygen 1.5.4