CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DataFormats/SiPixelDetId/interface/PixelBarrelName.h

Go to the documentation of this file.
00001 #ifndef SiPixelDetId_PixelBarrelName_H
00002 #define SiPixelDetId_PixelBarrelName_H
00003 
00008 #include "DataFormats/SiPixelDetId/interface/PixelModuleName.h"
00009 #include <string>
00010 #include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
00011 
00012 class DetId; 
00013 
00014 class PixelBarrelName : public PixelModuleName {
00015 public:
00016 
00017   enum Shell { mO = 1, mI = 2 , pO =3 , pI =4 };
00018 
00020   PixelBarrelName(const DetId &);
00021 
00023   PixelBarrelName(Shell shell=mO, int layer=0, int module=0, int ladder=0)
00024     : PixelModuleName(true), 
00025       thePart(shell), theLayer(layer), theModule(module), theLadder(ladder) 
00026   { }
00027 
00029   PixelBarrelName(std::string name);
00030 
00031   virtual ~PixelBarrelName() { }
00032 
00034   virtual std::string name() const;
00035 
00036   Shell shell() const { return thePart; }
00037 
00039   int layerName() const { return theLayer; }   
00040 
00042   int moduleName() const { return theModule; }  
00043 
00045   int ladderName() const { return theLadder; } 
00046 
00048   int sectorName() const;
00049 
00051   bool isHalfModule() const;
00052   
00054   virtual PixelModuleName::ModuleType  moduleType() const;
00055 
00057   PXBDetId getDetId();
00058 
00060   virtual bool operator== (const PixelModuleName &) const;
00061 
00062 private:
00063   Shell thePart;
00064   int theLayer, theModule, theLadder;
00065 };
00066 
00067 std::ostream & operator<<( std::ostream& out, const PixelBarrelName::Shell& t);
00068 #endif