34 std::vector<DetId>::const_iterator barrelIt;
36 for (barrelIt = barrelCells.begin(); barrelIt != barrelCells.end(); barrelIt++) {
41 int chs = (*chStatus)[*barrelIt].getStatusCode() & 0x001F;
42 if (chs <= statusThresold)
61 std::vector<DetId>::const_iterator endcapIt;
62 for (endcapIt = endcapCells.begin(); endcapIt != endcapCells.end(); endcapIt++) {
63 auto cellGeometry = endcapGeometry->
getGeometry(*endcapIt);
71 cellPos_[ix][iy] = cellGeometry->getPosition();
72 cellPhi_[ix][iy] = cellGeometry->getPosition().phi();
78 for (
int i = 0;
i < 4;
i++) {
79 int iplus1 =
i == 3 ? 0 :
i + 1;
80 cellArea_[ix][iy] += cellCorners[
i].eta() * float(cellCorners[iplus1].
phi()) -
81 cellCorners[iplus1].eta() * float(cellCorners[
i].
phi());
84 cellArea_[ix][iy] = fabs(cellArea_[ix][iy]) / 2.;
94 int chs = (*chStatus)[*endcapIt].getStatusCode() & 0x001F;
95 if (chs <= statusThresold)
106 std::cout <<
"Eta ring " <<
ring <<
" : " << eta_ring << std::endl;
142 float philast = -999.;
162 for (endcapIt = endcapCells.begin(); endcapIt != endcapCells.end(); endcapIt++) {
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
void setup(const CaloGeometry *geometry, const EcalChannelStatus *chstatus, int statusThreshold)
int nRing_[kEndcEtaRings]
int nBads_endc[kEndcEtaRings]
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
Global3DPoint GlobalPoint
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
static const int kMaxEndciPhi
double phi_endc_[kMaxEndciPhi][kEndcEtaRings]
int iphi() const
get the crystal iphi
static const int kEndcWedgesX
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const int kEndcEtaRings
Abs< T >::type abs(const T &t)
int ieta() const
get the crystal ieta
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
double cellPhi_[kEndcWedgesX][kEndcWedgesY]
double meanCellArea_[kEndcEtaRings]
double cellArea_[kEndcWedgesX][kEndcWedgesY]
int nBads_barl[kBarlRings]
int zside() const
get the z-side of the crystal (1/-1)
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
double etaBoundary_[kEndcEtaRings+1]
static const int kEndcWedgesY