CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/DataFormats/HcalDetId/interface/HcalGenericDetId.h

Go to the documentation of this file.
00001 #ifndef HCALGENERICDETID_H
00002 #define HCALGENERICDETID_H
00003 
00012 #include <ostream>
00013 #include "DataFormats/DetId/interface/DetId.h"
00014 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00015 
00016 class HcalGenericDetId : public DetId {
00017  public:
00018   enum HcalGenericSubdetector {HcalGenEmpty=0, HcalGenBarrel=1, HcalGenEndcap=2, HcalGenOuter=3, HcalGenForward=4, 
00019                                HcalGenTriggerTower=5, HcalGenZDC=8, HcalGenCalibration=9, HcalGenCastor=10, HcalGenUnknown=99};
00020   HcalGenericDetId () : DetId () {}
00021   HcalGenericDetId (uint32_t rawid) : DetId (rawid) {}
00022   HcalGenericDetId (const DetId& id) : DetId (id) {}
00023   HcalOtherSubdetector otherSubdet () const;
00024   HcalGenericSubdetector genericSubdet () const;
00025   bool isHcalDetId () const;
00026   bool isHcalCalibDetId () const;
00027   bool isHcalTrigTowerDetId () const;
00028   bool isHcalZDCDetId () const;
00029   bool isHcalCastorDetId () const;
00030 
00031   // delivers hashed id for this cell
00032   // hashed id's are determined separately for each subdetector !
00033   int hashedId(bool h2mode_ = false) const;
00034 
00035   enum hashlimits{
00036     HBhalf = 1296,
00037     HEhalf = 1296,
00038     HEhalfh2mode = 4032,
00039     HOhalf = 1080,
00040     HFhalf = 864,
00041     HThalf = 2088,
00042     ZDChalf = 11,
00043     CASTORhalf = 224,
00044     CALIBhalf = 693
00045   };
00046 };
00047 
00048 std::ostream& operator<<(std::ostream&,const HcalGenericDetId& id);
00049 
00050 
00051 #endif