CMS 3D CMS Logo

EcalScDetId.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
00002 //$Id: EcalScDetId.h,v 1.3 2007/05/29 17:32:05 meridian Exp $
00003 
00004 #ifndef EcalDetId_EcalScDetId_h
00005 #define EcalDetId_EcalScDetId_h
00006 
00007 #include <ostream>
00008 #include "DataFormats/DetId/interface/DetId.h"
00009 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00010 
00011 
00023 class EcalScDetId : public DetId {
00024  public:
00026   EcalScDetId();
00028   EcalScDetId(uint32_t rawid);
00031   EcalScDetId(int ix, int iy, int iz);  
00033   EcalScDetId(const DetId& id);
00035   EcalScDetId& operator=(const DetId& id);
00036 
00038   EcalSubdetector subdet() const { return EcalSubdetector(subdetId()); }
00040   int zside() const { return (id_&0x4000)?(1):(-1); }
00042   int ix() const { return (id_>>7)&0x7F; }
00044   int iy() const { return id_&0x7F; }  
00046   int isc() const;
00048   int iquadrant() const ;
00050   int hashedIndex() const;
00051 
00052   static const int IX_MIN=1;
00053   static const int IY_MIN=1;
00054   static const int IX_MAX=20;
00055   static const int IY_MAX=20;
00056   static const int ISC_MIN=1;
00057   static const int ISC_MAX=316;
00058 
00060   static bool validDetId(int i, int j, int iz) ;
00061 
00062  private:
00063 
00064   //Functions adapted from similar B. Kennedy's code of EEDetId class to
00065   //retrieve ix and iy from SC and Crystal number
00066 
00067   static const int nCols = 10;
00068   static const int nCrys = 5; /* Number of crystals per row in SC */
00069   static const int QuadColLimits[nCols+1];
00070   static const int iYoffset[nCols+1];
00071   int ix(int iSC,int iCrys) const;
00072   int iy(int iSC,int iCrys) const;
00073   int ixQuadrantOne() const;
00074   int iyQuadrantOne() const;
00075 
00076 };
00077 
00078 
00079 std::ostream& operator<<(std::ostream& s,const EcalScDetId& id);
00080 
00081 
00082 #endif //EcalDetId_EcalScDetId_h not defined

Generated on Tue Jun 9 17:30:41 2009 for CMSSW by  doxygen 1.5.4