From 99f1f6583fd9137fe812b943a88f686c50bd93d1 Mon Sep 17 00:00:00 2001 From: Jae Sung Kim Date: Fri, 1 May 2015 10:25:12 +0200 Subject: [PATCH] even/odd for pad/copad --- .../interface/GEMCoPadDigiValidation.h | 5 +-- .../interface/GEMPadDigiValidation.h | 2 +- .../src/GEMCoPadDigiValidation.cc | 44 ++++++++++++------- .../MuonGEMDigis/src/GEMPadDigiValidation.cc | 14 ++++++ 4 files changed, 45 insertions(+), 20 deletions(-) diff --git a/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h b/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h index df876b11029df..fb0ff36ef99e5 100644 --- a/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h +++ b/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h @@ -17,14 +17,11 @@ class GEMCoPadDigiValidation : public GEMBaseValidation private: MonitorElement* theCSCCoPad_xy[2][3]; - MonitorElement* theCSCCoPad_phipad[2][3]; - MonitorElement* theCSCCoPad[2][3]; - MonitorElement* theCSCCoPad_bx[2][3]; - MonitorElement* theCSCCoPad_zr[2][3]; + std::map< UInt_t , MonitorElement* > theCSCCoPad_xy_ch; }; diff --git a/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h b/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h index 1374ca7c97af4..0cbebab0c5736 100644 --- a/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h +++ b/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h @@ -20,7 +20,7 @@ class GEMPadDigiValidation : public GEMBaseValidation MonitorElement* theCSCPad[2][3][2]; MonitorElement* theCSCPad_bx[2][3][2]; MonitorElement* theCSCPad_zr[2][3][2]; - + std::map< UInt_t , MonitorElement* > theCSCPad_xy_ch; }; #endif diff --git a/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc b/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc index d89bfe94af9c6..c947d62bcdf73 100644 --- a/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc +++ b/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc @@ -29,20 +29,28 @@ void GEMCoPadDigiValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Ru npadsGE21 = GEMGeometry_->regions()[0]->stations()[1]->superChambers()[0]->chambers()[0]->etaPartitions()[0]->npads(); } for( int region_num = 0 ; region_num < nregions ; region_num++ ) { - std::string name_prefix = std::string("_r")+regionLabel[region_num]; - std::string label_prefix = "region "+regionLabel[region_num]; - for( int station_num = 0 ; station_num < nstations ; station_num++) { - if ( station_num == 0 ) nPads = npadsGE11; - else nPads = npadsGE21; - name_prefix = std::string("_r")+regionLabel[region_num]+"_st"+stationLabel[station_num]; - label_prefix = "region"+regionLabel[region_num]+" station "+stationLabel[station_num]; - theCSCCoPad_phipad[region_num][station_num] = ibooker.book2D( ("copad_dg_phipad"+name_prefix).c_str(), ("Digi occupancy: "+label_prefix+"; phi [rad]; Pad number").c_str(), 280,-PI,PI, nPads/2,0,nPads ); - theCSCCoPad[region_num][station_num] = ibooker.book1D( ("copad_dg"+name_prefix).c_str(), ("Digi occupancy per pad number: "+label_prefix+";Pad number; entries").c_str(), nPads,0.5,nPads+0.5); - theCSCCoPad_bx[region_num][station_num] = ibooker.book1D( ("copad_dg_bx"+name_prefix).c_str(), ("Bunch crossing: "+label_prefix+"; bunch crossing ; entries").c_str(), 11,-5.5,5.5); - theCSCCoPad_zr[region_num][station_num] = BookHistZR( ibooker, "copad_dg","CoPad Digi",region_num,station_num); - theCSCCoPad_xy[region_num][station_num] = BookHistXY( ibooker, "copad_dg","CoPad Digi",region_num,station_num); - } - } + std::string name_prefix = std::string("_r")+regionLabel[region_num]; + std::string label_prefix = "region "+regionLabel[region_num]; + for( int station_num = 0 ; station_num < nstations ; station_num++) { + if ( station_num == 0 ) nPads = npadsGE11; + else nPads = npadsGE21; + name_prefix = std::string("_r")+regionLabel[region_num]+"_st"+stationLabel[station_num]; + label_prefix = "region"+regionLabel[region_num]+" station "+stationLabel[station_num]; + theCSCCoPad_phipad[region_num][station_num] = ibooker.book2D( ("copad_dg_phipad"+name_prefix).c_str(), ("Digi occupancy: "+label_prefix+"; phi [rad]; Pad number").c_str(), 280,-PI,PI, nPads/2,0,nPads ); + theCSCCoPad[region_num][station_num] = ibooker.book1D( ("copad_dg"+name_prefix).c_str(), ("Digi occupancy per pad number: "+label_prefix+";Pad number; entries").c_str(), nPads,0.5,nPads+0.5); + theCSCCoPad_bx[region_num][station_num] = ibooker.book1D( ("copad_dg_bx"+name_prefix).c_str(), ("Bunch crossing: "+label_prefix+"; bunch crossing ; entries").c_str(), 11,-5.5,5.5); + theCSCCoPad_zr[region_num][station_num] = BookHistZR( ibooker, "copad_dg","CoPad Digi",region_num,station_num); + theCSCCoPad_xy[region_num][station_num] = BookHistXY( ibooker, "copad_dg","CoPad Digi",region_num,station_num); + TString xy_name = TString::Format("copad_dg_xy%s_odd",name_prefix.c_str()); + TString xy_title = TString::Format("Digi XY occupancy %s at odd chambers",label_prefix.c_str()); + theCSCCoPad_xy_ch[ xy_name.Hash()] = ibooker.book2D(xy_name, xy_title, 360, -360,360, 360, -360, 360); + std::cout<Fill(pad); theCSCCoPad_bx[region_num][station_num]->Fill(bx); theCSCCoPad_zr[region_num][station_num]->Fill(g_z,g_r); - } + std::string name_prefix = std::string("_r")+regionLabel[region_num]+"_st"+stationLabel[station_num]; + TString hname; + if ( chamber %2 == 0 ) { hname = TString::Format("copad_dg_xy%s_even",name_prefix.c_str()); } + else { hname = TString::Format("copad_dg_xy%s_odd",name_prefix.c_str()); } + theCSCCoPad_xy_ch[hname.Hash()]->Fill(g_x,g_y); + } } } diff --git a/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc b/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc index 753344ae03321..edde671b4204d 100644 --- a/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc +++ b/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc @@ -39,6 +39,14 @@ void GEMPadDigiValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Run theCSCPad_bx[region_num][station_num][layer_num] = ibooker.book1D( ("pad_dg_bx"+name_prefix).c_str(), ("Bunch crossing: "+label_prefix+"; bunch crossing ; entries").c_str(), 11,-5.5,5.5); theCSCPad_zr[region_num][station_num][layer_num] = BookHistZR(ibooker,"pad_dg","Pad Digi",region_num,station_num,layer_num); theCSCPad_xy[region_num][station_num][layer_num] = BookHistXY(ibooker,"pad_dg","Pad Digi",region_num,station_num,layer_num); + TString xy_name = TString::Format("pad_dg_xy%s_odd",name_prefix.c_str()); + TString xy_title = TString::Format("Digi XY occupancy %s at odd chambers",label_prefix.c_str()); + theCSCPad_xy_ch[ xy_name.Hash()] = ibooker.book2D(xy_name, xy_title, 360, -360,360, 360, -360, 360); + std::cout<Fill(pad); theCSCPad_bx[region_num][station_num][layer_num]->Fill(bx); theCSCPad_zr[region_num][station_num][layer_num]->Fill(g_z,g_r); + std::string name_prefix = std::string("_r")+regionLabel[region_num]+"_st"+stationLabel[station_num] + "_l"+layerLabel[layer_num]; + TString hname; + if ( chamber %2 == 0 ) { hname = TString::Format("pad_dg_xy%s_even",name_prefix.c_str()); } + else { hname = TString::Format("pad_dg_xy%s_odd",name_prefix.c_str()); } + theCSCPad_xy_ch[hname.Hash()]->Fill(g_x,g_y); } } }