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 {
14  // Switches for analysis at various steps
15  doStep1_ = pset.getUntrackedParameter<bool>("doStep1", false);
16  doStep2_ = pset.getUntrackedParameter<bool>("doStep2", false);
17  doStep3_ = pset.getUntrackedParameter<bool>("doStep3", false);
18  doall_ = pset.getUntrackedParameter<bool>("doall", false);
19  local_ = pset.getUntrackedParameter<bool>("local", true);
20 }
21 
23 {
24 }
25 
27 {
28  MonitorElement * hRes_S3RPhi = getter.get("DT/1DRecHits/Res/1D_S3RPhi_hRes");
29  MonitorElement * hRes_S3RZ = getter.get("DT/1DRecHits/Res/1D_S3RZ_hRes");
30  MonitorElement * hRes_S3RZ_W0 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W0_hRes");
31  MonitorElement * hRes_S3RZ_W1 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W1_hRes");
32  MonitorElement * hRes_S3RZ_W2 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W2_hRes");
33 
34  MonitorElement * hPull_S3RPhi = getter.get("DT/1DRecHits/Pull/1D_S3RPhi_hPull");
35  MonitorElement * hPull_S3RZ = getter.get("DT/1DRecHits/Pull/1D_S3RZ_hPull");
36  MonitorElement * hPull_S3RZ_W0 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W0_hPull");
37  MonitorElement * hPull_S3RZ_W1 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W1_hPull");
38  MonitorElement * hPull_S3RZ_W2 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W2_hPull");
39 
40  Tutils util;
41  util.drawGFit(hRes_S3RPhi->getTH1(),-0.2,0.2,-0.1,0.1);
42  util.drawGFit(hRes_S3RZ->getTH1(),-0.2,0.2,-0.1,0.1);
43  util.drawGFit(hRes_S3RZ_W0->getTH1(),-0.2,0.2,-0.1,0.1);
44  util.drawGFit(hRes_S3RZ_W1->getTH1(),-0.2,0.2,-0.1,0.1);
45  util.drawGFit(hRes_S3RZ_W2->getTH1(),-0.2,0.2,-0.1,0.1);
46 
47  util.drawGFit(hPull_S3RPhi->getTH1(),-5,5,-5,5);
48  util.drawGFit(hPull_S3RZ->getTH1(),-5,5,-5,5);
49  util.drawGFit(hPull_S3RZ_W0->getTH1(),-5,5,-5,5);
50  util.drawGFit(hPull_S3RZ_W1->getTH1(),-5,5,-5,5);
51  util.drawGFit(hPull_S3RZ_W2->getTH1(),-5,5,-5,5);
52 
53  if (doall_) {
54  HEff1DHitHarvest hEff_S3RPhi("S3RPhi", booker, getter);
55  HEff1DHitHarvest hEff_S3RZ("S3RZ", booker, getter);
56  HEff1DHitHarvest hEff_S3RZ_W0("S3RZ_W0", booker, getter);
57  HEff1DHitHarvest hEff_S3RZ_W1("S3RZ_W1", booker, getter);
58  HEff1DHitHarvest hEff_S3RZ_W2("S3RZ_W2", booker, getter);
59 
60  if (doStep1_) {
61  HEff1DHitHarvest hEff_S1RPhi("S1RPhi", booker, getter);
62  HEff1DHitHarvest hEff_S1RZ("S1RZ", booker, getter);
63  HEff1DHitHarvest hEff_S1RZ_W0("S1RZ_W0", booker, getter);
64  HEff1DHitHarvest hEff_S1RZ_W1("S1RZ_W1", booker, getter);
65  HEff1DHitHarvest hEff_S1RZ_W2("S1RZ_W2", booker, getter);
66  }
67 
68  if (doStep2_) {
69  HEff1DHitHarvest hEff_S2RPhi("S2RPhi", booker, getter);
70  HEff1DHitHarvest hEff_S2RZ_W0("S2RZ_W0", booker, getter);
71  HEff1DHitHarvest hEff_S2RZ_W1("S2RZ_W1", booker, getter);
72  HEff1DHitHarvest hEff_S2RZ_W2("S2RZ_W2", booker, getter);
73  HEff1DHitHarvest hEff_S2RZ("S2RZ", booker, getter);
74  }
75  }
76 
77  if (local_) {
78  // Plots with finer granularity, not to be included in DQM
79  TString name1 = "RPhi_W";
80  TString name2 = "RZ_W";
81  for (long w = 0; w <= 2; ++w) {
82  for (long s = 1;s <= 4; ++s) {
83  HEff1DHitHarvest hEff_S1RPhiWS(("S1"+name1+w+"_St"+s).Data(), booker, getter);
84  HEff1DHitHarvest hEff_S3RPhiWS(("S3"+name1+w+"_St"+s).Data(), booker, getter);
85  if (s != 4) {
86  HEff1DHitHarvest hEff_S1RZWS(("S1"+name2+w+"_St"+s).Data(), booker, getter);
87  HEff1DHitHarvest hEff_S3RZWS(("S3"+name2+w+"_St"+s).Data(), booker, getter);
88  }
89  }
90  }
91  }
92 }
93 
94 // 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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
DTRecHitClients(const edm::ParameterSet &ps)
Constructor.
TH1 * getTH1() const
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:178