CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/DataFormats/SiPixelDetId/interface/PixelEndcapName.h

Go to the documentation of this file.
00001 #ifndef SiPixelDetId_PixelEndcapName_H
00002 #define SiPixelDetId_PixelEndcapName_H
00003 
00008 #include "DataFormats/SiPixelDetId/interface/PixelModuleName.h"
00009 
00010 #include <string>
00011 #include <iostream>
00012 #include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
00013 
00014 class DetId;
00015 
00016 class PixelEndcapName : public PixelModuleName {
00017 public:
00018 
00019   enum HalfCylinder { mO = 1, mI = 2 , pO =3 , pI =4 };
00020 
00022   PixelEndcapName(const DetId &);
00023   
00025   PixelEndcapName( HalfCylinder part = mO, int disk =0, int blade =0, int pannel=0, int plaq=0) 
00026     : PixelModuleName(false), 
00027       thePart(part), theDisk(disk), theBlade(blade), thePannel(pannel), thePlaquette(plaq)
00028   { }
00029 
00031   PixelEndcapName(std::string name);
00032 
00033   virtual ~PixelEndcapName() { }
00034 
00036   virtual std::string name() const;
00037 
00038   HalfCylinder halfCylinder() const { return thePart; } 
00039 
00041   int diskName() const { return theDisk; }
00042 
00044   int bladeName() const { return theBlade; }
00045 
00047   int pannelName() const { return thePannel; }
00048 
00050   int plaquetteName() const { return thePlaquette; }
00051 
00053    virtual PixelModuleName::ModuleType  moduleType() const;
00054 
00056   PXFDetId getDetId(); 
00057 
00059   virtual bool operator== (const PixelModuleName &) const;
00060 
00061 
00062 private:
00063   HalfCylinder thePart;
00064   int theDisk, theBlade, thePannel, thePlaquette;
00065 };
00066 
00067 std::ostream & operator<<( std::ostream& out, const PixelEndcapName::HalfCylinder & t);
00068 #endif