CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DTCreateSummaryHistos Class Reference

#include <DTCreateSummaryHistos.h>

Inheritance diagram for DTCreateSummaryHistos:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DTCreateSummaryHistos (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DTCreateSummaryHistos ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &setup)
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
- Protected Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

bool DataIntegrityHistos
 
int DDUId
 
bool DigiHistos
 
bool EfficiencyHistos
 
std::string MainFolder
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
edm::ParameterSet parameters
 
TPostScript * psFile
 
std::string PsFileName
 
bool RecoHistos
 
bool ResoHistos
 
int runNumber
 
bool TestPulsesHistos
 
TFile * theFile
 
bool TriggerHistos
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 41 of file DTCreateSummaryHistos.h.

Constructor & Destructor Documentation

DTCreateSummaryHistos::DTCreateSummaryHistos ( const edm::ParameterSet ps)

Constructor.

Definition at line 35 of file DTCreateSummaryHistos.cc.

References edm::ParameterSet::getUntrackedParameter(), cmsHarvester::nevents, Parameters::parameters, dtT0Analyzer_cfg::rootFileName, and interactiveExample::theFile.

35  {
36 
37  edm::LogVerbatim ("histos") << "[DTCreateSummaryHistos]: Constructor";
38 
39  parameters = ps;
40 
41  // The root file which contain the histos
42  string rootFileName = ps.getUntrackedParameter<string>("rootFileName", "DTEfficiencyTest.root");
43  theFile = new TFile(rootFileName.c_str(), "READ");
44 
45  // The *.ps file which contains the summary histos
46  PsFileName = ps.getUntrackedParameter<string>("PsFileName", "DTSummaryHistos");
47 
48  // Files to write in the *.ps file
49  DataIntegrityHistos = ps.getUntrackedParameter<bool>("DataIntegrityHistos", false);
50  DigiHistos = ps.getUntrackedParameter<bool>("DigiHistos", false);
51  RecoHistos = ps.getUntrackedParameter<bool>("RecoHistos", false);
52  ResoHistos = ps.getUntrackedParameter<bool>("ResoHistos", false);
53  EfficiencyHistos = ps.getUntrackedParameter<bool>("EfficiencyHistos", false);
54  TestPulsesHistos = ps.getUntrackedParameter<bool>("TestPulsesHistos", false);
55  TriggerHistos = ps.getUntrackedParameter<bool>("TriggerHistos", false);
56 
57  // The DDU Id
58  DDUId = ps.getUntrackedParameter<int>("DDUId");
59 
60  MainFolder = "DQMData/DT/";
61 
62  nevents = 0;
63 
64 }
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet parameters
DTCreateSummaryHistos::~DTCreateSummaryHistos ( )
virtual

Destructor.

Definition at line 66 of file DTCreateSummaryHistos.cc.

References cmsHarvester::nevents, and interactiveExample::theFile.

66  {
67 
68  edm::LogVerbatim ("histos") << "DTCreateSummaryHistos: analyzed " << nevents << " events";
69  theFile->Close();
70 
71 }

Member Function Documentation

void DTCreateSummaryHistos::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
protectedvirtual

BeginRun.

Reimplemented from DQMEDHarvester.

Definition at line 73 of file DTCreateSummaryHistos.cc.

References edm::EventSetup::get().

73  {
74 
75  // Get the geometry
76  context.get<MuonGeometryRecord>().get(muonGeom);
77 
78 }
edm::ESHandle< DTGeometry > muonGeom
void DTCreateSummaryHistos::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 80 of file DTCreateSummaryHistos.cc.

References alignmentValidation::c1, newFWLiteAna::found, timingPdfMaker::histo, DTLayerId::layer(), convertSQLiteXML::runNumber, DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, DTSuperLayerId::superlayer(), interactiveExample::theFile, and DTChamberId::wheel().

80  {
81 
82  edm::LogVerbatim ("histos") << "[DTCreateSummaryHistos] endjob called!";
83 
84  stringstream RunNum; RunNum << runNumber;
85  string PsFileNameWithRun = PsFileName + "_" + RunNum.str() + ".ps";
86  TPostScript psFile(PsFileNameWithRun.c_str(),111);
87  psFile.Range(20,26);
88  //psFile.NewPage();
89  TCanvas c1("c1","",600,780);
90 
91 
92 
93  // DataIntegrity summary histos **************************************************************
95  c1.Clear();
96  c1.Divide(2,2);
97  stringstream dduID; dduID << DDUId;
98 
99  string histo_name1 = MainFolder + "DataIntegrity/FED" + dduID.str() + "/FED" + dduID.str() + "_TTSValues";
100  TH1F *histo1 = (TH1F*) theFile -> Get(histo_name1.c_str());
101  c1.cd(1);
102  if(histo1)
103  histo1->Draw();
104 
105  string histo_name2 = MainFolder + "DataIntegrity/FED" + dduID.str() + "/FED" + dduID.str() + "_ROSStatus";
106  TH1F *histo2 = (TH1F*) theFile -> Get(histo_name2.c_str());
107  c1.cd(2);
108  if(histo2)
109  histo2->Draw();
110 
111  string histo_name3 = MainFolder + "DataIntegrity/FED" + dduID.str() + "/FED" + dduID.str() + "_ROSSummary";
112  TH1F *histo3 = (TH1F*) theFile -> Get(histo_name3.c_str());
113  c1.cd(3);
114  if(histo3)
115  histo3->Draw();
116 
117  string histo_name4 = MainFolder + "DataIntegrity/FED" + dduID.str() + "/ROS1/FED" + dduID.str() + "_ROS1_ROSError";
118  TH1F *histo4 = (TH1F*) theFile -> Get(histo_name4.c_str());
119  c1.cd(4);
120  if(histo4)
121  histo4->Draw();
122 
123  c1.Update();
124  psFile.NewPage();
125  }
126 
127  // Digi summary histos ********************************************************************
128  if(DigiHistos){
129  // Time Box Histos
130  c1.Clear();
131  c1.Divide(3,4);
132  // Loop over all the chambers
133  vector<const DTChamber*>::const_iterator ch_digi_it = muonGeom->chambers().begin();
134  vector<const DTChamber*>::const_iterator ch_digi_end = muonGeom->chambers().end();
135  for (; ch_digi_it != ch_digi_end; ++ch_digi_it) {
136  DTChamberId ch = (*ch_digi_it)->id();
137  stringstream wheel; wheel << ch.wheel();
138  stringstream station; station << ch.station();
139  stringstream sector; sector << ch.sector();
140  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_digi_it)->superLayers().begin();
141  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_digi_it)->superLayers().end();
142  // Loop over the SLs
143  for(; sl_it != sl_end; ++sl_it) {
144  DTSuperLayerId sl = (*sl_it)->id();
145  stringstream superLayer; superLayer << sl.superlayer();
146 
147  string digiFolder = MainFolder + "DTDigiTask/Wheel" + wheel.str();
148  string histo_name = digiFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/TimeBoxes/TimeBox_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str()+ "_SL" + superLayer.str();
149  TH1F *histo = (TH1F *) theFile->Get(histo_name.c_str());
150  if(histo){
151  int pad = (ch.station() - 1)*3 + sl.superlayer();
152  c1.cd(pad);
153  histo->Draw();
154  }
155  }
156  }
157  c1.Update();
158  psFile.NewPage();
159 
160  // Occupancy in Time Histos
161  c1.Clear();
162  c1.Divide(4,3);
163  // Loop over all the chambers
164  vector<const DTChamber*>::const_iterator ch_digi2_it = muonGeom->chambers().begin();
165  vector<const DTChamber*>::const_iterator ch_digi2_end = muonGeom->chambers().end();
166  for (; ch_digi2_it != ch_digi2_end; ++ch_digi2_it) {
167  DTChamberId ch = (*ch_digi2_it)->id();
168  stringstream wheel; wheel << ch.wheel();
169  stringstream station; station << ch.station();
170  stringstream sector; sector << ch.sector();
171  bool found = false;
172  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_digi2_it)->superLayers().begin();
173  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_digi2_it)->superLayers().end();
174  // Loop over the SLs
175  for(; sl_it != sl_end; ++sl_it) {
176  DTSuperLayerId sl = (*sl_it)->id();
177  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
178  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
179  stringstream superLayer; superLayer << sl.superlayer();
180  // Loop over the Ls
181  for(; l_it != l_end; ++l_it) {
182  DTLayerId layerId = (*l_it)->id();
183  stringstream layer; layer << layerId.layer();
184 
185  string digiFolder = MainFolder + "DTDigiTask/Wheel" + wheel.str();
186  string histo_name = digiFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/Occupancies/OccupancyInTimeHits_perL_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str()+ "_SL" + superLayer.str() + "_L" + layer.str();
187  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
188  if(histo){
189  found = true;
190  int pad = (sl.superlayer() - 1)*4 + layerId.layer();
191  c1.cd(pad);
192  histo->Draw();
193  }
194  }
195  }
196  if(found){
197  c1.Update();
198  psFile.NewPage();
199  }
200  }
201 
202  // Occupancy Noise
203  // Loop over all the chambers
204  vector<const DTChamber*>::const_iterator ch_digi3_it = muonGeom->chambers().begin();
205  vector<const DTChamber*>::const_iterator ch_digi3_end = muonGeom->chambers().end();
206  for (; ch_digi3_it != ch_digi3_end; ++ch_digi3_it) {
207  DTChamberId ch = (*ch_digi3_it)->id();
208  stringstream wheel; wheel << ch.wheel();
209  stringstream station; station << ch.station();
210  stringstream sector; sector << ch.sector();
211  bool found = false;
212  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_digi3_it)->superLayers().begin();
213  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_digi3_it)->superLayers().end();
214  // Loop over the SLs
215  for(; sl_it != sl_end; ++sl_it) {
216  DTSuperLayerId sl = (*sl_it)->id();
217  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
218  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
219  stringstream superLayer; superLayer << sl.superlayer();
220  // Loop over the Ls
221  for(; l_it != l_end; ++l_it) {
222  DTLayerId layerId = (*l_it)->id();
223  stringstream layer; layer << layerId.layer();
224 
225  string digiFolder = MainFolder + "DTDigiTask/Wheel" + wheel.str();
226  string histo_name = digiFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/Occupancies/OccupancyNoise_perL_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str()+ "_SL" + superLayer.str() + "_L" + layer.str();
227  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
228  if(histo){
229  found = true;
230  int pad = (sl.superlayer() - 1)*4 + layerId.layer();
231  c1.cd(pad);
232  histo->Draw();
233  }
234  }
235  }
236  if(found) {
237  c1.Update();
238  psFile.NewPage();
239  }
240  }
241 
242  // Digi Per Event
243  // Loop over all the chambers
244  vector<const DTChamber*>::const_iterator ch_digi4_it = muonGeom->chambers().begin();
245  vector<const DTChamber*>::const_iterator ch_digi4_end = muonGeom->chambers().end();
246  for (; ch_digi4_it != ch_digi4_end; ++ch_digi4_it) {
247  DTChamberId ch = (*ch_digi4_it)->id();
248  stringstream wheel; wheel << ch.wheel();
249  stringstream station; station << ch.station();
250  stringstream sector; sector << ch.sector();
251  bool found = false;
252  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_digi4_it)->superLayers().begin();
253  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_digi4_it)->superLayers().end();
254  // Loop over the SLs
255  for(; sl_it != sl_end; ++sl_it) {
256  DTSuperLayerId sl = (*sl_it)->id();
257  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
258  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
259  stringstream superLayer; superLayer << sl.superlayer();
260  // Loop over the Ls
261  for(; l_it != l_end; ++l_it) {
262  DTLayerId layerId = (*l_it)->id();
263  stringstream layer; layer << layerId.layer();
264 
265  string digiFolder = MainFolder + "DTDigiTask/Wheel" + wheel.str();
266  string histo_name = digiFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/DigiPerEvent/DigiPerEvent_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str();
267  TProfile *histo = (TProfile*) theFile -> Get(histo_name.c_str());
268  if(histo){
269  found = true;
270  int pad = (sl.superlayer() - 1)*4 + layerId.layer();
271  c1.cd(pad);
272  histo->Draw();
273  }
274  }
275  }
276  if(found){
277  c1.Update();
278  psFile.NewPage();
279  }
280  }
281  }
282 
283  // Reconstruction summary histos *********************************************************
284  if(RecoHistos){
285  // reco segment Histos - page1
286  c1.Clear();
287  c1.Divide(2,4);
288  // Loop over all the chambers
289  vector<const DTChamber*>::const_iterator ch_reco_it = muonGeom->chambers().begin();
290  vector<const DTChamber*>::const_iterator ch_reco_end = muonGeom->chambers().end();
291  for (; ch_reco_it != ch_reco_end; ++ch_reco_it) {
292  DTChamberId ch = (*ch_reco_it)->id();
293  stringstream wheel; wheel << ch.wheel();
294  stringstream station; station << ch.station();
295  stringstream sector; sector << ch.sector();
296 
297  string recoFolder = MainFolder + "DTSegmentAnalysisTask/Wheel" + wheel.str();
298  string histo_name = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/hN4DSeg_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
299  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
300  if(histo){
301  int pad = (ch.station() - 1)*2 + 1;
302  c1.cd(pad);
303  histo->Draw();
304  }
305  histo_name = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/h4DSegmXvsYInCham_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
306  TProfile *histo2 = (TProfile*) theFile -> Get(histo_name.c_str());
307  if(histo2){
308  int pad = (ch.station() - 1)*2 + 2;
309  c1.cd(pad);
310  histo2->Draw();
311  }
312  }
313  c1.Update();
314  psFile.NewPage();
315 
316  // reco segment Histos - page2
317  // Loop over all the chambers
318  vector<const DTChamber*>::const_iterator ch_reco2_it = muonGeom->chambers().begin();
319  vector<const DTChamber*>::const_iterator ch_reco2_end = muonGeom->chambers().end();
320  for (; ch_reco2_it != ch_reco2_end; ++ch_reco2_it) {
321  DTChamberId ch = (*ch_reco2_it)->id();
322  stringstream wheel; wheel << ch.wheel();
323  stringstream station; station << ch.station();
324  stringstream sector; sector << ch.sector();
325 
326  string recoFolder = MainFolder + "DTSegmentAnalysisTask/Wheel" + wheel.str();
327  string histo_name = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/h4DSegmPhiDirection_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
328  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
329  if(histo) {
330  int pad = (ch.station() - 1)*2 + 1;
331  c1.cd(pad);
332  histo->Draw();
333  }
334  histo_name = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/h4DSegmThetaDirection_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
335  TH1F *histo2 = (TH1F*) theFile -> Get(histo_name.c_str());
336  if(histo2) {
337  int pad = (ch.station() - 1)*2 + 2;
338  c1.cd(pad);
339  histo2->Draw();
340  }
341  }
342  c1.Update();
343  psFile.NewPage();
344  }
345 
346  // Resolution summary histos *******************************************************************
347  if(ResoHistos){
348  // Residuals histos
349  c1.Clear();
350  c1.Divide(3,4);
351  // Loop over all the chambers
352  vector<const DTChamber*>::const_iterator ch_reso_it = muonGeom->chambers().begin();
353  vector<const DTChamber*>::const_iterator ch_reso_end = muonGeom->chambers().end();
354  for (; ch_reso_it != ch_reso_end; ++ch_reso_it) {
355  DTChamberId ch = (*ch_reso_it)->id();
356  stringstream wheel; wheel << ch.wheel();
357  stringstream station; station << ch.station();
358  stringstream sector; sector << ch.sector();
359  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_reso_it)->superLayers().begin();
360  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_reso_it)->superLayers().end();
361  // Loop over the SLs
362  for(; sl_it != sl_end; ++sl_it) {
363  DTSuperLayerId sl = (*sl_it)->id();
364  stringstream superLayer; superLayer << sl.superlayer();
365 
366  string resoFolder = MainFolder + "DTResolutionAnalysisTask/Wheel" + wheel.str();
367  string histo_name = resoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/hResDist_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str();
368  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
369  if(histo){
370  int pad = (ch.station() - 1)*3 + sl.superlayer();
371  c1.cd(pad);
372  histo->Draw();
373  }
374  }
375  }
376  c1.Update();
377  psFile.NewPage();
378 
379  // Residuals as a function of the position Histos
380  // Loop over all the chambers
381  vector<const DTChamber*>::const_iterator ch_reso2_it = muonGeom->chambers().begin();
382  vector<const DTChamber*>::const_iterator ch_reso2_end = muonGeom->chambers().end();
383  for (; ch_reso2_it != ch_reso2_end; ++ch_reso2_it) {
384  DTChamberId ch = (*ch_reso2_it)->id();
385  stringstream wheel; wheel << ch.wheel();
386  stringstream station; station << ch.station();
387  stringstream sector; sector << ch.sector();
388  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_reso2_it)->superLayers().begin();
389  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_reso2_it)->superLayers().end();
390  // Loop over the SLs
391  for(; sl_it != sl_end; ++sl_it) {
392  DTSuperLayerId sl = (*sl_it)->id();
393  stringstream superLayer; superLayer << sl.superlayer();
394 
395  string resoFolder = MainFolder + "DTResolutionAnalysisTask/Wheel" + wheel.str();
396  string histo_name = resoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/hResDistVsDist_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str();
397  TProfile *histo = (TProfile*) theFile -> Get(histo_name.c_str());
398  if(histo){
399  int pad = (ch.station() - 1)*3 + sl.superlayer();
400  c1.cd(pad);
401  histo->Draw();
402  }
403  }
404  }
405  c1.Update();
406  psFile.NewPage();
407  }
408 
409  // Efficiency summary histos ******************************************************************
410  if(EfficiencyHistos){
411  // Cell efficiency
412  c1.Clear();
413  c1.Divide(4,3);
414  // Loop over all the chambers
415  vector<const DTChamber*>::const_iterator ch_eff_it = muonGeom->chambers().begin();
416  vector<const DTChamber*>::const_iterator ch_eff_end = muonGeom->chambers().end();
417  for (; ch_eff_it != ch_eff_end; ++ch_eff_it) {
418  DTChamberId ch = (*ch_eff_it)->id();
419  stringstream wheel; wheel << ch.wheel();
420  stringstream station; station << ch.station();
421  stringstream sector; sector << ch.sector();
422  bool found = false;
423  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_eff_it)->superLayers().begin();
424  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_eff_it)->superLayers().end();
425  // Loop over the SLs
426  for(; sl_it != sl_end; ++sl_it) {
427  DTSuperLayerId sl = (*sl_it)->id();
428  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
429  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
430  stringstream superLayer; superLayer << sl.superlayer();
431  // Loop over the Ls
432  for(; l_it != l_end; ++l_it) {
433  DTLayerId layerId = (*l_it)->id();
434  stringstream layer; layer << layerId.layer();
435 
436  string efficiencyFolder = MainFolder + "Tests/DTEfficiency/Wheel" + wheel.str();
437  string histo_name = efficiencyFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/UnassEfficiency_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str();
438  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
439  if(histo){
440  found = true;
441  int pad = (sl.superlayer() - 1)*4 + layerId.layer();
442  c1.cd(pad);
443  histo->Draw();
444  }
445  }
446  }
447  if(found){
448  c1.Update();
449  psFile.NewPage();
450  }
451  }
452 
453  // Chamber X efficiency
454  c1.Clear();
455  c1.Divide(2,2);
456  // Loop over all the chambers
457  vector<const DTChamber*>::const_iterator ch_eff2_it = muonGeom->chambers().begin();
458  vector<const DTChamber*>::const_iterator ch_eff2_end = muonGeom->chambers().end();
459  for (; ch_eff2_it != ch_eff2_end; ++ch_eff2_it) {
460  DTChamberId ch = (*ch_eff2_it)->id();
461  stringstream wheel; wheel << ch.wheel();
462  stringstream station; station << ch.station();
463  stringstream sector; sector << ch.sector();
464 
465  string efficiencyFolder = MainFolder + "Tests/DTChamberEfficiency/Wheel" + wheel.str();
466  string histo_name = efficiencyFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/xEfficiency_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
467  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
468  if(histo){
469  c1.cd(ch.station());
470  histo->Draw();
471  }
472  }
473  c1.Update();
474  psFile.NewPage();
475 
476  // Chamber Y efficiency
477  // Loop over all the chambers
478  vector<const DTChamber*>::const_iterator ch_eff3_it = muonGeom->chambers().begin();
479  vector<const DTChamber*>::const_iterator ch_eff3_end = muonGeom->chambers().end();
480  for (; ch_eff3_it != ch_eff3_end; ++ch_eff3_it) {
481  DTChamberId ch = (*ch_eff3_it)->id();
482  stringstream wheel; wheel << ch.wheel();
483  stringstream station; station << ch.station();
484  stringstream sector; sector << ch.sector();
485 
486  string efficiencyFolder = MainFolder + "Tests/DTChamberEfficiency/Wheel" + wheel.str();
487  string histo_name = efficiencyFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/yEfficiency_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
488  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
489  if(histo){
490  c1.cd(ch.station());
491  histo->Draw();
492  }
493  }
494  c1.Update();
495  psFile.NewPage();
496  }
497 
498  // Test Pulses Summary Histos **************************************************************
499  if(TestPulsesHistos){
500  c1.Clear();
501  c1.Divide(4,3);
502  // Loop over all the chambers
503  vector<const DTChamber*>::const_iterator ch_TP_it = muonGeom->chambers().begin();
504  vector<const DTChamber*>::const_iterator ch_TP_end = muonGeom->chambers().end();
505  for (; ch_TP_it != ch_TP_end; ++ch_TP_it) {
506  DTChamberId ch = (*ch_TP_it)->id();
507  stringstream wheel; wheel << ch.wheel();
508  stringstream station; station << ch.station();
509  stringstream sector; sector << ch.sector();
510  bool found = false;
511  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_TP_it)->superLayers().begin();
512  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_TP_it)->superLayers().end();
513  // Loop over the SLs
514  for(; sl_it != sl_end; ++sl_it) {
515  DTSuperLayerId sl = (*sl_it)->id();
516  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
517  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
518  stringstream superLayer; superLayer << sl.superlayer();
519  // Loop over the Ls
520  for(; l_it != l_end; ++l_it) {
521  DTLayerId layerId = (*l_it)->id();
522  stringstream layer; layer << layerId.layer();
523 
524  string testPulsesFolder = MainFolder + "DTTestPulsesTask/Wheel" + wheel.str();
525  string histo_name = testPulsesFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/SuperLayer" + superLayer.str() + "/TPProfile/TestPulses2D_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str();
526  TProfile *histo = (TProfile*) theFile -> Get(histo_name.c_str());
527  if(histo){
528  found = true;
529  int pad = (sl.superlayer() - 1)*4 + layerId.layer();
530  c1.cd(pad);
531  histo->Draw();
532  }
533  }
534  }
535  if(found){
536  c1.Update();
537  psFile.NewPage();
538  }
539  }
540  }
541 
542  // Trigger Summary Histos ************************************************************************
543  if(TriggerHistos){
544  c1.Clear();
545  c1.Divide(2,2);
546  // Loop over all the chambers
547  vector<const DTChamber*>::const_iterator ch_trigger_it = muonGeom->chambers().begin();
548  vector<const DTChamber*>::const_iterator ch_trigger_end = muonGeom->chambers().end();
549  for (; ch_trigger_it != ch_trigger_end; ++ch_trigger_it) {
550  DTChamberId ch = (*ch_trigger_it)->id();
551  stringstream wheel; wheel << ch.wheel();
552  stringstream station; station << ch.station();
553  stringstream sector; sector << ch.sector();
554 
555  string triggerFolder = MainFolder + "DTLocalTriggerTask/Wheel" + wheel.str();
556  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/LocalTriggerPhi/DDU_BXvsQual_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
557  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
558  if(histo){
559  c1.cd(ch.station());
560  histo->Draw();
561  }
562  }
563  c1.Update();
564  psFile.NewPage();
565 
566  // Loop over all the chambers
567  vector<const DTChamber*>::const_iterator ch_trigger2_it = muonGeom->chambers().begin();
568  vector<const DTChamber*>::const_iterator ch_trigger2_end = muonGeom->chambers().end();
569  for (; ch_trigger2_it != ch_trigger2_end; ++ch_trigger2_it) {
570  DTChamberId ch = (*ch_trigger2_it)->id();
571  stringstream wheel; wheel << ch.wheel();
572  stringstream station; station << ch.station();
573  stringstream sector; sector << ch.sector();
574 
575  string triggerFolder = MainFolder + "DTLocalTriggerTask/Wheel" + wheel.str();
576  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/LocalTriggerTheta/DDU_ThetaBXvsQual_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
577  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
578  if(histo){
579  c1.cd(ch.station());
580  histo->Draw();
581  }
582  }
583  c1.Update();
584  psFile.NewPage();
585 
586  c1.Clear();
587  c1.Divide(1,2);
588  int counter1=0,counter2=0;
589  // Loop over all the chambers
590  vector<const DTChamber*>::const_iterator ch_trigger3_it = muonGeom->chambers().begin();
591  vector<const DTChamber*>::const_iterator ch_trigger3_end = muonGeom->chambers().end();
592  for (; ch_trigger3_it != ch_trigger3_end; ++ch_trigger3_it) {
593  DTChamberId ch = (*ch_trigger3_it)->id();
594  stringstream wheel; wheel << ch.wheel();
595  stringstream sector; sector << ch.sector();
596 
597  string triggerFolder = MainFolder + "Tests/DTLocalTrigger/Wheel" + wheel.str();
598  string histo_Name = triggerFolder + "/Sector" + sector.str() + "/LocalTriggerPhi/CorrFraction_Phi_W" + wheel.str() + "_Sec" + sector.str();
599  TH1F *Histo1 = (TH1F*) theFile -> Get(histo_Name.c_str());
600  if(Histo1 && counter1==0){
601  counter1++;
602  c1.cd(1);
603  Histo1->Draw();
604  }
605  histo_Name = triggerFolder + "/Sector" + sector.str() + "/LocalTriggerTheta/HFraction_Theta_W" + wheel.str() + "_Sec" + sector.str();
606  TH1F *Histo2 = (TH1F*) theFile -> Get(histo_Name.c_str());
607  if(Histo2 && counter2==0){
608  counter2++;
609  c1.cd(2);
610  Histo2->Draw();
611  }
612  }
613  c1.Update();
614  psFile.NewPage();
615 
616  c1.Clear();
617  c1.Divide(2,2);
618  // Loop over all the chambers
619  vector<const DTChamber*>::const_iterator ch_trigger4_it = muonGeom->chambers().begin();
620  vector<const DTChamber*>::const_iterator ch_trigger4_end = muonGeom->chambers().end();
621  for (; ch_trigger4_it != ch_trigger4_end; ++ch_trigger4_it) {
622  DTChamberId ch = (*ch_trigger4_it)->id();
623  stringstream wheel; wheel << ch.wheel();
624  stringstream station; station << ch.station();
625  stringstream sector; sector << ch.sector();
626 
627  string triggerFolder = MainFolder + "Tests/DTLocalTrigger/Wheel" + wheel.str();
628  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/TrigEffPos_Phi_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
629  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
630  string histo_nameHHHL = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/TrigEffPosHHHL_Phi_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
631  TH1F *histoHHHL = (TH1F*) theFile -> Get(histo_nameHHHL.c_str());
632  if(histo){
633  c1.cd(ch.station());
634  histo->GetYaxis()->SetRangeUser(0,1.1);
635  histo->Draw();
636  if(histoHHHL){
637  histoHHHL->Draw("same");
638  }
639  }
640  }
641  c1.Update();
642  psFile.NewPage();
643 
644  c1.Clear();
645  c1.Divide(2,2);
646  // Loop over all the chambers
647  vector<const DTChamber*>::const_iterator ch_trigger5_it = muonGeom->chambers().begin();
648  vector<const DTChamber*>::const_iterator ch_trigger5_end = muonGeom->chambers().end();
649  for (; ch_trigger5_it != ch_trigger5_end; ++ch_trigger5_it) {
650  DTChamberId ch = (*ch_trigger5_it)->id();
651  stringstream wheel; wheel << ch.wheel();
652  stringstream station; station << ch.station();
653  stringstream sector; sector << ch.sector();
654 
655  string triggerFolder = MainFolder + "Tests/DTLocalTrigger/Wheel" + wheel.str();
656  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/TrigEffAngle_Phi_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
657  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
658  if(histo){
659  c1.cd(ch.station());
660  histo->GetYaxis()->SetRangeUser(0,1.1);
661  histo->Draw();
662  }
663  }
664  c1.Update();
665  psFile.NewPage();
666 
667  c1.Clear();
668  c1.Divide(2,2);
669  // Loop over all the chambers
670  vector<const DTChamber*>::const_iterator ch_trigger6_it = muonGeom->chambers().begin();
671  vector<const DTChamber*>::const_iterator ch_trigger6_end = muonGeom->chambers().end();
672  for (; ch_trigger6_it != ch_trigger6_end; ++ch_trigger6_it) {
673  DTChamberId ch = (*ch_trigger6_it)->id();
674  stringstream wheel; wheel << ch.wheel();
675  stringstream station; station << ch.station();
676  stringstream sector; sector << ch.sector();
677 
678  string triggerFolder = MainFolder + "Tests/DTLocalTrigger/Wheel" + wheel.str();
679  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/TrigEffPos_Theta_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
680  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
681  if(histo){
682  c1.cd(ch.station());
683  histo->GetYaxis()->SetRangeUser(0,1.1);
684  histo->Draw();
685  }
686  }
687  c1.Update();
688  psFile.NewPage();
689 
690  c1.Clear();
691  c1.Divide(2,2);
692  // Loop over all the chambers
693  vector<const DTChamber*>::const_iterator ch_trigger7_it = muonGeom->chambers().begin();
694  vector<const DTChamber*>::const_iterator ch_trigger7_end = muonGeom->chambers().end();
695  for (; ch_trigger7_it != ch_trigger7_end; ++ch_trigger7_it) {
696  DTChamberId ch = (*ch_trigger7_it)->id();
697  stringstream wheel; wheel << ch.wheel();
698  stringstream station; station << ch.station();
699  stringstream sector; sector << ch.sector();
700 
701  string triggerFolder = MainFolder + "Tests/DTLocalTrigger/Wheel" + wheel.str();
702  string histo_name = triggerFolder + "/Sector" + sector.str() + "/Station" + station.str() + "/TrigEffAngle_Theta_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
703  TH1F *histo = (TH1F*) theFile -> Get(histo_name.c_str());
704  if(histo){
705  histo->GetYaxis()->SetRangeUser(0,1.1);
706  c1.cd(ch.station());
707  histo->Draw();
708  }
709  }
710  c1.Update();
711  }
712  psFile.Close();
713 }
edm::ESHandle< DTGeometry > muonGeom
int layer() const
Return the layer number.
Definition: DTLayerId.h:53
int superlayer() const
Return the superlayer number (deprecated method name)
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45

Member Data Documentation

bool DTCreateSummaryHistos::DataIntegrityHistos
private

Definition at line 74 of file DTCreateSummaryHistos.h.

int DTCreateSummaryHistos::DDUId
private

Definition at line 83 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::DigiHistos
private

Definition at line 75 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::EfficiencyHistos
private

Definition at line 78 of file DTCreateSummaryHistos.h.

std::string DTCreateSummaryHistos::MainFolder
private

Definition at line 61 of file DTCreateSummaryHistos.h.

edm::ESHandle<DTGeometry> DTCreateSummaryHistos::muonGeom
private

Definition at line 64 of file DTCreateSummaryHistos.h.

int DTCreateSummaryHistos::nevents
private

Definition at line 60 of file DTCreateSummaryHistos.h.

edm::ParameterSet DTCreateSummaryHistos::parameters
private
TPostScript* DTCreateSummaryHistos::psFile
private

Definition at line 70 of file DTCreateSummaryHistos.h.

std::string DTCreateSummaryHistos::PsFileName
private

Definition at line 71 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::RecoHistos
private

Definition at line 76 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::ResoHistos
private

Definition at line 77 of file DTCreateSummaryHistos.h.

int DTCreateSummaryHistos::runNumber
private

Definition at line 85 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::TestPulsesHistos
private

Definition at line 79 of file DTCreateSummaryHistos.h.

TFile* DTCreateSummaryHistos::theFile
private

Definition at line 67 of file DTCreateSummaryHistos.h.

bool DTCreateSummaryHistos::TriggerHistos
private

Definition at line 80 of file DTCreateSummaryHistos.h.