#include <Validation/GlobalRecHits/interface/GlobalRecHitsHistogrammer.h>
Definition at line 54 of file GlobalRecHitsHistogrammer.h.
typedef std::map<uint32_t,float,std::less<uint32_t> > GlobalRecHitsHistogrammer::MapType |
Definition at line 62 of file GlobalRecHitsHistogrammer.h.
GlobalRecHitsHistogrammer::GlobalRecHitsHistogrammer | ( | const edm::ParameterSet & | iPSet | ) | [explicit] |
Definition at line 15 of file GlobalRecHitsHistogrammer.cc.
References DQMStore::book1D(), dbe, doOutput, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GlobalRecHitSrc_, i, j, mehCSCn, mehCSCResRDPhi, mehDtMuonn, mehDtMuonRes, mehEcaln, mehEcalRes, mehHcaln, mehHcalRes, mehRPCn, mehRPCResX, mehSiPixeln, mehSiPixelResX, mehSiPixelResY, mehSiStripn, mehSiStripResX, mehSiStripResY, outputfile, printProvenanceInfo, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), and verbosity.
00015 : 00016 fName(""), verbosity(0), frequency(0), label(""), getAllProvenances(false), 00017 printProvenanceInfo(false), count(0) 00018 { 00019 std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer"; 00020 00021 // get information from parameter set 00022 fName = iPSet.getUntrackedParameter<std::string>("Name"); 00023 verbosity = iPSet.getUntrackedParameter<int>("Verbosity"); 00024 frequency = iPSet.getUntrackedParameter<int>("Frequency"); 00025 outputfile = iPSet.getParameter<std::string>("outputFile"); 00026 doOutput = iPSet.getParameter<bool>("DoOutput"); 00027 edm::ParameterSet m_Prov = 00028 iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup"); 00029 getAllProvenances = 00030 m_Prov.getUntrackedParameter<bool>("GetAllProvenances"); 00031 printProvenanceInfo = 00032 m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo"); 00033 00034 //get Labels to use to extract information 00035 GlobalRecHitSrc_ = iPSet.getParameter<edm::InputTag>("GlobalRecHitSrc"); 00036 // ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc"); 00037 //ECalUncalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc"); 00038 //ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc"); 00039 //ECalUncalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEESrc"); 00040 //ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc"); 00041 //HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc"); 00042 //SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc"); 00043 //SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc"); 00044 //MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc"); 00045 //MuDTSimSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSimSrc"); 00046 //MuCSCSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCSrc"); 00047 //MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc"); 00048 //MuRPCSimSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSimSrc"); 00049 00050 //conf_ = iPSet; 00051 00052 // use value of first digit to determine default output level (inclusive) 00053 // 0 is none, 1 is basic, 2 is fill output, 3 is gather output 00054 verbosity %= 10; 00055 00056 // create persistent object 00057 // produces<PGlobalRecHit>(label); 00058 00059 // print out Parameter Set information being used 00060 if (verbosity >= 0) { 00061 edm::LogInfo(MsgLoggerCat) 00062 << "\n===============================\n" 00063 << "Initialized as EDProducer with parameter values:\n" 00064 << " Name = " << fName << "\n" 00065 << " Verbosity = " << verbosity << "\n" 00066 << " Frequency = " << frequency << "\n" 00067 << " OutputFile = " << outputfile << "\n" 00068 << " DoOutput = " << doOutput << "\n" 00069 << " GetProv = " << getAllProvenances << "\n" 00070 << " PrintProv = " << printProvenanceInfo << "\n" 00071 << " Global Src = " << GlobalRecHitSrc_ << "\n" 00072 << "===============================\n"; 00073 00074 } 00075 //Put in analyzer stuff here.... 00076 00077 dbe = 0; 00078 dbe = edm::Service<DQMStore>().operator->(); 00079 if (dbe) { 00080 if (verbosity > 0 ) { 00081 dbe->setVerbose(1); 00082 } else { 00083 dbe->setVerbose(0); 00084 } 00085 } 00086 if (dbe) { 00087 if (verbosity > 0 ) dbe->showDirStructure(); 00088 } 00089 00090 Char_t hname[100]; 00091 Char_t htitle[100]; 00092 00093 //monitor elements 00094 00095 //Si Strip 00096 if(dbe) 00097 { 00098 string SiStripString[19] = {"TECW1", "TECW2", "TECW3", "TECW4", "TECW5", "TECW6", "TECW7", "TECW8", "TIBL1", "TIBL2", "TIBL3", "TIBL4", "TIDW1", "TIDW2", "TIDW3", "TOBL1", "TOBL2", "TOBL3", "TOBL4"}; 00099 for(int i = 0; i<19; ++i) 00100 { 00101 mehSiStripn[i]=0; 00102 mehSiStripResX[i]=0; 00103 mehSiStripResY[i]=0; 00104 } 00105 string hcharname, hchartitle; 00106 dbe->setCurrentFolder("GlobalRecHitsV/SiStrips"); 00107 for(int amend = 0; amend < 19; ++amend) 00108 { 00109 hcharname = "hSiStripn_"+SiStripString[amend]; 00110 hchartitle= SiStripString[amend]+" rechits"; 00111 sprintf(hname, hcharname.c_str()); 00112 sprintf(htitle, hchartitle.c_str()); 00113 mehSiStripn[amend] = dbe->book1D(hname,htitle,20,0.,20.); 00114 mehSiStripn[amend]->setAxisTitle("Number of hits in "+SiStripString[amend],1); 00115 mehSiStripn[amend]->setAxisTitle("Count",2); 00116 hcharname = "hSiStripResX_"+SiStripString[amend]; 00117 hchartitle= SiStripString[amend]+" rechit x resolution"; 00118 sprintf(hname, hcharname.c_str()); 00119 sprintf(htitle, hchartitle.c_str()); 00120 mehSiStripResX[amend] = dbe->book1D(hname,htitle,200,-0.02,.02); 00121 mehSiStripResX[amend]->setAxisTitle("X-resolution in "+SiStripString[amend],1); 00122 mehSiStripResX[amend]->setAxisTitle("Count",2); 00123 hcharname = "hSiStripResY_"+SiStripString[amend]; 00124 hchartitle= SiStripString[amend]+" rechit y resolution"; 00125 sprintf(hname, hcharname.c_str()); 00126 sprintf(htitle, hchartitle.c_str()); 00127 mehSiStripResY[amend] = dbe->book1D(hname,htitle,200,-0.02,.02); 00128 mehSiStripResY[amend]->setAxisTitle("Y-resolution in "+SiStripString[amend],1); 00129 mehSiStripResY[amend]->setAxisTitle("Count",2); 00130 } 00131 00132 00133 //HCal 00134 //string hcharname, hchartitle; 00135 string HCalString[4]={"HB", "HE", "HF", "HO"}; 00136 float HCalnUpper[4]={3000.,3000.,3000.,2000.}; float HCalnLower[4]={2000.,2000.,2000.,1000.}; 00137 for(int j =0; j <4; ++j) 00138 { 00139 mehHcaln[j]=0; 00140 mehHcalRes[j]=0; 00141 } 00142 00143 dbe->setCurrentFolder("GlobalRecHitsV/HCals"); 00144 for(int amend = 0; amend < 4; ++amend) 00145 { 00146 hcharname = "hHcaln_"+HCalString[amend]; 00147 hchartitle= HCalString[amend]+" rechits"; 00148 sprintf(hname, hcharname.c_str()); 00149 sprintf(htitle, hchartitle.c_str()); 00150 mehHcaln[amend] = dbe->book1D(hname,htitle, 500, HCalnLower[amend], HCalnUpper[amend]); 00151 mehHcaln[amend]->setAxisTitle("Number of RecHits",1); 00152 mehHcaln[amend]->setAxisTitle("Count",2); 00153 hcharname = "hHcalRes_"+HCalString[amend]; 00154 hchartitle= HCalString[amend]+" rechit resolution"; 00155 sprintf(hname, hcharname.c_str()); 00156 sprintf(htitle, hchartitle.c_str()); 00157 mehHcalRes[amend] = dbe->book1D(hname,htitle, 25, -2., 2.); 00158 mehHcalRes[amend]->setAxisTitle("RecHit E - SimHit E",1); 00159 mehHcalRes[amend]->setAxisTitle("Count",2); 00160 } 00161 00162 00163 //Ecal 00164 string ECalString[3] = {"EB","EE", "ES"}; 00165 int ECalnBins[3] = {700,100,50}; 00166 float ECalnUpper[3] = {20000., 62000., 300.}; 00167 float ECalnLower[3] = {6000., 60000., 100.}; 00168 int ECalResBins[3] = {200,200,200}; 00169 float ECalResUpper[3] = {1., 0.3, .0002}; 00170 float ECalResLower[3] = {-1., -0.3, -.0002}; 00171 for(int i =0; i<3; ++i) 00172 { 00173 mehEcaln[i]=0; 00174 mehEcalRes[i]=0; 00175 } 00176 dbe->setCurrentFolder("GlobalRecHitsV/ECals"); 00177 00178 for(int amend = 0; amend < 3; ++amend) 00179 { 00180 hcharname = "hEcaln_"+ECalString[amend]; 00181 hchartitle= ECalString[amend]+" rechits"; 00182 sprintf(hname, hcharname.c_str()); 00183 sprintf(htitle, hchartitle.c_str()); 00184 mehEcaln[amend] = dbe->book1D(hname,htitle, ECalnBins[amend], ECalnLower[amend], ECalnUpper[amend]); 00185 mehEcaln[amend]->setAxisTitle("Number of RecHits",1); 00186 mehEcaln[amend]->setAxisTitle("Count",2); 00187 hcharname = "hEcalRes_"+ECalString[amend]; 00188 hchartitle= ECalString[amend]+" rechit resolution"; 00189 sprintf(hname, hcharname.c_str()); 00190 sprintf(htitle, hchartitle.c_str()); 00191 mehEcalRes[amend] = dbe->book1D(hname,htitle,ECalResBins[amend], ECalResLower[amend], ECalResUpper[amend]); 00192 mehEcalRes[amend]->setAxisTitle("RecHit E - SimHit E",1); 00193 mehEcalRes[amend]->setAxisTitle("Count",2); 00194 } 00195 00196 00197 //Si Pixels 00198 string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"}; 00199 for(int j =0; j<7; ++j) 00200 { 00201 mehSiPixeln[j]=0; 00202 mehSiPixelResX[j]=0; 00203 mehSiPixelResY[j]=0; 00204 } 00205 00206 dbe->setCurrentFolder("GlobalRecHitsV/SiPixels"); 00207 for(int amend = 0; amend < 7; ++amend) 00208 { 00209 hcharname = "hSiPixeln_"+SiPixelString[amend]; 00210 hchartitle= SiPixelString[amend]+" rechits"; 00211 sprintf(hname, hcharname.c_str()); 00212 sprintf(htitle, hchartitle.c_str()); 00213 mehSiPixeln[amend] = dbe->book1D(hname,htitle,20,0.,20.); 00214 mehSiPixeln[amend]->setAxisTitle("Number of hits in "+SiPixelString[amend],1); 00215 mehSiPixeln[amend]->setAxisTitle("Count",2); 00216 hcharname = "hSiPixelResX_"+SiPixelString[amend]; 00217 hchartitle= SiPixelString[amend]+" rechit x resolution"; 00218 sprintf(hname, hcharname.c_str()); 00219 sprintf(htitle, hchartitle.c_str()); 00220 mehSiPixelResX[amend] = dbe->book1D(hname,htitle,200,-0.02,.02); 00221 mehSiPixelResX[amend]->setAxisTitle("X-resolution in "+SiPixelString[amend],1); 00222 mehSiPixelResX[amend]->setAxisTitle("Count",2); 00223 hcharname = "hSiPixelResY_"+SiPixelString[amend]; 00224 hchartitle= SiPixelString[amend]+" rechit y resolution"; 00225 00226 sprintf(hname, hcharname.c_str()); 00227 sprintf(htitle, hchartitle.c_str()); 00228 mehSiPixelResY[amend] = dbe->book1D(hname,htitle,200,-0.02,.02); 00229 mehSiPixelResY[amend]->setAxisTitle("Y-resolution in "+SiPixelString[amend],1); 00230 mehSiPixelResY[amend]->setAxisTitle("Count",2); 00231 } 00232 //Muons 00233 dbe->setCurrentFolder("GlobalRecHitsV/Muons"); 00234 00235 mehDtMuonn = 0; 00236 mehCSCn = 0; 00237 mehRPCn = 0; 00238 00239 //std::vector<MonitorElement *> me_List = {mehDtMuonn, mehCSCn, mehRPCn}; 00240 string n_List[3] = {"hDtMuonn", "hCSCn", "hRPCn"}; 00241 //float hist_prop[3] = [25., 0., 50.]; 00242 string hist_string[3] = {"Dt", "CSC", "RPC"}; 00243 00244 for(int amend=0; amend<3; ++amend) 00245 { 00246 hchartitle = hist_string[amend]+" rechits"; 00247 sprintf(hname, n_List[amend].c_str()); 00248 sprintf(htitle, hchartitle.c_str()); 00249 if(amend==0) 00250 { 00251 mehDtMuonn=dbe->book1D(hname,htitle,25, 0., 50.); 00252 mehDtMuonn->setAxisTitle("Number of Rechits",1); 00253 mehDtMuonn->setAxisTitle("Count",2); 00254 } 00255 if(amend==1) 00256 { 00257 mehCSCn=dbe->book1D(hname,htitle,25, 0., 50.); 00258 mehCSCn->setAxisTitle("Number of Rechits",1); 00259 mehCSCn->setAxisTitle("Count",2); 00260 } 00261 if(amend==2) 00262 { 00263 mehRPCn=dbe->book1D(hname,htitle,25, 0., 50.); 00264 mehRPCn->setAxisTitle("Number of Rechits",1); 00265 mehRPCn->setAxisTitle("Count",2); 00266 } 00267 } 00268 00269 mehDtMuonRes=0; 00270 mehCSCResRDPhi=0; 00271 mehRPCResX=0; 00272 00273 sprintf(hname, "hDtMuonRes"); 00274 sprintf(htitle, "DT wire distance resolution"); 00275 mehDtMuonRes = dbe->book1D(hname, htitle, 200, -0.2, 0.2); 00276 sprintf(hname, "CSCResRDPhi"); 00277 sprintf(htitle, "CSC perp*dphi resolution"); 00278 mehCSCResRDPhi = dbe->book1D(hname, htitle, 200, -0.2, 0.2); 00279 sprintf(hname,"hRPCResX"); 00280 sprintf(htitle, "RPC rechits x resolution"); 00281 mehRPCResX = dbe->book1D(hname, htitle, 50, -5., 5.); 00282 } 00283 00284 }
GlobalRecHitsHistogrammer::~GlobalRecHitsHistogrammer | ( | ) | [virtual] |
Definition at line 287 of file GlobalRecHitsHistogrammer.cc.
References dbe, doOutput, outputfile, and DQMStore::save().
00288 { 00289 if (doOutput) 00290 if (outputfile.size() != 0 && dbe) dbe->save(outputfile); 00291 }
void GlobalRecHitsHistogrammer::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 307 of file GlobalRecHitsHistogrammer.cc.
References count, MonitorElement::Fill(), frequency, edm::Event::getAllProvenance(), getAllProvenances, edm::Event::getByLabel(), GlobalRecHitSrc_, i, edm::Event::id(), edm::Handle< T >::isValid(), mehCSCn, mehCSCResRDPhi, mehDtMuonn, mehDtMuonRes, mehEcaln, mehEcalRes, mehHcaln, mehHcalRes, mehRPCn, mehRPCResX, mehSiPixeln, mehSiPixelResX, mehSiPixelResY, mehSiStripn, mehSiStripResX, mehSiStripResY, printProvenanceInfo, and verbosity.
00309 { 00310 std::string MsgLoggerCat = "GlobalRecHitsHistogrammer_analyze"; 00311 00312 // keep track of number of events processed 00313 ++count; 00314 00315 // get event id information 00316 int nrun = iEvent.id().run(); 00317 int nevt = iEvent.id().event(); 00318 00319 if (verbosity > 0) { 00320 edm::LogInfo(MsgLoggerCat) 00321 << "Processing run " << nrun << ", event " << nevt 00322 << " (" << count << " events total)"; 00323 } else if (verbosity == 0) { 00324 if (nevt%frequency == 0 || nevt == 1) { 00325 edm::LogInfo(MsgLoggerCat) 00326 << "Processing run " << nrun << ", event " << nevt 00327 << " (" << count << " events total)"; 00328 } 00329 } 00330 00331 // clear event holders 00332 //clear(); Not in example I'm using, thus I comment it out. 00333 00334 // look at information available in the event 00335 if (getAllProvenances) { 00336 00337 std::vector<const edm::Provenance*> AllProv; 00338 iEvent.getAllProvenance(AllProv); 00339 00340 if (verbosity >= 0) 00341 edm::LogInfo(MsgLoggerCat) 00342 << "Number of Provenances = " << AllProv.size(); 00343 00344 if (printProvenanceInfo && (verbosity >= 0)) { 00345 TString eventout("\nProvenance info:\n"); 00346 00347 for (unsigned int i = 0; i < AllProv.size(); ++i) { 00348 eventout += "\n ******************************"; 00349 eventout += "\n Module : "; 00350 //eventout += (AllProv[i]->product).moduleLabel(); 00351 eventout += AllProv[i]->moduleLabel(); 00352 eventout += "\n ProductID : "; 00353 //eventout += (AllProv[i]->product).productID_.id_; 00354 eventout += AllProv[i]->productID().id(); 00355 eventout += "\n ClassName : "; 00356 //eventout += (AllProv[i]->product).fullClassName_; 00357 eventout += AllProv[i]->className(); 00358 eventout += "\n InstanceName : "; 00359 //eventout += (AllProv[i]->product).productInstanceName_; 00360 eventout += AllProv[i]->productInstanceName(); 00361 eventout += "\n BranchName : "; 00362 //eventout += (AllProv[i]->product).branchName_; 00363 eventout += AllProv[i]->branchName(); 00364 } 00365 eventout += "\n ******************************\n"; 00366 edm::LogInfo(MsgLoggerCat) << eventout << "\n"; 00367 printProvenanceInfo = false; 00368 } 00369 getAllProvenances = false; 00370 } 00371 00372 edm::Handle<PGlobalRecHit> srcGlobalRecHits; 00373 iEvent.getByLabel(GlobalRecHitSrc_,srcGlobalRecHits); 00374 if (!srcGlobalRecHits.isValid()) { 00375 edm::LogWarning(MsgLoggerCat) 00376 << "Unable to find PGlobalRecHit in event!"; 00377 return; 00378 } 00379 00380 int nEBCalRecHits = srcGlobalRecHits->getnEBCalRecHits(); 00381 int nEECalRecHits = srcGlobalRecHits->getnEECalRecHits(); 00382 int nESCalRecHits = srcGlobalRecHits->getnESCalRecHits(); 00383 00384 int nHBCalRecHits = srcGlobalRecHits->getnHBCalRecHits(); 00385 int nHECalRecHits = srcGlobalRecHits->getnHECalRecHits(); 00386 int nHOCalRecHits = srcGlobalRecHits->getnHOCalRecHits(); 00387 int nHFCalRecHits = srcGlobalRecHits->getnHFCalRecHits(); 00388 00389 int nTIBL1RecHits = srcGlobalRecHits->getnTIBL1RecHits(); 00390 int nTIBL2RecHits = srcGlobalRecHits->getnTIBL2RecHits(); 00391 int nTIBL3RecHits = srcGlobalRecHits->getnTIBL3RecHits(); 00392 int nTIBL4RecHits = srcGlobalRecHits->getnTIBL4RecHits(); 00393 int nTOBL1RecHits = srcGlobalRecHits->getnTOBL1RecHits(); 00394 int nTOBL2RecHits = srcGlobalRecHits->getnTOBL2RecHits(); 00395 int nTOBL3RecHits = srcGlobalRecHits->getnTOBL3RecHits(); 00396 int nTOBL4RecHits = srcGlobalRecHits->getnTOBL4RecHits(); 00397 int nTIDW1RecHits = srcGlobalRecHits->getnTIDW1RecHits(); 00398 int nTIDW2RecHits = srcGlobalRecHits->getnTIDW2RecHits(); 00399 int nTIDW3RecHits = srcGlobalRecHits->getnTIDW3RecHits(); 00400 int nTECW1RecHits = srcGlobalRecHits->getnTECW1RecHits(); 00401 int nTECW2RecHits = srcGlobalRecHits->getnTECW2RecHits(); 00402 int nTECW3RecHits = srcGlobalRecHits->getnTECW3RecHits(); 00403 int nTECW4RecHits = srcGlobalRecHits->getnTECW4RecHits(); 00404 int nTECW5RecHits = srcGlobalRecHits->getnTECW5RecHits(); 00405 int nTECW6RecHits = srcGlobalRecHits->getnTECW6RecHits(); 00406 int nTECW7RecHits = srcGlobalRecHits->getnTECW7RecHits(); 00407 int nTECW8RecHits = srcGlobalRecHits->getnTECW8RecHits(); 00408 00409 int nBRL1RecHits = srcGlobalRecHits->getnBRL1RecHits(); 00410 int nBRL2RecHits = srcGlobalRecHits->getnBRL2RecHits(); 00411 int nBRL3RecHits = srcGlobalRecHits->getnBRL3RecHits(); 00412 int nFWD1nRecHits = srcGlobalRecHits->getnFWD1nRecHits(); 00413 int nFWD1pRecHits = srcGlobalRecHits->getnFWD1pRecHits(); 00414 int nFWD2nRecHits = srcGlobalRecHits->getnFWD2nRecHits(); 00415 int nFWD2pRecHits = srcGlobalRecHits->getnFWD2pRecHits(); 00416 00417 int nDTRecHits = srcGlobalRecHits->getnDTRecHits(); 00418 00419 int nCSCRecHits = srcGlobalRecHits->getnCSCRecHits(); 00420 00421 int nRPCRecHits = srcGlobalRecHits->getnRPCRecHits(); 00422 00423 // get Ecal info 00424 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits = 00425 srcGlobalRecHits->getEECalRecHits(); 00426 mehEcaln[0]->Fill((float)nEECalRecHits); 00427 for (unsigned int i = 0; i < EECalRecHits.size(); ++i) { 00428 mehEcalRes[0]->Fill(EECalRecHits[i].RE - EECalRecHits[i].SHE); 00429 } 00430 00431 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits = 00432 srcGlobalRecHits->getEBCalRecHits(); 00433 mehEcaln[1]->Fill((float)nEBCalRecHits); 00434 for (unsigned int i = 0; i < EBCalRecHits.size(); ++i) { 00435 mehEcalRes[1]->Fill(EBCalRecHits[i].RE - EBCalRecHits[i].SHE); 00436 } 00437 00438 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits = 00439 srcGlobalRecHits->getESCalRecHits(); 00440 mehEcaln[2]->Fill((float)nESCalRecHits); 00441 for (unsigned int i = 0; i < ESCalRecHits.size(); ++i) { 00442 mehEcalRes[2]->Fill(ESCalRecHits[i].RE - ESCalRecHits[i].SHE); 00443 } 00444 00445 // Get HCal info 00446 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits = 00447 srcGlobalRecHits->getHBCalRecHits(); 00448 mehHcaln[0]->Fill((float)nHBCalRecHits); 00449 for (unsigned int i = 0; i < HBCalRecHits.size(); ++i) { 00450 mehHcalRes[0]->Fill(HBCalRecHits[i].REC - HBCalRecHits[i].SHE); 00451 } 00452 00453 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits = 00454 srcGlobalRecHits->getHECalRecHits(); 00455 mehHcaln[1]->Fill((float)nHECalRecHits); 00456 for (unsigned int i = 0; i < HECalRecHits.size(); ++i) { 00457 mehHcalRes[1]->Fill(HECalRecHits[i].REC - HECalRecHits[i].SHE); 00458 } 00459 00460 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits = 00461 srcGlobalRecHits->getHOCalRecHits(); 00462 mehHcaln[2]->Fill((float)nHOCalRecHits); 00463 for (unsigned int i = 0; i < HOCalRecHits.size(); ++i) { 00464 mehHcalRes[2]->Fill(HOCalRecHits[i].REC - HOCalRecHits[i].SHE); 00465 } 00466 00467 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits = 00468 srcGlobalRecHits->getHFCalRecHits(); 00469 mehHcaln[3]->Fill((float)nHFCalRecHits); 00470 for (unsigned int i = 0; i < HFCalRecHits.size(); ++i) { 00471 mehHcalRes[3]->Fill(HFCalRecHits[i].REC - HFCalRecHits[i].SHE); 00472 } 00473 00474 // get SiStrip info 00475 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits = 00476 srcGlobalRecHits->getTIBL1RecHits(); 00477 mehSiStripn[0]->Fill((float)nTIBL1RecHits); 00478 for (unsigned int i = 0; i < TIBL1RecHits.size(); ++i) { 00479 mehSiStripResX[0]->Fill(TIBL1RecHits[i].RX - TIBL1RecHits[i].SX); 00480 mehSiStripResY[0]->Fill(TIBL1RecHits[i].RY - TIBL1RecHits[i].SY); 00481 } 00482 00483 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits = 00484 srcGlobalRecHits->getTIBL2RecHits(); 00485 mehSiStripn[1]->Fill((float)nTIBL2RecHits); 00486 for (unsigned int i = 0; i < TIBL2RecHits.size(); ++i) { 00487 mehSiStripResX[1]->Fill(TIBL2RecHits[i].RX - TIBL2RecHits[i].SX); 00488 mehSiStripResY[1]->Fill(TIBL2RecHits[i].RY - TIBL2RecHits[i].SY); 00489 } 00490 00491 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits = 00492 srcGlobalRecHits->getTIBL3RecHits(); 00493 mehSiStripn[2]->Fill((float)nTIBL3RecHits); 00494 for (unsigned int i = 0; i < TIBL3RecHits.size(); ++i) { 00495 mehSiStripResX[2]->Fill(TIBL3RecHits[i].RX - TIBL3RecHits[i].SX); 00496 mehSiStripResY[2]->Fill(TIBL3RecHits[i].RY - TIBL3RecHits[i].SY); 00497 } 00498 00499 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits = 00500 srcGlobalRecHits->getTIBL4RecHits(); 00501 mehSiStripn[3]->Fill((float)nTIBL4RecHits); 00502 for (unsigned int i = 0; i < TIBL4RecHits.size(); ++i) { 00503 mehSiStripResX[3]->Fill(TIBL4RecHits[i].RX - TIBL4RecHits[i].SX); 00504 mehSiStripResY[3]->Fill(TIBL4RecHits[i].RY - TIBL4RecHits[i].SY); 00505 } 00506 00507 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits = 00508 srcGlobalRecHits->getTOBL1RecHits(); 00509 mehSiStripn[4]->Fill((float)nTOBL1RecHits); 00510 for (unsigned int i = 0; i < TOBL1RecHits.size(); ++i) { 00511 mehSiStripResX[4]->Fill(TOBL1RecHits[i].RX - TOBL1RecHits[i].SX); 00512 mehSiStripResY[4]->Fill(TOBL1RecHits[i].RY - TOBL1RecHits[i].SY); 00513 } 00514 00515 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits = 00516 srcGlobalRecHits->getTOBL2RecHits(); 00517 mehSiStripn[5]->Fill((float)nTOBL2RecHits); 00518 for (unsigned int i = 0; i < TOBL2RecHits.size(); ++i) { 00519 mehSiStripResX[5]->Fill(TOBL2RecHits[i].RX - TOBL2RecHits[i].SX); 00520 mehSiStripResY[5]->Fill(TOBL2RecHits[i].RY - TOBL2RecHits[i].SY); 00521 } 00522 00523 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits = 00524 srcGlobalRecHits->getTOBL3RecHits(); 00525 mehSiStripn[6]->Fill((float)nTOBL3RecHits); 00526 for (unsigned int i = 0; i < TOBL3RecHits.size(); ++i) { 00527 mehSiStripResX[6]->Fill(TOBL3RecHits[i].RX - TOBL3RecHits[i].SX); 00528 mehSiStripResY[6]->Fill(TOBL3RecHits[i].RY - TOBL3RecHits[i].SY); 00529 } 00530 00531 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits = 00532 srcGlobalRecHits->getTOBL4RecHits(); 00533 mehSiStripn[7]->Fill((float)nTOBL4RecHits); 00534 for (unsigned int i = 0; i < TOBL4RecHits.size(); ++i) { 00535 mehSiStripResX[7]->Fill(TOBL4RecHits[i].RX - TOBL4RecHits[i].SX); 00536 mehSiStripResY[7]->Fill(TOBL4RecHits[i].RY - TOBL4RecHits[i].SY); 00537 } 00538 00539 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits = 00540 srcGlobalRecHits->getTIDW1RecHits(); 00541 mehSiStripn[8]->Fill((float)nTIDW1RecHits); 00542 for (unsigned int i = 0; i < TIDW1RecHits.size(); ++i) { 00543 mehSiStripResX[8]->Fill(TIDW1RecHits[i].RX - TIDW1RecHits[i].SX); 00544 mehSiStripResY[8]->Fill(TIDW1RecHits[i].RY - TIDW1RecHits[i].SY); 00545 } 00546 00547 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits = 00548 srcGlobalRecHits->getTIDW2RecHits(); 00549 mehSiStripn[9]->Fill((float)nTIDW2RecHits); 00550 for (unsigned int i = 0; i < TIDW2RecHits.size(); ++i) { 00551 mehSiStripResX[9]->Fill(TIDW2RecHits[i].RX - TIDW2RecHits[i].SX); 00552 mehSiStripResY[9]->Fill(TIDW2RecHits[i].RY - TIDW2RecHits[i].SY); 00553 } 00554 00555 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits = 00556 srcGlobalRecHits->getTIDW3RecHits(); 00557 mehSiStripn[10]->Fill((float)nTIDW3RecHits); 00558 for (unsigned int i = 0; i < TIDW3RecHits.size(); ++i) { 00559 mehSiStripResX[10]->Fill(TIDW3RecHits[i].RX - TIDW3RecHits[i].SX); 00560 mehSiStripResY[10]->Fill(TIDW3RecHits[i].RY - TIDW3RecHits[i].SY); 00561 } 00562 00563 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits = 00564 srcGlobalRecHits->getTECW1RecHits(); 00565 mehSiStripn[11]->Fill((float)nTECW1RecHits); 00566 for (unsigned int i = 0; i < TECW1RecHits.size(); ++i) { 00567 mehSiStripResX[11]->Fill(TECW1RecHits[i].RX - TECW1RecHits[i].SX); 00568 mehSiStripResY[11]->Fill(TECW1RecHits[i].RY - TECW1RecHits[i].SY); 00569 } 00570 00571 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits = 00572 srcGlobalRecHits->getTECW2RecHits(); 00573 mehSiStripn[12]->Fill((float)nTECW2RecHits); 00574 for (unsigned int i = 0; i < TECW2RecHits.size(); ++i) { 00575 mehSiStripResX[12]->Fill(TECW2RecHits[i].RX - TECW2RecHits[i].SX); 00576 mehSiStripResY[12]->Fill(TECW2RecHits[i].RY - TECW2RecHits[i].SY); 00577 } 00578 00579 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits = 00580 srcGlobalRecHits->getTECW3RecHits(); 00581 mehSiStripn[13]->Fill((float)nTECW3RecHits); 00582 for (unsigned int i = 0; i < TECW3RecHits.size(); ++i) { 00583 mehSiStripResX[13]->Fill(TECW3RecHits[i].RX - TECW3RecHits[i].SX); 00584 mehSiStripResY[13]->Fill(TECW3RecHits[i].RY - TECW3RecHits[i].SY); 00585 } 00586 00587 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits = 00588 srcGlobalRecHits->getTECW4RecHits(); 00589 mehSiStripn[14]->Fill((float)nTECW4RecHits); 00590 for (unsigned int i = 0; i < TECW4RecHits.size(); ++i) { 00591 mehSiStripResX[14]->Fill(TECW4RecHits[i].RX - TECW4RecHits[i].SX); 00592 mehSiStripResY[14]->Fill(TECW4RecHits[i].RY - TECW4RecHits[i].SY); 00593 } 00594 00595 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits = 00596 srcGlobalRecHits->getTECW5RecHits(); 00597 mehSiStripn[15]->Fill((float)nTECW5RecHits); 00598 for (unsigned int i = 0; i < TECW5RecHits.size(); ++i) { 00599 mehSiStripResX[15]->Fill(TECW5RecHits[i].RX - TECW5RecHits[i].SX); 00600 mehSiStripResY[15]->Fill(TECW5RecHits[i].RY - TECW5RecHits[i].SY); 00601 } 00602 00603 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits = 00604 srcGlobalRecHits->getTECW6RecHits(); 00605 mehSiStripn[16]->Fill((float)nTECW6RecHits); 00606 for (unsigned int i = 0; i < TECW6RecHits.size(); ++i) { 00607 mehSiStripResX[16]->Fill(TECW6RecHits[i].RX - TECW6RecHits[i].SX); 00608 mehSiStripResY[16]->Fill(TECW6RecHits[i].RY - TECW6RecHits[i].SY); 00609 } 00610 00611 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits = 00612 srcGlobalRecHits->getTECW7RecHits(); 00613 mehSiStripn[17]->Fill((float)nTECW7RecHits); 00614 for (unsigned int i = 0; i < TECW7RecHits.size(); ++i) { 00615 mehSiStripResX[17]->Fill(TECW7RecHits[i].RX - TECW7RecHits[i].SX); 00616 mehSiStripResY[17]->Fill(TECW7RecHits[i].RY - TECW7RecHits[i].SY); 00617 } 00618 00619 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits = 00620 srcGlobalRecHits->getTECW8RecHits(); 00621 mehSiStripn[18]->Fill((float)nTECW8RecHits); 00622 for (unsigned int i = 0; i < TECW8RecHits.size(); ++i) { 00623 mehSiStripResX[18]->Fill(TECW8RecHits[i].RX - TECW8RecHits[i].SX); 00624 mehSiStripResY[18]->Fill(TECW8RecHits[i].RY - TECW8RecHits[i].SY); 00625 } 00626 00627 // get SiPixel info 00628 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits = 00629 srcGlobalRecHits->getBRL1RecHits(); 00630 mehSiPixeln[0]->Fill((float)nBRL1RecHits); 00631 for (unsigned int i = 0; i < BRL1RecHits.size(); ++i) { 00632 mehSiPixelResX[0]->Fill(BRL1RecHits[i].RX - BRL1RecHits[i].SX); 00633 mehSiPixelResY[0]->Fill(BRL1RecHits[i].RY - BRL1RecHits[i].SY); 00634 } 00635 00636 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits = 00637 srcGlobalRecHits->getBRL2RecHits(); 00638 mehSiPixeln[1]->Fill((float)nBRL2RecHits); 00639 for (unsigned int i = 0; i < BRL2RecHits.size(); ++i) { 00640 mehSiPixelResX[1]->Fill(BRL2RecHits[i].RX - BRL2RecHits[i].SX); 00641 mehSiPixelResY[1]->Fill(BRL2RecHits[i].RY - BRL2RecHits[i].SY); 00642 } 00643 00644 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits = 00645 srcGlobalRecHits->getBRL3RecHits(); 00646 mehSiPixeln[2]->Fill((float)nBRL3RecHits); 00647 for (unsigned int i = 0; i < BRL3RecHits.size(); ++i) { 00648 mehSiPixelResX[2]->Fill(BRL3RecHits[i].RX - BRL3RecHits[i].SX); 00649 mehSiPixelResY[2]->Fill(BRL3RecHits[i].RY - BRL3RecHits[i].SY); 00650 } 00651 00652 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits = 00653 srcGlobalRecHits->getFWD1pRecHits(); 00654 mehSiPixeln[3]->Fill((float)nFWD1pRecHits); 00655 for (unsigned int i = 0; i < FWD1pRecHits.size(); ++i) { 00656 mehSiPixelResX[3]->Fill(FWD1pRecHits[i].RX - FWD1pRecHits[i].SX); 00657 mehSiPixelResY[3]->Fill(FWD1pRecHits[i].RY - FWD1pRecHits[i].SY); 00658 } 00659 00660 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits = 00661 srcGlobalRecHits->getFWD1nRecHits(); 00662 mehSiPixeln[4]->Fill((float)nFWD1nRecHits); 00663 for (unsigned int i = 0; i < FWD1nRecHits.size(); ++i) { 00664 mehSiPixelResX[4]->Fill(FWD1nRecHits[i].RX - FWD1nRecHits[i].SX); 00665 mehSiPixelResY[4]->Fill(FWD1nRecHits[i].RY - FWD1nRecHits[i].SY); 00666 } 00667 00668 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits = 00669 srcGlobalRecHits->getFWD2pRecHits(); 00670 mehSiPixeln[5]->Fill((float)nFWD2pRecHits); 00671 for (unsigned int i = 0; i < FWD2pRecHits.size(); ++i) { 00672 mehSiPixelResX[5]->Fill(FWD2pRecHits[i].RX - FWD2pRecHits[i].SX); 00673 mehSiPixelResY[5]->Fill(FWD2pRecHits[i].RY - FWD2pRecHits[i].SY); 00674 } 00675 00676 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits = 00677 srcGlobalRecHits->getFWD2nRecHits(); 00678 mehSiPixeln[6]->Fill((float)nFWD2nRecHits); 00679 for (unsigned int i = 0; i < FWD2nRecHits.size(); ++i) { 00680 mehSiPixelResX[6]->Fill(FWD2nRecHits[i].RX - FWD2nRecHits[i].SX); 00681 mehSiPixelResY[6]->Fill(FWD2nRecHits[i].RY - FWD2nRecHits[i].SY); 00682 } 00683 00684 // get DtMuon info 00685 std::vector<PGlobalRecHit::DTRecHit> DTRecHits = 00686 srcGlobalRecHits->getDTRecHits(); 00687 mehDtMuonn->Fill((float)nDTRecHits); 00688 for (unsigned int i = 0; i < DTRecHits.size(); ++i) { 00689 mehDtMuonRes->Fill(DTRecHits[i].RHD - DTRecHits[i].SHD); 00690 } 00691 00692 // get CSC info 00693 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits = 00694 srcGlobalRecHits->getCSCRecHits(); 00695 mehCSCn->Fill((float)nCSCRecHits); 00696 for (unsigned int i = 0; i < CSCRecHits.size(); ++i) { 00697 mehCSCResRDPhi->Fill(CSCRecHits[i].RHPERP * 00698 (CSCRecHits[i].RHPHI - CSCRecHits[i].SHPHI)); 00699 } 00700 00701 // get RPC info 00702 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits = 00703 srcGlobalRecHits->getRPCRecHits(); 00704 mehRPCn->Fill((float)nRPCRecHits); 00705 for (unsigned int i = 0; i < RPCRecHits.size(); ++i) { 00706 mehRPCResX->Fill(RPCRecHits[i].RHX - RPCRecHits[i].SHX); 00707 } 00708 00709 if (verbosity > 0) 00710 edm::LogInfo (MsgLoggerCat) 00711 << "Done gathering data from event."; 00712 00713 }
void GlobalRecHitsHistogrammer::beginJob | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 298 of file GlobalRecHitsHistogrammer.cc.
References count, and verbosity.
00299 { 00300 std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_endJob"; 00301 if (verbosity >= 0) 00302 edm::LogInfo(MsgLoggerCat) 00303 << "Terminating having processed " << count << " events."; 00304 return; 00305 }
unsigned int GlobalRecHitsHistogrammer::count [private] |
DQMStore* GlobalRecHitsHistogrammer::dbe [private] |
Definition at line 81 of file GlobalRecHitsHistogrammer.h.
Referenced by GlobalRecHitsHistogrammer(), and ~GlobalRecHitsHistogrammer().
bool GlobalRecHitsHistogrammer::doOutput [private] |
Definition at line 83 of file GlobalRecHitsHistogrammer.h.
Referenced by GlobalRecHitsHistogrammer(), and ~GlobalRecHitsHistogrammer().
std::string GlobalRecHitsHistogrammer::fName [private] |
Definition at line 74 of file GlobalRecHitsHistogrammer.h.
Referenced by GlobalRecHitsHistogrammer().
int GlobalRecHitsHistogrammer::frequency [private] |
Definition at line 76 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 78 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 85 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
std::string GlobalRecHitsHistogrammer::label [private] |
Definition at line 77 of file GlobalRecHitsHistogrammer.h.
MonitorElement* GlobalRecHitsHistogrammer::mehCSCn [private] |
Definition at line 120 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 123 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 119 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 122 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehEcaln[3] [private] |
Definition at line 91 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehEcalRes[3] [private] |
Definition at line 92 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehHcaln[4] [private] |
Definition at line 98 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehHcalRes[4] [private] |
Definition at line 99 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehRPCn [private] |
Definition at line 121 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
Definition at line 124 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiPixeln[7] [private] |
Definition at line 112 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiPixelResX[7] [private] |
Definition at line 113 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiPixelResY[7] [private] |
Definition at line 114 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiStripn[19] [private] |
Definition at line 105 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiStripResX[19] [private] |
Definition at line 106 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
MonitorElement* GlobalRecHitsHistogrammer::mehSiStripResY[19] [private] |
Definition at line 107 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
std::string GlobalRecHitsHistogrammer::outputfile [private] |
Definition at line 82 of file GlobalRecHitsHistogrammer.h.
Referenced by GlobalRecHitsHistogrammer(), and ~GlobalRecHitsHistogrammer().
Definition at line 79 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), and GlobalRecHitsHistogrammer().
int GlobalRecHitsHistogrammer::verbosity [private] |
Definition at line 75 of file GlobalRecHitsHistogrammer.h.
Referenced by analyze(), endJob(), and GlobalRecHitsHistogrammer().