CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuonAlignmentSummary Class Reference

#include <MuonAlignmentSummary.h>

Inheritance diagram for MuonAlignmentSummary:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 MuonAlignmentSummary (const edm::ParameterSet &)
 Constructor. More...
 
 ~MuonAlignmentSummary () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool doCSC
 
bool doDT
 
MonitorElementhLocalAngleCSC
 
MonitorElementhLocalAngleDT
 
MonitorElementhLocalAngleRmsCSC
 
MonitorElementhLocalAngleRmsDT
 
MonitorElementhLocalPhiMeanCSC
 
MonitorElementhLocalPhiMeanDT
 
MonitorElementhLocalPhiRmsCSC
 
MonitorElementhLocalPhiRmsDT
 
MonitorElementhLocalPositionCSC
 
MonitorElementhLocalPositionDT
 
MonitorElementhLocalPositionRmsCSC
 
MonitorElementhLocalPositionRmsDT
 
MonitorElementhLocalThetaMeanCSC
 
MonitorElementhLocalThetaMeanDT
 
MonitorElementhLocalThetaRmsCSC
 
MonitorElementhLocalThetaRmsDT
 
MonitorElementhLocalXMeanCSC
 
MonitorElementhLocalXMeanDT
 
MonitorElementhLocalXRmsCSC
 
MonitorElementhLocalXRmsDT
 
MonitorElementhLocalYMeanCSC
 
MonitorElementhLocalYMeanDT
 
MonitorElementhLocalYRmsCSC
 
MonitorElementhLocalYRmsDT
 
double meanAngleRange
 
double meanPositionRange
 
std::string MEFolderName
 
std::string metname
 
edm::ParameterSet parameters
 
double rmsAngleRange
 
double rmsPositionRange
 
std::stringstream topFolder
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

DQM client for muon alignment summary

Author
J. Fernandez - Univ. Oviedo Javie.nosp@m.r.Fe.nosp@m.rnand.nosp@m.ez@c.nosp@m.ern.c.nosp@m.h

Definition at line 34 of file MuonAlignmentSummary.h.

Constructor & Destructor Documentation

MuonAlignmentSummary::MuonAlignmentSummary ( const edm::ParameterSet pSet)

Constructor.

Definition at line 9 of file MuonAlignmentSummary.cc.

References doCSC, doDT, cmsRelvalreport::exit, meanAngleRange, meanPositionRange, MEFolderName, rmsAngleRange, rmsPositionRange, AlCaHLTBitMon_QueryRunRegistry::string, and topFolder.

9  {
10  parameters = pSet;
11 
12  meanPositionRange = parameters.getUntrackedParameter<double>("meanPositionRange");
13  rmsPositionRange = parameters.getUntrackedParameter<double>("rmsPositionRange");
14  meanAngleRange = parameters.getUntrackedParameter<double>("meanAngleRange");
15  rmsAngleRange = parameters.getUntrackedParameter<double>("rmsAngleRange");
16 
17  doDT = parameters.getUntrackedParameter<bool>("doDT");
18  doCSC = parameters.getUntrackedParameter<bool>("doCSC");
19 
20  MEFolderName = parameters.getParameter<std::string>("FolderName");
21  topFolder << MEFolderName + "Alignment/Muon";
22 
23  if (!(doDT || doCSC)) {
24  edm::LogError("MuonAlignmentSummary") << " Error!! At least one Muon subsystem (DT or CSC) must be "
25  "monitorized!!"
26  << std::endl;
27  edm::LogError("MuonAlignmentSummary")
28  << " Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
29  exit(1);
30  }
31 }
std::stringstream topFolder
MuonAlignmentSummary::~MuonAlignmentSummary ( )
override

Destructor.

Definition at line 33 of file MuonAlignmentSummary.cc.

33 {}

Member Function Documentation

void MuonAlignmentSummary::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 35 of file MuonAlignmentSummary.cc.

References funct::abs(), DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), relativeConstraints::chamber, doCSC, doDT, MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getEntries(), MonitorElement::getMean(), MonitorElement::getMeanError(), trackerHits::histo, hLocalAngleCSC, hLocalAngleDT, hLocalAngleRmsCSC, hLocalAngleRmsDT, hLocalPhiMeanCSC, hLocalPhiMeanDT, hLocalPhiRmsCSC, hLocalPhiRmsDT, hLocalPositionCSC, hLocalPositionDT, hLocalPositionRmsCSC, hLocalPositionRmsDT, hLocalThetaMeanCSC, hLocalThetaMeanDT, hLocalThetaRmsCSC, hLocalThetaRmsDT, hLocalXMeanCSC, hLocalXMeanDT, hLocalXRmsCSC, hLocalXRmsDT, hLocalYMeanCSC, hLocalYMeanDT, hLocalYRmsCSC, hLocalYRmsDT, phase1PixelTopology::localX(), phase1PixelTopology::localY(), LogTrace, Mean, meanAngleRange, meanPositionRange, metname, callgraph::path, MonitorElement::Reset(), relativeConstraints::ring, rmsAngleRange, rmsPositionRange, MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, topFolder, and makeMuonMisalignmentScenario::wheel.

35  {
36  metname = "MuonAlignmentSummary";
37 
38  LogTrace(metname) << "[MuonAlignmentSummary] Parameters initialization";
39 
40  if (doDT) {
41  ibooker.setCurrentFolder(topFolder.str() + "/DT");
42  hLocalPositionDT = ibooker.book2D(
43  "hLocalPositionDT", "Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
44 
45  hLocalAngleDT = ibooker.book2D(
46  "hLocalAngleDT", "Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
47 
49  ibooker.book2D("hLocalPositionRmsDT", "Local DT position (cm) RMS residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
50 
52  ibooker.book2D("hLocalAngleRmsDT", "Local DT angle (rad) RMS residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
53 
54  hLocalXMeanDT = ibooker.book1D("hLocalXMeanDT",
55  "Distribution of absolute MEAN Local X (cm) residuals "
56  "for DT;<X> (cm);number of chambers",
57  100,
58  0,
60 
61  hLocalXRmsDT = ibooker.book1D("hLocalXRmsDT",
62  "Distribution of RMS Local X (cm) residuals "
63  "for DT;X RMS (cm);number of chambers",
64  100,
65  0,
67 
68  hLocalYMeanDT = ibooker.book1D("hLocalYMeanDT",
69  "Distribution of absolute MEAN Local Y (cm) residuals "
70  "for DT;<Y> (cm);number of chambers",
71  100,
72  0,
74 
75  hLocalYRmsDT = ibooker.book1D("hLocalYRmsDT",
76  "Distribution of RMS Local Y (cm) residuals "
77  "for DT;Y RMS (cm);number of chambers",
78  100,
79  0,
81 
82  hLocalPhiMeanDT = ibooker.book1D("hLocalPhiMeanDT",
83  "Distribution of absolute MEAN #phi (rad) residuals for "
84  "DT;<#phi>(rad);number of chambers",
85  100,
86  0,
88 
89  hLocalPhiRmsDT = ibooker.book1D("hLocalPhiRmsDT",
90  "Distribution of RMS #phi (rad) residuals "
91  "for DT;#phi RMS (rad);number of chambers",
92  100,
93  0,
95 
96  hLocalThetaMeanDT = ibooker.book1D("hLocalThetaMeanDT",
97  "Distribution of absolute MEAN #theta (rad) residuals "
98  "for DT;<#theta>(rad);number of chambers",
99  100,
100  0,
102 
103  hLocalThetaRmsDT = ibooker.book1D("hLocalThetaRmsDT",
104  "Distribution of RMS #theta (rad) residuals for "
105  "DT;#theta RMS (rad);number of chambers",
106  100,
107  0,
108  rmsAngleRange);
109 
111  hLocalAngleDT->Reset();
114  hLocalXMeanDT->Reset();
115  hLocalXRmsDT->Reset();
116  hLocalYMeanDT->Reset();
117  hLocalYRmsDT->Reset();
122  }
123 
124  if (doCSC) {
125  ibooker.setCurrentFolder(topFolder.str() + "/CSC");
126  hLocalPositionCSC = ibooker.book2D(
127  "hLocalPositionCSC", "Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
128 
129  hLocalAngleCSC = ibooker.book2D(
130  "hLocalAngleCSC", "Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
131 
132  hLocalPositionRmsCSC = ibooker.book2D(
133  "hLocalPositionRmsCSC", "Local CSC position (cm) RMS residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
134 
136  ibooker.book2D("hLocalAngleRmsCSC", "Local CSC angle (rad) RMS residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
137 
138  hLocalXMeanCSC = ibooker.book1D("hLocalXMeanCSC",
139  "Distribution of absolute MEAN Local X (cm) residuals "
140  "for CSC;<X> (cm);number of chambers",
141  100,
142  0,
144 
145  hLocalXRmsCSC = ibooker.book1D("hLocalXRmsCSC",
146  "Distribution of RMS Local X (cm) residuals "
147  "for CSC;X RMS (cm);number of chambers",
148  100,
149  0,
151 
152  hLocalYMeanCSC = ibooker.book1D("hLocalYMeanCSC",
153  "Distribution of absolute MEAN Local Y (cm) residuals "
154  "for CSC;<Y> (cm);number of chambers",
155  100,
156  0,
158 
159  hLocalYRmsCSC = ibooker.book1D("hLocalYRmsCSC",
160  "Distribution of RMS Local Y (cm) residuals "
161  "for CSC;Y RMS (cm);number of chambers",
162  100,
163  0,
165 
166  hLocalPhiMeanCSC = ibooker.book1D("hLocalPhiMeanCSC",
167  "Distribution of absolute MEAN #phi (rad) residuals for "
168  "CSC;<#phi>(rad);number of chambers",
169  100,
170  0,
172 
173  hLocalPhiRmsCSC = ibooker.book1D("hLocalPhiRmsCSC",
174  "Distribution of RMS #phi (rad) residuals for CSC;#phi "
175  "RMS (rad);number of chambers",
176  100,
177  0,
178  rmsAngleRange);
179 
180  hLocalThetaMeanCSC = ibooker.book1D("hLocalThetaMeanCSC",
181  "Distribution of absolute MEAN #theta (rad) residuals "
182  "for CSC;<#theta>(rad);number of chambers",
183  100,
184  0,
186 
187  hLocalThetaRmsCSC = ibooker.book1D("hLocalThetaRmsCSC",
188  "Distribution of RMS #theta (rad) residuals for "
189  "CSC;#theta RMS (rad);number of chambers",
190  100,
191  0,
192  rmsAngleRange);
193 
199  hLocalXRmsCSC->Reset();
201  hLocalYRmsCSC->Reset();
206  }
207 
208  LogTrace(metname) << "[MuonAlignmentSummary] Saving the histos";
209 
210  char binLabel[40];
211 
212  for (int station = -4; station < 5; station++) {
213  if (doDT) {
214  if (station > 0) {
215  for (int wheel = -2; wheel < 3; wheel++) {
216  for (int sector = 1; sector < 15; sector++) {
217  if (!((sector == 13 || sector == 14) && station != 4)) {
218  std::stringstream Wheel;
219  Wheel << wheel;
220  std::stringstream Station;
221  Station << station;
222  std::stringstream Sector;
223  Sector << sector;
224 
225  std::string nameOfHistoLocalX =
226  "ResidualLocalX_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
227  std::string nameOfHistoLocalPhi =
228  "ResidualLocalPhi_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
229  std::string nameOfHistoLocalTheta =
230  "ResidualLocalTheta_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
231  std::string nameOfHistoLocalY =
232  "ResidualLocalY_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
233 
234  std::string path = topFolder.str() + "/DT/Wheel" + Wheel.str() + "/Station" + Station.str() + "/Sector" +
235  Sector.str() + "/";
236 
237  std::string histo = path + nameOfHistoLocalX;
238 
239  Int_t nstation = station - 1;
240  Int_t nwheel = wheel + 2;
241  MonitorElement *localX = igetter.get(histo);
242  if (localX) {
243  Double_t Mean = localX->getMean();
244  Double_t Error = localX->getMeanError();
245 
246  Int_t ybin = 1 + nwheel * 8 + nstation * 2;
247  hLocalPositionDT->setBinContent(sector, ybin, fabs(Mean));
248  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_X", wheel, station);
249  hLocalPositionDT->setBinLabel(ybin, binLabel, 2);
250  hLocalPositionRmsDT->setBinContent(sector, ybin, Error);
251  hLocalPositionRmsDT->setBinLabel(ybin, binLabel, 2);
252 
253  if (localX->getEntries() != 0) {
254  hLocalXMeanDT->Fill(fabs(Mean));
255  hLocalXRmsDT->Fill(Error);
256  }
257  }
258 
259  histo = path + nameOfHistoLocalPhi;
260  MonitorElement *localPhi = igetter.get(histo);
261  if (localPhi) {
262  Double_t Mean = localPhi->getMean();
263  Double_t Error = localPhi->getMeanError();
264 
265  Int_t ybin = 1 + nwheel * 8 + nstation * 2;
266  hLocalAngleDT->setBinContent(sector, ybin, fabs(Mean));
267  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#phi", wheel, station);
268  hLocalAngleDT->setBinLabel(ybin, binLabel, 2);
269  hLocalAngleRmsDT->setBinContent(sector, ybin, Error);
270  hLocalAngleRmsDT->setBinLabel(ybin, binLabel, 2);
271 
272  if (localPhi->getEntries() != 0) {
273  hLocalPhiMeanDT->Fill(fabs(Mean));
274  hLocalPhiRmsDT->Fill(Error);
275  }
276  }
277 
278  if (station != 4) {
279  histo = path + nameOfHistoLocalY;
280  MonitorElement *localY = igetter.get(histo);
281  if (localY) {
282  Double_t Mean = localY->getMean();
283  Double_t Error = localY->getMeanError();
284 
285  Int_t ybin = 2 + nwheel * 8 + nstation * 2;
286  hLocalPositionDT->setBinContent(sector, ybin, fabs(Mean));
287  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_Y", wheel, station);
288  hLocalPositionDT->setBinLabel(ybin, binLabel, 2);
289  hLocalPositionRmsDT->setBinContent(sector, ybin, Error);
290  hLocalPositionRmsDT->setBinLabel(ybin, binLabel, 2);
291  if (localY->getEntries() != 0) {
292  hLocalYMeanDT->Fill(fabs(Mean));
293  hLocalYRmsDT->Fill(Error);
294  }
295  }
296  histo = path + nameOfHistoLocalTheta;
297  MonitorElement *localTheta = igetter.get(histo);
298  if (localTheta) {
299  Double_t Mean = localTheta->getMean();
300  Double_t Error = localTheta->getMeanError();
301 
302  Int_t ybin = 2 + nwheel * 8 + nstation * 2;
303  hLocalAngleDT->setBinContent(sector, ybin, fabs(Mean));
304  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#theta", wheel, station);
305  hLocalAngleDT->setBinLabel(ybin, binLabel, 2);
306  hLocalAngleRmsDT->setBinContent(sector, ybin, Error);
307  hLocalAngleRmsDT->setBinLabel(ybin, binLabel, 2);
308  if (localTheta->getEntries() != 0) {
309  hLocalThetaMeanDT->Fill(fabs(Mean));
310  hLocalThetaRmsDT->Fill(Error);
311  }
312  }
313  } // station != 4
314  } // avoid non existing sectors
315  } // sector
316  } // wheel
317  } // station>0
318  } // doDT
319 
320  if (doCSC) {
321  if (station != 0) {
322  for (int ring = 1; ring < 5; ring++) {
323  for (int chamber = 1; chamber < 37; chamber++) {
324  if (!(((abs(station) == 2 || abs(station) == 3 || abs(station) == 4) && ring == 1 && chamber > 18) ||
325  ((abs(station) == 2 || abs(station) == 3 || abs(station) == 4) && ring > 2))) {
326  std::stringstream Ring;
327  Ring << ring;
328  std::stringstream Station;
329  Station << station;
330  std::stringstream Chamber;
331  Chamber << chamber;
332 
333  std::string nameOfHistoLocalX =
334  "ResidualLocalX_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
335  std::string nameOfHistoLocalPhi =
336  "ResidualLocalPhi_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
337  std::string nameOfHistoLocalTheta =
338  "ResidualLocalTheta_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
339  std::string nameOfHistoLocalY =
340  "ResidualLocalY_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
341 
342  std::string path = topFolder.str() + "/CSC/Station" + Station.str() + "/Ring" + Ring.str() + "/Chamber" +
343  Chamber.str() + "/";
344 
345  Int_t ybin = abs(station) * 2 + ring;
346  if (abs(station) == 1)
347  ybin = ring;
348  if (station > 0)
349  ybin = ybin + 10;
350  else
351  ybin = 11 - ybin;
352  std::string histo = path + nameOfHistoLocalX;
353  MonitorElement *localX = igetter.get(histo);
354  if (localX) {
355  Double_t Mean = localX->getMean();
356  Double_t Error = localX->getMeanError();
357 
358  Int_t ybin2 = 2 * ybin - 1;
359  hLocalPositionCSC->setBinContent(chamber, ybin2, fabs(Mean));
360  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_X", station, ring);
361  hLocalPositionCSC->setBinLabel(ybin2, binLabel, 2);
362  hLocalPositionRmsCSC->setBinContent(chamber, ybin2, Error);
363  hLocalPositionRmsCSC->setBinLabel(ybin2, binLabel, 2);
364  if (localX->getEntries() != 0) {
365  hLocalXMeanCSC->Fill(fabs(Mean));
366  hLocalXRmsCSC->Fill(Error);
367  }
368  }
369  histo = path + nameOfHistoLocalPhi;
370 
371  MonitorElement *localPhi = igetter.get(histo);
372  if (localPhi) {
373  Double_t Mean = localPhi->getMean();
374  Double_t Error = localPhi->getMeanError();
375 
376  Int_t ybin2 = 2 * ybin - 1;
377  hLocalAngleCSC->setBinContent(chamber, ybin2, fabs(Mean));
378  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#phi", station, ring);
379  hLocalAngleCSC->setBinLabel(ybin2, binLabel, 2);
380  hLocalAngleRmsCSC->setBinContent(chamber, ybin2, Error);
381  hLocalAngleRmsCSC->setBinLabel(ybin2, binLabel, 2);
382  if (localPhi->getEntries() != 0) {
383  hLocalPhiMeanCSC->Fill(fabs(Mean));
384  hLocalPhiRmsCSC->Fill(Error);
385  }
386  }
387  histo = path + nameOfHistoLocalTheta;
388  MonitorElement *localTheta = igetter.get(histo);
389  if (localTheta) {
390  Double_t Mean = localTheta->getMean();
391  Double_t Error = localTheta->getMeanError();
392 
393  Int_t ybin2 = 2 * ybin;
394  hLocalAngleCSC->setBinContent(chamber, ybin2, fabs(Mean));
395  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#theta", station, ring);
396  hLocalAngleCSC->setBinLabel(ybin2, binLabel, 2);
397  hLocalAngleRmsCSC->setBinContent(chamber, ybin2, Error);
398  hLocalAngleRmsCSC->setBinLabel(ybin2, binLabel, 2);
399  if (localTheta->getEntries() != 0) {
400  hLocalThetaMeanCSC->Fill(fabs(Mean));
401  hLocalThetaRmsCSC->Fill(Error);
402  }
403  }
404  histo = path + nameOfHistoLocalY;
405 
406  MonitorElement *localY = igetter.get(histo);
407  if (localY) {
408  Double_t Mean = localY->getMean();
409  Double_t Error = localY->getMeanError();
410 
411  Int_t ybin2 = 2 * ybin;
412  hLocalPositionCSC->setBinContent(chamber, ybin2, fabs(Mean));
413  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_Y", station, ring);
414  hLocalPositionCSC->setBinLabel(ybin2, binLabel, 2);
415  hLocalPositionRmsCSC->setBinContent(chamber, ybin2, Error);
416  hLocalPositionRmsCSC->setBinLabel(ybin2, binLabel, 2);
417  if (localY->getEntries() != 0) {
418  hLocalYMeanCSC->Fill(fabs(Mean));
419  hLocalYRmsCSC->Fill(Error);
420  }
421  }
422  } // avoid non existing rings
423  } // chamber
424  } // ring
425  } // station!=0
426  } // doCSC
427  } // loop on stations
428 }
edm::ErrorSummaryEntry Error
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hLocalPositionRmsDT
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hLocalAngleRmsDT
constexpr uint16_t localY(uint16_t py)
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
double getMeanError(int axis=1) const
void Fill(long long x)
MonitorElement * hLocalYRmsDT
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * hLocalPositionRmsCSC
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * hLocalThetaRmsDT
MonitorElement * hLocalAngleRmsCSC
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalYRmsCSC
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * hLocalThetaRmsCSC
#define LogTrace(id)
MonitorElement * hLocalXMeanCSC
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
MonitorElement * hLocalXRmsCSC
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalPhiRmsDT
MonitorElement * hLocalYMeanCSC
MonitorElement * hLocalThetaMeanDT
double getEntries() const
get # of entries
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
constexpr uint16_t localX(uint16_t px)
MonitorElement * hLocalPhiMeanDT
MonitorElement * hLocalAngleCSC
MonitorElement * hLocalPhiRmsCSC
MonitorElement * hLocalPositionDT
MonitorElement * hLocalXRmsDT
std::stringstream topFolder
MonitorElement * hLocalYMeanDT
MonitorElement * hLocalXMeanDT
MonitorElement * hLocalPositionCSC
MonitorElement * hLocalAngleDT

Member Data Documentation

bool MuonAlignmentSummary::doCSC
private

Definition at line 86 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

bool MuonAlignmentSummary::doDT
private

Definition at line 86 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

MonitorElement* MuonAlignmentSummary::hLocalAngleCSC
private

Definition at line 65 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalAngleDT
private

Definition at line 51 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalAngleRmsCSC
private

Definition at line 66 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalAngleRmsDT
private

Definition at line 52 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPhiMeanCSC
private

Definition at line 72 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPhiMeanDT
private

Definition at line 58 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPhiRmsCSC
private

Definition at line 73 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPhiRmsDT
private

Definition at line 59 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPositionCSC
private

Definition at line 63 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPositionDT
private

Definition at line 49 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPositionRmsCSC
private

Definition at line 64 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalPositionRmsDT
private

Definition at line 50 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalThetaMeanCSC
private

Definition at line 74 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalThetaMeanDT
private

Definition at line 60 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalThetaRmsCSC
private

Definition at line 75 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalThetaRmsDT
private

Definition at line 61 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalXMeanCSC
private

Definition at line 68 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalXMeanDT
private

Definition at line 54 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalXRmsCSC
private

Definition at line 69 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalXRmsDT
private

Definition at line 55 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalYMeanCSC
private

Definition at line 70 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalYMeanDT
private

Definition at line 56 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalYRmsCSC
private

Definition at line 71 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

MonitorElement* MuonAlignmentSummary::hLocalYRmsDT
private

Definition at line 57 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

double MuonAlignmentSummary::meanAngleRange
private

Definition at line 83 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

double MuonAlignmentSummary::meanPositionRange
private

Definition at line 83 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

std::string MuonAlignmentSummary::MEFolderName
private

Definition at line 89 of file MuonAlignmentSummary.h.

Referenced by MuonAlignmentSummary().

std::string MuonAlignmentSummary::metname
private

Definition at line 80 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob().

edm::ParameterSet MuonAlignmentSummary::parameters
private
double MuonAlignmentSummary::rmsAngleRange
private

Definition at line 83 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

double MuonAlignmentSummary::rmsPositionRange
private

Definition at line 83 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().

std::stringstream MuonAlignmentSummary::topFolder
private

Definition at line 90 of file MuonAlignmentSummary.h.

Referenced by dqmEndJob(), and MuonAlignmentSummary().