CMS 3D CMS Logo

SiPixelTrackResidualModule Class Reference

#include <DQM/SiPixelMonitorTrack/interface/SiPixelTrackResidualModule.h>

List of all members.

Public Member Functions

void book (const edm::ParameterSet &, int type=0)
void fill (const Measurement2DVector &, bool modon=true, bool ladon=true, bool layon=true, bool phion=true, bool bladeon=true, bool diskon=true, bool ringon=true)
 SiPixelTrackResidualModule (const uint32_t)
 SiPixelTrackResidualModule ()
 ~SiPixelTrackResidualModule ()

Private Attributes

bool bBookTracks
uint32_t id_
MonitorElementmeResidualX_
MonitorElementmeResidualXBlade_
MonitorElementmeResidualXDisk_
MonitorElementmeResidualXLad_
MonitorElementmeResidualXLay_
MonitorElementmeResidualXPhi_
MonitorElementmeResidualXRing_
MonitorElementmeResidualY_
MonitorElementmeResidualYBlade_
MonitorElementmeResidualYDisk_
MonitorElementmeResidualYLad_
MonitorElementmeResidualYLay_
MonitorElementmeResidualYPhi_
MonitorElementmeResidualYRing_


Detailed Description

Definition at line 25 of file SiPixelTrackResidualModule.h.


Constructor & Destructor Documentation

SiPixelTrackResidualModule::SiPixelTrackResidualModule (  ) 

Definition at line 33 of file SiPixelTrackResidualModule.cc.

References bBookTracks.

00033                                                        : id_(0) {
00034   bBookTracks = true;
00035 }

SiPixelTrackResidualModule::SiPixelTrackResidualModule ( const   uint32_t  ) 

Definition at line 38 of file SiPixelTrackResidualModule.cc.

References bBookTracks.

00038                                                                   : id_(id) { 
00039   bBookTracks = true;
00040 }

SiPixelTrackResidualModule::~SiPixelTrackResidualModule (  ) 

Definition at line 43 of file SiPixelTrackResidualModule.cc.

00043                                                         { 
00044  
00045 }


Member Function Documentation

void SiPixelTrackResidualModule::book ( const edm::ParameterSet iConfig,
int  type = 0 
)

Definition at line 48 of file SiPixelTrackResidualModule.cc.

References GeomDetEnumerators::barrel, DQMStore::book1D(), DetId::DetId(), muonGeometry::disk, GeomDetEnumerators::endcap, edm::ParameterSet::getParameter(), id_, edm::InputTag::label(), meResidualX_, meResidualXBlade_, meResidualXDisk_, meResidualXLad_, meResidualXLay_, meResidualXPhi_, meResidualXRing_, meResidualY_, meResidualYBlade_, meResidualYDisk_, meResidualYLad_, meResidualYLay_, meResidualYPhi_, meResidualYRing_, PixelSubdetector::PixelBarrel, PixelBarrelName::PixelBarrelName(), PixelSubdetector::PixelEndcap, PixelEndcapName::PixelEndcapName(), MonitorElement::setAxisTitle(), and HLT_VtxMuL3::src.

00048                                                                               {
00049   DQMStore* dbe = edm::Service<DQMStore>().operator->();
00050 
00051   bool barrel = DetId::DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
00052   bool endcap = DetId::DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
00053   bool isHalfModule = false;
00054   if(barrel){
00055     isHalfModule = PixelBarrelName::PixelBarrelName(DetId::DetId(id_)).isHalfModule(); 
00056   }
00057 
00058   edm::InputTag src = iConfig.getParameter<edm::InputTag>("src");
00059   SiPixelHistogramId* theHistogramId = new SiPixelHistogramId(src.label());
00060   std::string hisID;
00061 
00062   if(type==0){
00063     hisID = theHistogramId->setHistoId("residualX",id_);
00064     meResidualX_ = dbe->book1D(hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00065     meResidualX_->setAxisTitle("hit-to-track residual in x (cm)",1);
00066     
00067     hisID = theHistogramId->setHistoId("residualY",id_);
00068     meResidualY_ = dbe->book1D(hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00069     meResidualY_->setAxisTitle("hit-to-track residual in y (cm)",1);
00070 
00071     delete theHistogramId;
00072   }
00073 
00074   if(type==1 && barrel){
00075     uint32_t DBladder = PixelBarrelName::PixelBarrelName(DetId::DetId(id_)).ladderName();
00076     char sladder[80]; sprintf(sladder,"Ladder_%02i",DBladder);
00077     hisID = src.label() + "_" + sladder;
00078     if(isHalfModule) hisID += "H";
00079     else hisID += "F";
00080 
00081     meResidualXLad_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00082     meResidualXLad_->setAxisTitle("hit-to-track residual in x (cm)",1);
00083     
00084     meResidualYLad_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00085     meResidualYLad_->setAxisTitle("hit-to-track residual in y (cm)",1);
00086   }
00087 
00088   if(type==2 && barrel){
00089     uint32_t DBlayer = PixelBarrelName::PixelBarrelName(DetId::DetId(id_)).layerName();
00090     char slayer[80]; sprintf(slayer,"Layer_%i",DBlayer);
00091     hisID = src.label() + "_" + slayer;
00092 
00093     meResidualXLay_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00094     meResidualXLay_->setAxisTitle("hit-to-track residual in x (cm)",1);
00095     
00096     meResidualYLay_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00097     meResidualYLay_->setAxisTitle("hit-to-track residual in y (cm)",1);
00098   }
00099 
00100   if(type==3 && barrel){
00101     uint32_t DBmodule = PixelBarrelName::PixelBarrelName(DetId::DetId(id_)).moduleName();
00102     char smodule[80]; sprintf(smodule,"Ring_%i",DBmodule);
00103     hisID = src.label() + "_" + smodule;
00104 
00105     meResidualXPhi_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00106     meResidualXPhi_->setAxisTitle("hit-to-track residual in x (cm)",1);
00107     
00108     meResidualYPhi_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00109     meResidualYPhi_->setAxisTitle("hit-to-track residual in y (cm)",1);
00110   }
00111 
00112   if(type==4 && endcap){
00113     uint32_t blade= PixelEndcapName::PixelEndcapName(DetId::DetId(id_)).bladeName();
00114     
00115     char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
00116     hisID = src.label() + "_" + sblade;
00117 
00118     meResidualXBlade_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00119     meResidualXBlade_->setAxisTitle("hit-to-track residual in x (cm)",1);
00120 
00121     meResidualYBlade_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00122     meResidualYBlade_->setAxisTitle("hit-to-track residual in y (cm)",1);
00123   }
00124 
00125   if(type==5 && endcap){
00126     uint32_t disk = PixelEndcapName::PixelEndcapName(DetId::DetId(id_)).diskName();
00127     
00128     char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
00129     hisID = src.label() + "_" + sdisk;
00130 
00131     meResidualXDisk_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00132     meResidualXDisk_->setAxisTitle("hit-to-track residual in x (cm)",1);
00133     
00134     meResidualYDisk_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00135     meResidualYDisk_->setAxisTitle("hit-to-track residual in y (cm)",1);
00136   }
00137 
00138   if(type==6 && endcap){
00139     uint32_t panel= PixelEndcapName::PixelEndcapName(DetId::DetId(id_)).pannelName();
00140     uint32_t module= PixelEndcapName::PixelEndcapName(DetId::DetId(id_)).plaquetteName();
00141     char slab[80]; sprintf(slab, "Panel_%i_Ring_%i",panel, module);
00142     hisID = src.label() + "_" + slab;
00143 
00144     meResidualXRing_ = dbe->book1D("residualX_"+hisID,"Hit-to-Track Residual in X",500,-5.,5.);
00145     meResidualXRing_->setAxisTitle("hit-to-track residual in x (cm)",1);
00146     
00147     meResidualYRing_ = dbe->book1D("residualY_"+hisID,"Hit-to-Track Residual in Y",500,-5.,5.);
00148     meResidualYRing_->setAxisTitle("hit-to-track residual in y (cm)",1);
00149   }
00150 
00151 //   if(type==10){
00152 //     dbe->setCurrentFolder("Pixel");
00153 //     meNofTracks_ = dbe->book1D("ntracks_"+src.label(),"Number of Tracks",4,0,4);
00154 //     meNofTracks_->setAxisTitle("number of tracks (all/pixel/bpix/fpix)",1);
00155 //   }
00156   
00157 }

void SiPixelTrackResidualModule::fill ( const Measurement2DVector residual,
bool  modon = true,
bool  ladon = true,
bool  layon = true,
bool  phion = true,
bool  bladeon = true,
bool  diskon = true,
bool  ringon = true 
)

Definition at line 160 of file SiPixelTrackResidualModule.cc.

References GeomDetEnumerators::barrel, DetId::DetId(), GeomDetEnumerators::endcap, id_, meResidualX_, meResidualXBlade_, meResidualXDisk_, meResidualXLad_, meResidualXLay_, meResidualXPhi_, meResidualXRing_, meResidualY_, meResidualYBlade_, meResidualYDisk_, meResidualYLad_, meResidualYLay_, meResidualYPhi_, meResidualYRing_, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

00160                                                                                                                                                                  {
00161 
00162   bool barrel = DetId::DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
00163   bool endcap = DetId::DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
00164 
00165   if(modon){
00166     (meResidualX_)->Fill(residual.x()); 
00167     (meResidualY_)->Fill(residual.y()); 
00168   }
00169 
00170   if(ladon && barrel){
00171     (meResidualXLad_)->Fill(residual.x()); 
00172     (meResidualYLad_)->Fill(residual.y()); 
00173   }
00174 
00175   if(layon && barrel){
00176     (meResidualXLay_)->Fill(residual.x()); 
00177     (meResidualYLay_)->Fill(residual.y()); 
00178   }
00179   if(phion && barrel){
00180     (meResidualXPhi_)->Fill(residual.x()); 
00181     (meResidualYPhi_)->Fill(residual.y()); 
00182   }
00183 
00184   if(bladeon && endcap){
00185     (meResidualXBlade_)->Fill(residual.x()); 
00186     (meResidualYBlade_)->Fill(residual.y()); 
00187   }
00188 
00189   if(diskon && endcap){
00190     (meResidualXDisk_)->Fill(residual.x()); 
00191     (meResidualYDisk_)->Fill(residual.y()); 
00192   }
00193 
00194   if(ringon && endcap){
00195     (meResidualXRing_)->Fill(residual.x()); 
00196     (meResidualYRing_)->Fill(residual.y()); 
00197   }
00198 }


Member Data Documentation

bool SiPixelTrackResidualModule::bBookTracks [private]

Definition at line 37 of file SiPixelTrackResidualModule.h.

Referenced by SiPixelTrackResidualModule().

uint32_t SiPixelTrackResidualModule::id_ [private]

Definition at line 36 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualX_ [private]

Definition at line 41 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXBlade_ [private]

Definition at line 55 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXDisk_ [private]

Definition at line 58 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXLad_ [private]

Definition at line 45 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXLay_ [private]

Definition at line 48 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXPhi_ [private]

Definition at line 51 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualXRing_ [private]

Definition at line 61 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualY_ [private]

Definition at line 42 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYBlade_ [private]

Definition at line 56 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYDisk_ [private]

Definition at line 59 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYLad_ [private]

Definition at line 46 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYLay_ [private]

Definition at line 49 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYPhi_ [private]

Definition at line 52 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().

MonitorElement* SiPixelTrackResidualModule::meResidualYRing_ [private]

Definition at line 62 of file SiPixelTrackResidualModule.h.

Referenced by book(), and fill().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:10 2009 for CMSSW by  doxygen 1.5.4