CMS 3D CMS Logo

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