CMS 3D CMS Logo

DTResolutionTest Class Reference

* DQM Test Client More...

#include <DQM/DTMonitorClient/src/DTResolutionTest.h>

Inheritance diagram for DTResolutionTest:

edm::EDAnalyzer

List of all members.

Public Member Functions

 DTResolutionTest (const edm::ParameterSet &ps)
 Constructor.
virtual ~DTResolutionTest ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (const edm::EventSetup &c)
 BeginJob.
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
void bookHistos (int wh)
 book the summary histograms
void bookHistos (const DTChamberId &ch)
 book the new ME
void endJob ()
 Endjob.
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
 DQM Client Diagnostic.
std::string getMEName (const DTSuperLayerId &slID)
 Get the ME name.
std::string getMEName2D (const DTSuperLayerId &slID)

Private Member Functions

int slFromBin (int bin) const
int stationFromBin (int bin) const

Private Attributes

DQMStoredbe
std::map< std::pair< int, int >,
MonitorElement * > 
MeanHistos
std::map< std::string,
MonitorElement * > 
MeanHistosSetRange
std::map< std::string,
MonitorElement * > 
MeanHistosSetRange2D
edm::ESHandle< DTGeometrymuonGeom
int nevents
unsigned int nLumiSegs
edm::ParameterSet parameters
int percentual
int prescaleFactor
int run
std::map< std::pair< int, int >,
MonitorElement * > 
SigmaHistos
std::map< std::string,
MonitorElement * > 
SigmaHistosSetRange
std::map< std::string,
MonitorElement * > 
SigmaHistosSetRange2D
std::map< std::pair< int, int >,
MonitorElement * > 
SlopeHistos
std::map< std::string,
MonitorElement * > 
SlopeHistosSetRange
std::map< std::string,
MonitorElement * > 
SlopeHistosSetRange2D
std::map< int, MonitorElement * > wheelMeanHistos
std::map< int, MonitorElement * > wheelSigmaHistos
std::map< int, MonitorElement * > wheelSlopeHistos


Detailed Description

* DQM Test Client

Date
2008/04/16 10:48:26
Revision
1.11
Author:
G. Mila - INFN Torino

Definition at line 41 of file DTResolutionTest.h.


Constructor & Destructor Documentation

DTResolutionTest::DTResolutionTest ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 45 of file DTResolutionTest.cc.

References dbe, edm::ParameterSet::getUntrackedParameter(), DQMStore::open(), parameters, percentual, and prescaleFactor.

00045                                                            {
00046 
00047   edm::LogVerbatim ("resolution") << "[DTResolutionTest]: Constructor";
00048   parameters = ps;
00049 
00050   dbe = edm::Service<DQMStore>().operator->();
00051   if(ps.getUntrackedParameter<bool>("readFile", false))  
00052      dbe->open(ps.getUntrackedParameter<string>("inputFile", "residuals.root"));
00053 
00054   prescaleFactor = parameters.getUntrackedParameter<int>("diagnosticPrescale", 1);
00055 
00056   percentual = parameters.getUntrackedParameter<int>("BadSLpercentual", 10);
00057 
00058   //debug = parameters.getUntrackedParameter<bool>("debug", false);
00059 
00060 }

DTResolutionTest::~DTResolutionTest (  )  [virtual]

Destructor.

Definition at line 63 of file DTResolutionTest.cc.

References nevents.

00063                                    {
00064 
00065   edm::LogVerbatim ("resolution") << "DTResolutionTest: analyzed " << nevents << " events";
00066 
00067 }


Member Function Documentation

void DTResolutionTest::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 92 of file DTResolutionTest.cc.

References nevents.

00092                                                                              {
00093 
00094   nevents++;
00095   edm::LogVerbatim ("resolution") << "[DTResolutionTest]: "<<nevents<<" events";
00096 
00097 }

void DTResolutionTest::beginJob ( const edm::EventSetup c  )  [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 70 of file DTResolutionTest.cc.

References edm::EventSetup::get(), muonGeom, and nevents.

00070                                                            {
00071 
00072   edm::LogVerbatim ("resolution") <<"[DTResolutionTest]: BeginJob"; 
00073 
00074   nevents = 0;
00075 
00076   // Get the geometry
00077   context.get<MuonGeometryRecord>().get(muonGeom);
00078 
00079 }

void DTResolutionTest::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file DTResolutionTest.cc.

References edm::LuminosityBlock::run(), and run.

00082                                                                                                      {
00083 
00084   edm::LogVerbatim ("resolution") <<"[DTResolutionTest]: Begin of LS transition";
00085 
00086   // Get the run number
00087   run = lumiSeg.run();
00088 
00089 }

void DTResolutionTest::bookHistos ( int  wh  )  [protected]

book the summary histograms

Definition at line 534 of file DTResolutionTest.cc.

References DQMStore::book2D(), dbe, edm::ParameterSet::getUntrackedParameter(), parameters, MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), muonGeometry::wheel, wheelMeanHistos, wheelSigmaHistos, and wheelSlopeHistos.

00534                                         {
00535   
00536   dbe->setCurrentFolder("DT/Tests/DTResolution/SummaryPlot");
00537 
00538   if(wheelMeanHistos.find(3) == wheelMeanHistos.end()){
00539     string histoName =  "MeanSummaryRes_testFailedByAtLeastBadSL_" + parameters.getUntrackedParameter<string>("STEP", "STEP3");
00540     wheelMeanHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,2);
00541     wheelMeanHistos[3]->setBinLabel(1,"Sector1",1);
00542     wheelMeanHistos[3]->setBinLabel(1,"Sector1",1);
00543     wheelMeanHistos[3]->setBinLabel(2,"Sector2",1);
00544     wheelMeanHistos[3]->setBinLabel(3,"Sector3",1);
00545     wheelMeanHistos[3]->setBinLabel(4,"Sector4",1);
00546     wheelMeanHistos[3]->setBinLabel(5,"Sector5",1);
00547     wheelMeanHistos[3]->setBinLabel(6,"Sector6",1);
00548     wheelMeanHistos[3]->setBinLabel(7,"Sector7",1);
00549     wheelMeanHistos[3]->setBinLabel(8,"Sector8",1);
00550     wheelMeanHistos[3]->setBinLabel(9,"Sector9",1);
00551     wheelMeanHistos[3]->setBinLabel(10,"Sector10",1);
00552     wheelMeanHistos[3]->setBinLabel(11,"Sector11",1);
00553     wheelMeanHistos[3]->setBinLabel(12,"Sector12",1);
00554     wheelMeanHistos[3]->setBinLabel(13,"Sector13",1);
00555     wheelMeanHistos[3]->setBinLabel(14,"Sector14",1);
00556     wheelMeanHistos[3]->setBinLabel(1,"Wheel-2",2);
00557     wheelMeanHistos[3]->setBinLabel(2,"Wheel-1",2);
00558     wheelMeanHistos[3]->setBinLabel(3,"Wheel0",2);
00559     wheelMeanHistos[3]->setBinLabel(4,"Wheel+1",2);
00560     wheelMeanHistos[3]->setBinLabel(5,"Wheel+2",2);
00561   }
00562 
00563   if(wheelSigmaHistos.find(3) == wheelSigmaHistos.end()){
00564     string histoName =  "SigmaSummaryRes_testFailedByAtLeastBadSL_" + parameters.getUntrackedParameter<string>("STEP", "STEP3");
00565     wheelSigmaHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,2);
00566     wheelSigmaHistos[3]->setBinLabel(1,"Sector1",1);
00567     wheelSigmaHistos[3]->setBinLabel(1,"Sector1",1);
00568     wheelSigmaHistos[3]->setBinLabel(2,"Sector2",1);
00569     wheelSigmaHistos[3]->setBinLabel(3,"Sector3",1);
00570     wheelSigmaHistos[3]->setBinLabel(4,"Sector4",1);
00571     wheelSigmaHistos[3]->setBinLabel(5,"Sector5",1);
00572     wheelSigmaHistos[3]->setBinLabel(6,"Sector6",1);
00573     wheelSigmaHistos[3]->setBinLabel(7,"Sector7",1);
00574     wheelSigmaHistos[3]->setBinLabel(8,"Sector8",1);
00575     wheelSigmaHistos[3]->setBinLabel(9,"Sector9",1);
00576     wheelSigmaHistos[3]->setBinLabel(10,"Sector10",1);
00577     wheelSigmaHistos[3]->setBinLabel(11,"Sector11",1);
00578     wheelSigmaHistos[3]->setBinLabel(12,"Sector12",1);
00579     wheelSigmaHistos[3]->setBinLabel(13,"Sector13",1);
00580     wheelSigmaHistos[3]->setBinLabel(14,"Sector14",1);
00581     wheelSigmaHistos[3]->setBinLabel(1,"Wheel-2",2);
00582     wheelSigmaHistos[3]->setBinLabel(2,"Wheel-1",2);
00583     wheelSigmaHistos[3]->setBinLabel(3,"Wheel0",2);
00584     wheelSigmaHistos[3]->setBinLabel(4,"Wheel+1",2);
00585     wheelSigmaHistos[3]->setBinLabel(5,"Wheel+2",2);
00586   }
00587 
00588   if(wheelSlopeHistos.find(3) == wheelSlopeHistos.end()){
00589     string histoName =  "SlopeSummaryRes_testFailedByAtLeastBadSL_" + parameters.getUntrackedParameter<string>("STEP", "STEP3");
00590     wheelSlopeHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,2);
00591     wheelSlopeHistos[3]->setBinLabel(1,"Sector1",1);
00592     wheelSlopeHistos[3]->setBinLabel(1,"Sector1",1);
00593     wheelSlopeHistos[3]->setBinLabel(2,"Sector2",1);
00594     wheelSlopeHistos[3]->setBinLabel(3,"Sector3",1);
00595     wheelSlopeHistos[3]->setBinLabel(4,"Sector4",1);
00596     wheelSlopeHistos[3]->setBinLabel(5,"Sector5",1);
00597     wheelSlopeHistos[3]->setBinLabel(6,"Sector6",1);
00598     wheelSlopeHistos[3]->setBinLabel(7,"Sector7",1);
00599     wheelSlopeHistos[3]->setBinLabel(8,"Sector8",1);
00600     wheelSlopeHistos[3]->setBinLabel(9,"Sector9",1);
00601     wheelSlopeHistos[3]->setBinLabel(10,"Sector10",1);
00602     wheelSlopeHistos[3]->setBinLabel(11,"Sector11",1);
00603     wheelSlopeHistos[3]->setBinLabel(12,"Sector12",1);
00604     wheelSlopeHistos[3]->setBinLabel(13,"Sector13",1);
00605     wheelSlopeHistos[3]->setBinLabel(14,"Sector14",1);
00606     wheelSlopeHistos[3]->setBinLabel(1,"Wheel-2",2);
00607     wheelSlopeHistos[3]->setBinLabel(2,"Wheel-1",2);
00608     wheelSlopeHistos[3]->setBinLabel(3,"Wheel0",2);
00609     wheelSlopeHistos[3]->setBinLabel(4,"Wheel+1",2);
00610     wheelSlopeHistos[3]->setBinLabel(5,"Wheel+2",2);
00611   }
00612 
00613   stringstream wheel; wheel <<wh;
00614   
00615   if(wheelMeanHistos.find(wh) == wheelMeanHistos.end()){
00616     string histoName =  "MeanSummaryRes_testFailed_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str();
00617     wheelMeanHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
00618     wheelMeanHistos[wh]->setBinLabel(1,"Sector1",1);
00619     wheelMeanHistos[wh]->setBinLabel(2,"Sector2",1);
00620     wheelMeanHistos[wh]->setBinLabel(3,"Sector3",1);
00621     wheelMeanHistos[wh]->setBinLabel(4,"Sector4",1);
00622     wheelMeanHistos[wh]->setBinLabel(5,"Sector5",1);
00623     wheelMeanHistos[wh]->setBinLabel(6,"Sector6",1);
00624     wheelMeanHistos[wh]->setBinLabel(7,"Sector7",1);
00625     wheelMeanHistos[wh]->setBinLabel(8,"Sector8",1);
00626     wheelMeanHistos[wh]->setBinLabel(9,"Sector9",1);
00627     wheelMeanHistos[wh]->setBinLabel(10,"Sector10",1);
00628     wheelMeanHistos[wh]->setBinLabel(11,"Sector11",1);
00629     wheelMeanHistos[wh]->setBinLabel(12,"Sector12",1);
00630     wheelMeanHistos[wh]->setBinLabel(13,"Sector13",1);
00631     wheelMeanHistos[wh]->setBinLabel(14,"Sector14",1);
00632     wheelMeanHistos[wh]->setBinLabel(1,"MB1_SL1",2);
00633     wheelMeanHistos[wh]->setBinLabel(2,"MB1_SL2",2);
00634     wheelMeanHistos[wh]->setBinLabel(3,"MB1_SL3",2);
00635     wheelMeanHistos[wh]->setBinLabel(4,"MB2_SL1",2);
00636     wheelMeanHistos[wh]->setBinLabel(5,"MB2_SL2",2);
00637     wheelMeanHistos[wh]->setBinLabel(6,"MB2_SL3",2);
00638     wheelMeanHistos[wh]->setBinLabel(7,"MB3_SL1",2);
00639     wheelMeanHistos[wh]->setBinLabel(8,"MB3_SL2",2);
00640     wheelMeanHistos[wh]->setBinLabel(9,"MB3_SL3",2);
00641     wheelMeanHistos[wh]->setBinLabel(10,"MB4_SL1",2);
00642     wheelMeanHistos[wh]->setBinLabel(11,"MB4_SL3",2);
00643   }  
00644 
00645   if(wheelSigmaHistos.find(wh) == wheelSigmaHistos.end()){
00646     string histoName =  "SigmaSummaryRes_testFailed_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str();
00647     wheelSigmaHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
00648     wheelSigmaHistos[wh]->setBinLabel(1,"Sector1",1);
00649     wheelSigmaHistos[wh]->setBinLabel(2,"Sector2",1);
00650     wheelSigmaHistos[wh]->setBinLabel(3,"Sector3",1);
00651     wheelSigmaHistos[wh]->setBinLabel(4,"Sector4",1);
00652     wheelSigmaHistos[wh]->setBinLabel(5,"Sector5",1);
00653     wheelSigmaHistos[wh]->setBinLabel(6,"Sector6",1);
00654     wheelSigmaHistos[wh]->setBinLabel(7,"Sector7",1);
00655     wheelSigmaHistos[wh]->setBinLabel(8,"Sector8",1);
00656     wheelSigmaHistos[wh]->setBinLabel(9,"Sector9",1);
00657     wheelSigmaHistos[wh]->setBinLabel(10,"Sector10",1);
00658     wheelSigmaHistos[wh]->setBinLabel(11,"Sector11",1);
00659     wheelSigmaHistos[wh]->setBinLabel(12,"Sector12",1);
00660     wheelSigmaHistos[wh]->setBinLabel(13,"Sector13",1);
00661     wheelSigmaHistos[wh]->setBinLabel(14,"Sector14",1);
00662     wheelSigmaHistos[wh]->setBinLabel(1,"MB1_SL1",2);
00663     wheelSigmaHistos[wh]->setBinLabel(2,"MB1_SL2",2);
00664     wheelSigmaHistos[wh]->setBinLabel(3,"MB1_SL3",2);
00665     wheelSigmaHistos[wh]->setBinLabel(4,"MB2_SL1",2);
00666     wheelSigmaHistos[wh]->setBinLabel(5,"MB2_SL2",2);
00667     wheelSigmaHistos[wh]->setBinLabel(6,"MB2_SL3",2);
00668     wheelSigmaHistos[wh]->setBinLabel(7,"MB3_SL1",2);
00669     wheelSigmaHistos[wh]->setBinLabel(8,"MB3_SL2",2);
00670     wheelSigmaHistos[wh]->setBinLabel(9,"MB3_SL3",2);
00671     wheelSigmaHistos[wh]->setBinLabel(10,"MB4_SL1",2);
00672     wheelSigmaHistos[wh]->setBinLabel(11,"MB4_SL3",2);
00673   }  
00674 
00675   if(wheelSlopeHistos.find(wh) == wheelSlopeHistos.end()){
00676     string histoName =  "SlopeSummaryRes_testFailed_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str();
00677     wheelSlopeHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
00678     wheelSlopeHistos[wh]->setBinLabel(1,"Sector1",1);
00679     wheelSlopeHistos[wh]->setBinLabel(2,"Sector2",1);
00680     wheelSlopeHistos[wh]->setBinLabel(3,"Sector3",1);
00681     wheelSlopeHistos[wh]->setBinLabel(4,"Sector4",1);
00682     wheelSlopeHistos[wh]->setBinLabel(5,"Sector5",1);
00683     wheelSlopeHistos[wh]->setBinLabel(6,"Sector6",1);
00684     wheelSlopeHistos[wh]->setBinLabel(7,"Sector7",1);
00685     wheelSlopeHistos[wh]->setBinLabel(8,"Sector8",1);
00686     wheelSlopeHistos[wh]->setBinLabel(9,"Sector9",1);
00687     wheelSlopeHistos[wh]->setBinLabel(10,"Sector10",1);
00688     wheelSlopeHistos[wh]->setBinLabel(11,"Sector11",1);
00689     wheelSlopeHistos[wh]->setBinLabel(12,"Sector12",1);
00690     wheelSlopeHistos[wh]->setBinLabel(13,"Sector13",1);
00691     wheelSlopeHistos[wh]->setBinLabel(14,"Sector14",1);
00692     wheelSlopeHistos[wh]->setBinLabel(1,"MB1_SL1",2);
00693     wheelSlopeHistos[wh]->setBinLabel(2,"MB1_SL2",2);
00694     wheelSlopeHistos[wh]->setBinLabel(3,"MB1_SL3",2);
00695     wheelSlopeHistos[wh]->setBinLabel(4,"MB2_SL1",2);
00696     wheelSlopeHistos[wh]->setBinLabel(5,"MB2_SL2",2);
00697     wheelSlopeHistos[wh]->setBinLabel(6,"MB2_SL3",2);
00698     wheelSlopeHistos[wh]->setBinLabel(7,"MB3_SL1",2);
00699     wheelSlopeHistos[wh]->setBinLabel(8,"MB3_SL2",2);
00700     wheelSlopeHistos[wh]->setBinLabel(9,"MB3_SL3",2);
00701     wheelSlopeHistos[wh]->setBinLabel(10,"MB4_SL1",2);
00702     wheelSlopeHistos[wh]->setBinLabel(11,"MB4_SL3",2);
00703   }  
00704   
00705 }

void DTResolutionTest::bookHistos ( const DTChamberId ch  )  [protected]

book the new ME

Definition at line 463 of file DTResolutionTest.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe, edm::ParameterSet::getUntrackedParameter(), MeanHistos, MeanHistosSetRange, MeanHistosSetRange2D, parameters, DTChamberId::sector(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), SigmaHistos, SigmaHistosSetRange, SigmaHistosSetRange2D, SlopeHistos, SlopeHistosSetRange, SlopeHistosSetRange2D, muonGeometry::wheel, and DTChamberId::wheel().

Referenced by endLuminosityBlock().

00463                                                         {
00464 
00465   stringstream wheel; wheel << ch.wheel();              
00466   stringstream sector; sector << ch.sector();   
00467 
00468 
00469   string MeanHistoName =  "MeanTest_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str(); 
00470   string SigmaHistoName =  "SigmaTest_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str(); 
00471   string SlopeHistoName =  "SlopeTest_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str(); 
00472 
00473   dbe->setCurrentFolder("DT/Tests/DTResolution");
00474 
00475   // Book the histo for the mean value and set the axis labels
00476   MeanHistos[make_pair(ch.wheel(),ch.sector())] = dbe->book1D(MeanHistoName.c_str(),MeanHistoName.c_str(),11,0,11);
00477   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(1,"MB1_SL1",1);
00478   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(2,"MB1_SL2",1);
00479   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(3,"MB1_SL3",1);
00480   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(4,"MB2_SL1",1);
00481   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(5,"MB2_SL2",1);
00482   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(6,"MB2_SL3",1);
00483   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(7,"MB3_SL1",1);
00484   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(8,"MB3_SL2",1);
00485   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(9,"MB3_SL3",1);
00486   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(10,"MB4_SL1",1);
00487   (MeanHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(11,"MB4_SL3",1);
00488 
00489   // Book the histo for the sigma value and set the axis labels
00490   SigmaHistos[make_pair(ch.wheel(),ch.sector())] = dbe->book1D(SigmaHistoName.c_str(),SigmaHistoName.c_str(),11,0,11);
00491   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(1,"MB1_SL1",1);  
00492   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(2,"MB1_SL2",1);
00493   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(3,"MB1_SL3",1);
00494   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(4,"MB2_SL1",1);
00495   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(5,"MB2_SL2",1);
00496   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(6,"MB2_SL3",1);
00497   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(7,"MB3_SL1",1);
00498   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(8,"MB3_SL2",1);
00499   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(9,"MB3_SL3",1);
00500   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(10,"MB4_SL1",1);
00501   (SigmaHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(11,"MB4_SL3",1);
00502   
00503   SlopeHistos[make_pair(ch.wheel(),ch.sector())] = dbe->book1D(SlopeHistoName.c_str(),SlopeHistoName.c_str(),11,0,11);
00504   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(1,"MB1_SL1",1);  
00505   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(2,"MB1_SL2",1);
00506   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(3,"MB1_SL3",1);
00507   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(4,"MB2_SL1",1);
00508   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(5,"MB2_SL2",1);
00509   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(6,"MB2_SL3",1);
00510   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(7,"MB3_SL1",1);
00511   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(8,"MB3_SL2",1);
00512   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(9,"MB3_SL3",1);
00513   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(10,"MB4_SL1",1);
00514   (SlopeHistos[make_pair(ch.wheel(),ch.sector())])->setBinLabel(11,"MB4_SL3",1);
00515 
00516 
00517   string HistoName = "W" + wheel.str() + "_Sec" + sector.str(); 
00518   string MeanHistoNameSetRange = "MeanWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str() + "_SetRange";
00519   string SigmaHistoNameSetRange =  "SigmaWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str()  + "_SetRange";
00520   string SlopeHistoNameSetRange =  "SlopeWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str()  + "_SetRange";
00521   MeanHistosSetRange[HistoName] = dbe->book1D(MeanHistoNameSetRange.c_str(),MeanHistoNameSetRange.c_str(),11,0.5,11.5);
00522   SigmaHistosSetRange[HistoName] = dbe->book1D(SigmaHistoNameSetRange.c_str(),SigmaHistoNameSetRange.c_str(),11,0.5,11.5);
00523   SlopeHistosSetRange[HistoName] = dbe->book1D(SlopeHistoNameSetRange.c_str(),SlopeHistoNameSetRange.c_str(),11,0.5,11.5);
00524   string MeanHistoNameSetRange2D = "MeanWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str() + "_SetRange" + "_2D";
00525   string SigmaHistoNameSetRange2D =  "SigmaWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str()  + "_SetRange" + "_2D";
00526   string SlopeHistoNameSetRange2D =  "SlopeWrong_" + parameters.getUntrackedParameter<string>("STEP", "STEP3") + "_W" + wheel.str() + "_Sec" + sector.str()  + "_SetRange" + "_2D";
00527   MeanHistosSetRange2D[HistoName] = dbe->book2D(MeanHistoNameSetRange2D.c_str(),MeanHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 100, -0.05, 0.05);
00528   SigmaHistosSetRange2D[HistoName] = dbe->book2D(SigmaHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 500, 0, 0.5);
00529   SlopeHistosSetRange2D[HistoName] = dbe->book2D(SlopeHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 200, -0.1, 0.1);
00530 
00531 }

void DTResolutionTest::endJob ( void   )  [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 375 of file DTResolutionTest.cc.

References dbe, edm::ParameterSet::getParameter(), iggi_31X_cfg::outputFileName, parameters, and DQMStore::save().

00375                              {
00376 
00377   edm::LogVerbatim ("resolution") << "[DTResolutionTest] endjob called!";
00378   //dbe->rmdir("DT/DTCalibValidation");
00379   //dbe->rmdir("DT/Tests/DTResolution");
00380   bool outputMEsInRootFile = parameters.getParameter<bool>("OutputMEsInRootFile");
00381   if(outputMEsInRootFile){
00382         std::string outputFileName = parameters.getParameter<std::string>("OutputFileName");
00383         dbe->save(outputFileName,"DT/Tests");   
00384   }     
00385 
00386 }

void DTResolutionTest::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file DTResolutionTest.cc.

References bookHistos(), dbe, DQMStore::get(), QReport::getBadChannels(), getMEName(), getMEName2D(), MonitorElement::getQReport(), MonitorElement::getTH2F(), edm::ParameterSet::getUntrackedParameter(), histo, i, edm::LuminosityBlock::id(), j, edm::LuminosityBlockID::luminosityBlock(), mean(), MeanHistos, MeanHistosSetRange, MeanHistosSetRange2D, muonGeom, nLumiSegs, parameters, percentual, prescaleFactor, DTChamberId::sector(), SigmaHistos, SigmaHistosSetRange, SigmaHistosSetRange2D, slFromBin(), slope, SlopeHistos, SlopeHistosSetRange, SlopeHistosSetRange2D, DTChamberId::station(), stationFromBin(), DTSuperLayerId::superLayer(), DTSuperLayerId::superlayer(), muonGeometry::wheel, DTChamberId::wheel(), wheelMeanHistos, wheelSigmaHistos, and wheelSlopeHistos.

00101                                                                                                    {
00102   
00103   // counts number of updats (online mode) or number of events (standalone mode)
00104   //nevents++;
00105   // if running in standalone perform diagnostic only after a reasonalbe amount of events
00106   //if ( parameters.getUntrackedParameter<bool>("runningStandalone", false) && 
00107   //   nevents%parameters.getUntrackedParameter<int>("diagnosticPrescale", 1000) != 0 ) return;
00108   //edm::LogVerbatim ("resolution") << "[DTResolutionTest]: "<<nevents<<" updates";
00109 
00110   edm::LogVerbatim ("resolution") <<"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
00111 
00112   // counts number of lumiSegs 
00113   nLumiSegs = lumiSeg.id().luminosityBlock();
00114 
00115   // prescale factor
00116   if ( nLumiSegs%prescaleFactor != 0 ) return;
00117 
00118   for(map<int, MonitorElement*> ::const_iterator histo = wheelMeanHistos.begin();
00119       histo != wheelMeanHistos.end();
00120       histo++) {
00121     (*histo).second->Reset();
00122   }
00123   for(map<int, MonitorElement*> ::const_iterator histo = wheelSigmaHistos.begin();
00124       histo != wheelSigmaHistos.end();
00125       histo++) {
00126     (*histo).second->Reset();
00127   }
00128   for(map<int, MonitorElement*> ::const_iterator histo = wheelSlopeHistos.begin();
00129       histo != wheelSlopeHistos.end();
00130       histo++) {
00131     (*histo).second->Reset();
00132   }
00133 
00134   map <pair<int,int>, int> cmsMeanHistos;
00135   cmsMeanHistos.clear();
00136   map <pair<int,int>, bool> MeanFilled;
00137   for(int i=-2; i<3; i++){
00138     for(int j=1; j<15; j++){
00139       MeanFilled[make_pair(i,j)]=false;
00140     }
00141   }
00142   map <pair<int,int>, int> cmsSigmaHistos;
00143   cmsSigmaHistos.clear();
00144   map <pair<int,int>, bool> SigmaFilled;
00145   for(int i=-2; i<3; i++){
00146     for(int j=1; j<15; j++){
00147       SigmaFilled[make_pair(i,j)]=false;
00148     }
00149   }
00150   map <pair<int,int>, int> cmsSlopeHistos;
00151   cmsSlopeHistos.clear();
00152   map <pair<int,int>, bool> SlopeFilled;
00153   for(int i=-2; i<3; i++){
00154     for(int j=1; j<15; j++){
00155       SlopeFilled[make_pair(i,j)]=false;
00156     }
00157   }
00158 
00159   edm::LogVerbatim ("resolution") <<"[DTResolutionTest]: "<<nLumiSegs<<" updates";
00160 
00161   vector<DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
00162   vector<DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
00163 
00164   edm::LogVerbatim ("resolution") << "[DTResolutionTest]: Residual Distribution tests results";
00165   
00166   for (; ch_it != ch_end; ++ch_it) {
00167 
00168     DTChamberId chID = (*ch_it)->id();
00169 
00170     // Fill the test histos
00171     int entry=-1;
00172     if(chID.station() == 1) entry=0;
00173     if(chID.station() == 2) entry=3;
00174     if(chID.station() == 3) entry=6;
00175     if(chID.station() == 4) entry=9;
00176 
00177     vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin(); 
00178     vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
00179 
00180     for(; sl_it != sl_end; ++sl_it) {
00181 
00182       DTSuperLayerId slID = (*sl_it)->id();
00183 
00184       edm::LogVerbatim ("resolution") << "[DTResolutionTest]: Superlayer: " << slID;
00185 
00186       stringstream wheel; wheel << slID.wheel();        
00187       stringstream station; station << slID.station();  
00188       stringstream sector; sector << slID.sector();     
00189       stringstream superLayer; superLayer << slID.superlayer();
00190       
00191       string HistoName = "W" + wheel.str() + "_Sec" + sector.str(); 
00192       string supLayer = "W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str(); 
00193 
00194       MonitorElement * res_histo = dbe->get(getMEName(slID));
00195       if (res_histo) {
00196         // gaussian test
00197         string GaussianCriterionName = 
00198           parameters.getUntrackedParameter<string>("resDistributionTestName",
00199                                                    "ResidualsDistributionGaussianTest");
00200         const QReport * GaussianReport = res_histo->getQReport(GaussianCriterionName);
00201         if(GaussianReport){
00202           // FIXE ME: if the quality test fails this cout return a null pointer
00203           //edm::LogWarning ("resolution") << "-------- SuperLayer : "<<supLayer<<"  "<<GaussianReport->getMessage()<<" ------- "<<GaussianReport->getStatus();
00204         }
00205         int BinNumber = entry+slID.superLayer();
00206         if(BinNumber == 12) BinNumber=11;
00207         float mean = (*res_histo).getMean(1);
00208         float sigma = (*res_histo).getRMS(1);
00209         if (MeanHistos.find(make_pair(slID.wheel(),slID.sector())) == MeanHistos.end()) bookHistos((*ch_it)->id());
00210         MeanHistos.find(make_pair(slID.wheel(),slID.sector()))->second->setBinContent(BinNumber, mean); 
00211         SigmaHistos.find(make_pair(slID.wheel(),slID.sector()))->second->setBinContent(BinNumber, sigma);
00212       }
00213 
00214       MonitorElement * res_histo_2D = dbe->get(getMEName2D(slID));
00215       if (res_histo_2D) {
00216         TH2F * res_histo_2D_root = res_histo_2D->getTH2F();
00217         int BinNumber = entry+slID.superLayer();
00218         if(BinNumber == 12) BinNumber=11;
00219         TProfile* prof = res_histo_2D_root->ProfileX();
00220         prof->GetXaxis()->SetRangeUser(0,2);
00221         //prof->Fit("pol1","Q0");
00222         try {
00223           prof->Fit("pol1","Q0");
00224         } catch (...) {
00225           edm::LogError ("resolution") << "[DTResolutionTest]: Exception when fitting..."
00226                                        << "SuperLayer : " << slID << "\n"
00227                                        << "                    STEP : " << parameters.getUntrackedParameter<string>("STEP", "STEP3") << "\n"            
00228                                        << "Filling slope histogram with standard value -99. for bin " << BinNumber;
00229           if (SlopeHistos.find(make_pair(slID.wheel(),slID.sector())) == SlopeHistos.end()) bookHistos((*ch_it)->id());
00230           SlopeHistos.find(make_pair(slID.wheel(),slID.sector()))->second->setBinContent(BinNumber, -99.);
00231           continue;
00232         }
00233         TF1 *fitting = prof->GetFunction("pol1");
00234         double slope = fitting->GetParameter(1);
00235         if (SlopeHistos.find(make_pair(slID.wheel(),slID.sector())) == SlopeHistos.end()) bookHistos((*ch_it)->id());
00236         SlopeHistos.find(make_pair(slID.wheel(),slID.sector()))->second->setBinContent(BinNumber, slope);       
00237       }
00238     }
00239   }
00240 
00241   // Mean test 
00242   string MeanCriterionName = parameters.getUntrackedParameter<string>("meanTestName","ResidualsMeanInRange"); 
00243   for(map<pair<int,int>, MonitorElement*>::const_iterator hMean = MeanHistos.begin();
00244       hMean != MeanHistos.end();
00245       hMean++) {
00246     const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
00247     stringstream wheel; wheel << (*hMean).first.first;
00248     stringstream sector; sector << (*hMean).first.second;
00249     // Report the channels failing the test on the mean
00250     if(theMeanQReport) { 
00251       vector<dqm::me_util::Channel> badChannels = theMeanQReport->getBadChannels();
00252       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00253            channel != badChannels.end(); channel++) {
00254         edm::LogError("resolution") << "Bad mean channel: wh: " << wheel.str()
00255                                      << " st: " << stationFromBin((*channel).getBin())
00256                                      << " sect: " <<sector.str()
00257                                      << " sl: " << slFromBin((*channel).getBin())
00258                                      << " mean (cm): " << (*channel).getContents();
00259         string HistoName = "W" + wheel.str() + "_Sec" + sector.str();
00260         if (MeanHistosSetRange.find(HistoName) == MeanHistosSetRange.end()) bookHistos((*ch_it)->id());
00261         MeanHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
00262         if (MeanHistosSetRange2D.find(HistoName) == MeanHistosSetRange2D.end()) bookHistos((*ch_it)->id());
00263         MeanHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
00264         if(wheelMeanHistos.find((*hMean).first.first) == wheelMeanHistos.end()) bookHistos((*hMean).first.first);
00265         // fill the wheel summary histos if the SL has not passed the test
00266         wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1);
00267         // fill the cms summary histo if the percentual of SL which have not passed the test 
00268         // is more than a predefined treshold
00269         cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)]++;
00270         if(((*hMean).first.second<13 &&
00271             double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/11>double(percentual)/100 &&
00272             MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==false) ||
00273            ((*hMean).first.first>=13 && 
00274             double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/2>double(percentual)/100 &&
00275             MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==false)){
00276           MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]=true;
00277           wheelMeanHistos[3]->Fill(((*hMean).first.second)-1,(*hMean).first.first);
00278         }       
00279       }
00280       // FIXE ME: if the quality test fails this cout return a null pointer
00281       //edm::LogWarning ("resolution") << "-------- wheel: "<<wheel.str()<<" sector: "<<sector.str()<<"  "<<theMeanQReport->getMessage()<<" ------- "<<theMeanQReport->getStatus(); 
00282     }
00283   }
00284 
00285   // Sigma test
00286   string SigmaCriterionName = parameters.getUntrackedParameter<string>("sigmaTestName","ResidualsSigmaInRange"); 
00287   for(map<pair<int,int>, MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
00288       hSigma != SigmaHistos.end();
00289       hSigma++) {
00290     const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
00291     stringstream wheel; wheel << (*hSigma).first.first;
00292     stringstream sector; sector << (*hSigma).first.second;
00293     if(theSigmaQReport) {
00294       vector<dqm::me_util::Channel> badChannels = theSigmaQReport->getBadChannels();
00295       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00296            channel != badChannels.end(); channel++) {
00297         edm::LogError("resolution") << "Bad sigma: wh: " << wheel.str()
00298                                      << " st: " << stationFromBin((*channel).getBin())
00299                                      << " sect: " <<sector.str()
00300                                      << " sl: " << slFromBin((*channel).getBin())
00301                                      << " sigma (cm): " << (*channel).getContents();
00302         string HistoName = "W" + wheel.str() + "_Sec" + sector.str();
00303         if (SigmaHistosSetRange.find(HistoName) == SigmaHistosSetRange.end()) bookHistos((*ch_it)->id());
00304         SigmaHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
00305         if (SigmaHistosSetRange2D.find(HistoName) == SigmaHistosSetRange2D.end()) bookHistos((*ch_it)->id());
00306         SigmaHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
00307         if(wheelSigmaHistos.find((*hSigma).first.first) == wheelSigmaHistos.end()) bookHistos((*hSigma).first.first);
00308         // fill the wheel summary histos if the SL has not passed the test
00309         wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second)-1,(*channel).getBin()-1);
00310         // fill the cms summary histo if the percentual of SL which have not passed the test 
00311         // is more than a predefined treshold
00312         cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)]++;
00313         if(((*hSigma).first.second<13 &&
00314             double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/11>double(percentual)/100 &&
00315             SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==false) ||
00316            ((*hSigma).first.first>=13 && 
00317             double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/2>double(percentual)/100 &&
00318             SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==false)){
00319           SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]=true;
00320           wheelSigmaHistos[3]->Fill((*hSigma).first.second-1,(*hSigma).first.first);
00321         }
00322       }
00323       // FIXE ME: if the quality test fails this cout return a null pointer
00324       //edm::LogWarning ("resolution") << "-------- wheel: "<<wheel.str()<<" sector: "<<sector.str()<<"  "<<theSigmaQReport->getMessage()<<" ------- "<<theSigmaQReport->getStatus();
00325     }
00326   }
00327 
00328   // Slope test
00329   string SlopeCriterionName = parameters.getUntrackedParameter<string>("slopeTestName","ResidualsSlopeInRange"); 
00330   for(map<pair<int,int>, MonitorElement*>::const_iterator hSlope = SlopeHistos.begin();
00331       hSlope != SlopeHistos.end();
00332       hSlope++) {
00333     const QReport * theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
00334     stringstream wheel; wheel << (*hSlope).first.first;
00335     stringstream sector; sector << (*hSlope).first.second;
00336     if(theSlopeQReport) {
00337       vector<dqm::me_util::Channel> badChannels = theSlopeQReport->getBadChannels();
00338       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00339            channel != badChannels.end(); channel++) {
00340         edm::LogError("resolution") << "Bad slope: wh: " << wheel.str()
00341                                     << " st: " << stationFromBin((*channel).getBin())
00342                                     << " sect: " <<sector.str()
00343                                     << " sl: " << slFromBin((*channel).getBin())
00344                                     << " slope: " << (*channel).getContents();
00345         string HistoName = "W" + wheel.str() + "_Sec" + sector.str();
00346         if (SlopeHistosSetRange.find(HistoName) == SlopeHistosSetRange.end()) bookHistos((*ch_it)->id());
00347         SlopeHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
00348         if (SlopeHistosSetRange2D.find(HistoName) == SlopeHistosSetRange2D.end()) bookHistos((*ch_it)->id());
00349         SlopeHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
00350         if(wheelSlopeHistos.find((*hSlope).first.first) == wheelSlopeHistos.end()) bookHistos((*hSlope).first.first);
00351         // fill the wheel summary histos if the SL has not passed the test
00352         wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second)-1,(*channel).getBin()-1);
00353         // fill the cms summary histo if the percentual of SL which have not passed the test 
00354         // is more than a predefined treshold
00355         cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)]++;
00356         if(((*hSlope).first.second<13 &&
00357             double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/11>double(percentual)/100 &&
00358             SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==false) ||
00359            ((*hSlope).first.first>=13 && 
00360             double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/2>double(percentual)/100 &&
00361             SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==false)){
00362           SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]=true;
00363           wheelSlopeHistos[3]->Fill((*hSlope).first.second-1,(*hSlope).first.first);
00364         }
00365       }
00366       // FIXE ME: if the quality test fails this cout return a null pointer
00367       //edm::LogWarning ("resolution") << "-------- wheel: "<<wheel.str()<<" sector: "<<sector.str()<<"  "<<theSlopeQReport->getMessage()<<" ------- "<<theSlopeQReport->getStatus();
00368     }
00369   }
00370 
00371 }

string DTResolutionTest::getMEName ( const DTSuperLayerId slID  )  [protected]

Get the ME name.

Definition at line 390 of file DTResolutionTest.cc.

References edm::ParameterSet::getUntrackedParameter(), parameters, DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superlayer(), muonGeometry::wheel, and DTChamberId::wheel().

Referenced by endLuminosityBlock().

00390                                                               {
00391   
00392   stringstream wheel; wheel << slID.wheel();    
00393   stringstream station; station << slID.station();      
00394   stringstream sector; sector << slID.sector(); 
00395   stringstream superLayer; superLayer << slID.superlayer();
00396   
00397   string folderRoot = parameters.getUntrackedParameter<string>("folderRoot", "Collector/FU0/");
00398   string folderName;
00399 
00400   if(parameters.getUntrackedParameter<bool>("calibModule", false)){
00401     folderName = 
00402       folderRoot + "DT/DTCalibValidation/Wheel" +  wheel.str() +
00403       "/Station" + station.str() +
00404       "/Sector" + sector.str() + "/";
00405   }
00406   else{
00407     folderName = 
00408       folderRoot + "DT/DTResolutionAnalysisTask/Wheel" +  wheel.str() +
00409       "/Station" + station.str() +
00410       "/Sector" + sector.str() + "/";
00411   }
00412 
00413   string histoTag = parameters.getUntrackedParameter<string>("histoTag", "hResDist");
00414 
00415   string histoname = folderName + histoTag  
00416     + "_W" + wheel.str() 
00417     + "_St" + station.str() 
00418     + "_Sec" + sector.str() 
00419     + "_SL" + superLayer.str(); 
00420   
00421   return histoname;
00422   
00423 }

string DTResolutionTest::getMEName2D ( const DTSuperLayerId slID  )  [protected]

Definition at line 426 of file DTResolutionTest.cc.

References edm::ParameterSet::getUntrackedParameter(), parameters, DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superlayer(), muonGeometry::wheel, and DTChamberId::wheel().

Referenced by endLuminosityBlock().

00426                                                                 {
00427   
00428   stringstream wheel; wheel << slID.wheel();    
00429   stringstream station; station << slID.station();      
00430   stringstream sector; sector << slID.sector(); 
00431   stringstream superLayer; superLayer << slID.superlayer();
00432   
00433   string folderRoot = parameters.getUntrackedParameter<string>("folderRoot", "Collector/FU0/");
00434   string folderName;
00435 
00436   if(parameters.getUntrackedParameter<bool>("calibModule", false)){
00437     folderName = 
00438       folderRoot + "DT/DTCalibValidation/Wheel" +  wheel.str() +
00439       "/Station" + station.str() +
00440       "/Sector" + sector.str() + "/";
00441   }
00442   else{
00443     folderName = 
00444       folderRoot + "DT/DTResolutionAnalysisTask/Wheel" +  wheel.str() +
00445       "/Station" + station.str() +
00446       "/Sector" + sector.str() + "/";
00447   }
00448 
00449   string histoTag2D = parameters.getUntrackedParameter<string>("histoTag2D", "hResDistVsDist");
00450 
00451   string histoname = folderName + histoTag2D  
00452     + "_W" + wheel.str() 
00453     + "_St" + station.str() 
00454     + "_Sec" + sector.str() 
00455     + "_SL" + superLayer.str(); 
00456   
00457   return histoname;
00458   
00459 }

int DTResolutionTest::slFromBin ( int  bin  )  const [private]

Definition at line 712 of file DTResolutionTest.cc.

Referenced by endLuminosityBlock().

00712                                              {
00713   int ret = bin%3;
00714   if(ret == 0 || bin == 11) ret = 3;
00715   
00716   return ret;
00717 }

int DTResolutionTest::stationFromBin ( int  bin  )  const [private]

Definition at line 707 of file DTResolutionTest.cc.

Referenced by endLuminosityBlock().

00707                                                   {
00708   return (int) (bin /3.1)+1;
00709 }


Member Data Documentation

DQMStore* DTResolutionTest::dbe [private]

Definition at line 87 of file DTResolutionTest.h.

Referenced by bookHistos(), DTResolutionTest(), endJob(), and endLuminosityBlock().

std::map< std::pair<int,int> , MonitorElement* > DTResolutionTest::MeanHistos [private]

Definition at line 93 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::MeanHistosSetRange [private]

Definition at line 96 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::MeanHistosSetRange2D [private]

Definition at line 99 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

edm::ESHandle<DTGeometry> DTResolutionTest::muonGeom [private]

Definition at line 90 of file DTResolutionTest.h.

Referenced by beginJob(), and endLuminosityBlock().

int DTResolutionTest::nevents [private]

Definition at line 81 of file DTResolutionTest.h.

Referenced by analyze(), beginJob(), and ~DTResolutionTest().

unsigned int DTResolutionTest::nLumiSegs [private]

Definition at line 82 of file DTResolutionTest.h.

Referenced by endLuminosityBlock().

edm::ParameterSet DTResolutionTest::parameters [private]

Definition at line 89 of file DTResolutionTest.h.

Referenced by bookHistos(), DTResolutionTest(), endJob(), endLuminosityBlock(), getMEName(), and getMEName2D().

int DTResolutionTest::percentual [private]

Definition at line 85 of file DTResolutionTest.h.

Referenced by DTResolutionTest(), and endLuminosityBlock().

int DTResolutionTest::prescaleFactor [private]

Definition at line 83 of file DTResolutionTest.h.

Referenced by DTResolutionTest(), and endLuminosityBlock().

int DTResolutionTest::run [private]

Definition at line 84 of file DTResolutionTest.h.

Referenced by beginLuminosityBlock().

std::map< std::pair<int,int> , MonitorElement* > DTResolutionTest::SigmaHistos [private]

Definition at line 94 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::SigmaHistosSetRange [private]

Definition at line 97 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::SigmaHistosSetRange2D [private]

Definition at line 100 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::pair<int,int> , MonitorElement* > DTResolutionTest::SlopeHistos [private]

Definition at line 95 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::SlopeHistosSetRange [private]

Definition at line 98 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< std::string , MonitorElement* > DTResolutionTest::SlopeHistosSetRange2D [private]

Definition at line 101 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< int, MonitorElement* > DTResolutionTest::wheelMeanHistos [private]

Definition at line 104 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< int, MonitorElement* > DTResolutionTest::wheelSigmaHistos [private]

Definition at line 105 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().

std::map< int, MonitorElement* > DTResolutionTest::wheelSlopeHistos [private]

Definition at line 106 of file DTResolutionTest.h.

Referenced by bookHistos(), and endLuminosityBlock().


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