CMS 3D CMS Logo

DTRecHitClients.cc
Go to the documentation of this file.
4 
5 #include "DTRecHitClients.h"
6 #include "Histograms.h"
7 
8 using namespace std;
9 using namespace edm;
10 
12  // Switches for analysis at various steps
13  doStep1_ = pset.getUntrackedParameter<bool>("doStep1", false);
14  doStep2_ = pset.getUntrackedParameter<bool>("doStep2", false);
15  doStep3_ = pset.getUntrackedParameter<bool>("doStep3", false);
16  doall_ = pset.getUntrackedParameter<bool>("doall", false);
17  local_ = pset.getUntrackedParameter<bool>("local", true);
18 }
19 
21 
23  MonitorElement *hRes_S3RPhi = getter.get("DT/1DRecHits/Res/1D_S3RPhi_hRes");
24  MonitorElement *hRes_S3RZ = getter.get("DT/1DRecHits/Res/1D_S3RZ_hRes");
25  MonitorElement *hRes_S3RZ_W0 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W0_hRes");
26  MonitorElement *hRes_S3RZ_W1 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W1_hRes");
27  MonitorElement *hRes_S3RZ_W2 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W2_hRes");
28 
29  MonitorElement *hPull_S3RPhi = getter.get("DT/1DRecHits/Pull/1D_S3RPhi_hPull");
30  MonitorElement *hPull_S3RZ = getter.get("DT/1DRecHits/Pull/1D_S3RZ_hPull");
31  MonitorElement *hPull_S3RZ_W0 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W0_hPull");
32  MonitorElement *hPull_S3RZ_W1 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W1_hPull");
33  MonitorElement *hPull_S3RZ_W2 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W2_hPull");
34 
35  Tutils util;
36  util.drawGFit(hRes_S3RPhi->getTH1(), -0.2, 0.2, -0.1, 0.1);
37  util.drawGFit(hRes_S3RZ->getTH1(), -0.2, 0.2, -0.1, 0.1);
38  util.drawGFit(hRes_S3RZ_W0->getTH1(), -0.2, 0.2, -0.1, 0.1);
39  util.drawGFit(hRes_S3RZ_W1->getTH1(), -0.2, 0.2, -0.1, 0.1);
40  util.drawGFit(hRes_S3RZ_W2->getTH1(), -0.2, 0.2, -0.1, 0.1);
41 
42  util.drawGFit(hPull_S3RPhi->getTH1(), -5, 5, -5, 5);
43  util.drawGFit(hPull_S3RZ->getTH1(), -5, 5, -5, 5);
44  util.drawGFit(hPull_S3RZ_W0->getTH1(), -5, 5, -5, 5);
45  util.drawGFit(hPull_S3RZ_W1->getTH1(), -5, 5, -5, 5);
46  util.drawGFit(hPull_S3RZ_W2->getTH1(), -5, 5, -5, 5);
47 
48  if (doall_) {
49  HEff1DHitHarvest hEff_S3RPhi("S3RPhi", booker, getter);
50  HEff1DHitHarvest hEff_S3RZ("S3RZ", booker, getter);
51  HEff1DHitHarvest hEff_S3RZ_W0("S3RZ_W0", booker, getter);
52  HEff1DHitHarvest hEff_S3RZ_W1("S3RZ_W1", booker, getter);
53  HEff1DHitHarvest hEff_S3RZ_W2("S3RZ_W2", booker, getter);
54 
55  if (doStep1_) {
56  HEff1DHitHarvest hEff_S1RPhi("S1RPhi", booker, getter);
57  HEff1DHitHarvest hEff_S1RZ("S1RZ", booker, getter);
58  HEff1DHitHarvest hEff_S1RZ_W0("S1RZ_W0", booker, getter);
59  HEff1DHitHarvest hEff_S1RZ_W1("S1RZ_W1", booker, getter);
60  HEff1DHitHarvest hEff_S1RZ_W2("S1RZ_W2", booker, getter);
61  }
62 
63  if (doStep2_) {
64  HEff1DHitHarvest hEff_S2RPhi("S2RPhi", booker, getter);
65  HEff1DHitHarvest hEff_S2RZ_W0("S2RZ_W0", booker, getter);
66  HEff1DHitHarvest hEff_S2RZ_W1("S2RZ_W1", booker, getter);
67  HEff1DHitHarvest hEff_S2RZ_W2("S2RZ_W2", booker, getter);
68  HEff1DHitHarvest hEff_S2RZ("S2RZ", booker, getter);
69  }
70  }
71 
72  if (local_) {
73  // Plots with finer granularity, not to be included in DQM
74  TString name1 = "RPhi_W";
75  TString name2 = "RZ_W";
76  for (long w = 0; w <= 2; ++w) {
77  for (long s = 1; s <= 4; ++s) {
78  HEff1DHitHarvest hEff_S1RPhiWS(("S1" + name1 + w + "_St" + s).Data(), booker, getter);
79  HEff1DHitHarvest hEff_S3RPhiWS(("S3" + name1 + w + "_St" + s).Data(), booker, getter);
80  if (s != 4) {
81  HEff1DHitHarvest hEff_S1RZWS(("S1" + name2 + w + "_St" + s).Data(), booker, getter);
82  HEff1DHitHarvest hEff_S3RZWS(("S3" + name2 + w + "_St" + s).Data(), booker, getter);
83  }
84  }
85  }
86  }
87 }
88 
89 // declare this as a framework plugin
DTRecHitClients::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
End Job.
Definition: DTRecHitClients.cc:22
DTRecHitClients::~DTRecHitClients
~DTRecHitClients() override
Destructor.
Definition: DTRecHitClients.cc:20
edm
HLT enums.
Definition: AlignableModifier.h:19
Tutils
Definition: utils.h:9
utils.h
DTRecHitClients::DTRecHitClients
DTRecHitClients(const edm::ParameterSet &ps)
Constructor.
Definition: DTRecHitClients.cc:11
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
Histograms.h
DTRecHitClients
Definition: DTRecHitClients.h:15
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HEff1DHitHarvest
A set of histograms fo efficiency computation for 1D RecHits (harvesting)
Definition: Histograms.h:183
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
w
const double w
Definition: UKUtility.cc:23
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:474
edm::ParameterSet
Definition: ParameterSet.h:47
std
Definition: JetResolutionObject.h:76
DTRecHitClients.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
dqm::implementation::IBooker
Definition: DQMStore.h:43
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
util
Definition: __init__.py:1
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27