Go to the documentation of this file.00001
00002
00003
00005 #ifndef HcalCellType_h
00006 #define HcalCellType_h
00007
00008 #include <vector>
00009 #include <iostream>
00010 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00011
00012 class HcalCellType {
00013
00014 public:
00015
00016 struct HcalCell {
00017 bool ok;
00018 double eta, deta, phi, dphi, rz, drz;
00019 bool flagrz;
00020 HcalCell(bool fl=false, double et=0, double det=0, double fi=0,
00021 double dfi=0, double rzv=0, double drzv=0, bool frz=true) :
00022 ok(fl), eta(et), deta(det), phi(fi), dphi(dfi), rz(rzv), drz(drzv),
00023 flagrz(frz) {}
00024 };
00025
00026 HcalCellType(HcalSubdetector detType, int etaBin, int phiBin,
00027 int depthSegment, HcalCell cell, int readoutDirection,
00028 double samplingFactor, int numberZ, int nmodule,
00029 double halfSize, int units);
00030 HcalCellType(const HcalCellType&);
00031 ~HcalCellType();
00032
00033 void setMissingPhi(std::vector<int>, std::vector<int>);
00034
00037 HcalSubdetector detType() const {return theDetType;}
00038
00040 int etaBin() const {return theEtaBin;}
00041
00045 int depthSegment() const {return theDepthSegment;}
00046
00048 int nPhiBins() const {return theNumberOfPhiBins;}
00049 int nPhiModule() const {return static_cast<int>(20./thePhiBinWidth);}
00050
00052 double phiBinWidth() const {return thePhiBinWidth;}
00053
00055 double phiOffset() const {return thePhiOffset;}
00056 int unitPhi() const {return theUnitPhi;}
00057
00059 int nHalves() const {return theNumberOfZ;}
00060
00064 int actualReadoutDirection() const {return theActualReadoutDirection;}
00065
00067 double etaMin() const {return theEtaMin;}
00068
00070 double etaMax() const {return theEtaMax;}
00071
00073 double depth() const {return (theDepthMin+theDepthMax)/2;}
00074 double depthMin() const {return theDepthMin;}
00075 double depthMax() const {return theDepthMax;}
00076 bool depthType() const {return theRzFlag;}
00077 double halfSize() const {return theHalfSize;}
00078
00080 double samplingFactor() const {return theSamplingFactor;}
00081
00083 std::vector<int> missingPhiPlus() const {return theMissingPhiPlus;}
00084 std::vector<int> missingPhiMinus() const {return theMissingPhiMinus;}
00085 int nPhiMissingBins() const;
00086
00087 protected:
00088
00089 HcalCellType();
00090
00091 private:
00092
00093 HcalSubdetector theDetType;
00094 int theEtaBin;
00095 int theDepthSegment;
00096 int theNumberOfPhiBins;
00097 int theNumberOfZ;
00098 int theActualReadoutDirection;
00099 int theUnitPhi;
00100
00101 bool theRzFlag;
00102
00103 double theEtaMin;
00104 double theEtaMax;
00105 double thePhiOffset;
00106 double thePhiBinWidth;
00107 double theDepthMin;
00108 double theDepthMax;
00109 double theHalfSize;
00110 double theSamplingFactor;
00111
00112 std::vector<int> theMissingPhiPlus;
00113 std::vector<int> theMissingPhiMinus;
00114 };
00115
00116 std::ostream& operator<<(std::ostream&, const HcalCellType&);
00117 #endif