CMS 3D CMS Logo

TrackingDQMClientHeavyIons.cc
Go to the documentation of this file.
1 
3 
9 
10 #include <TH1F.h>
11 #include <TClass.h>
12 #include <TString.h>
13 #include <string>
14 #include <cmath>
15 #include <climits>
16 #include <boost/tokenizer.hpp>
17 
18 using namespace std;
19 using namespace edm;
20 
22 
24  TopFolder_ = pset.getParameter<std::string>("FolderName");
25 }
26 
28  typedef vector<string> vstring;
29 
30  // Update 2014-04-02
31  // Migrated back to the endJob. the DQMFileSaver logic has
32  // to be reviewed to guarantee that the endJob is properly
33  // considered. The splitting per run is done centrally when
34  // running the harvesting in production
35 
36  // Update 2009-09-23
37  // Migrated all code from endJob to this function
38  // endJob is not necessarily called in the proper sequence
39  // and does not necessarily book histograms produced in
40  // that step.
41  // It more robust to do the histogram manipulation in
42  // this endRun function
43  // needed to access the DQMStore::save method
44 
45  ibooker.cd();
46  ibooker.setCurrentFolder(TopFolder_);
47 
48  histName = "DCAStats_";
49  DCAStats = ibooker.book2D(histName, histName, 2, 0, 2, 4, 0, 4);
50  DCAStats->getTH2F()->GetYaxis()->SetBinLabel(1, "Mean");
51  DCAStats->getTH2F()->GetYaxis()->SetBinLabel(2, "RMS, #sigma");
52  DCAStats->getTH2F()->GetYaxis()->SetBinLabel(3, "Skewness ,#gamma_{1}");
53  DCAStats->getTH2F()->GetYaxis()->SetBinLabel(4, "Kurtosis, #gamma_{2}");
54  DCAStats->setBinLabel(1, "Longitudinal");
55  DCAStats->setBinLabel(2, "Transverse");
56  DCAStats->setOption("text");
57 
58  histName = "LongDCASig_HeavyIonTk";
59  ME* element = igetter.get(TopFolder_ + "/" + histName);
60  //Longitudinal First
61  DCAStats->setBinContent(1, 1, element->getTH1F()->GetMean()); //mean
62  DCAStats->setBinContent(1, 2, element->getTH1F()->GetRMS()); //rms
63  DCAStats->setBinContent(1, 3, element->getTH1F()->GetSkewness()); //skewness
64  DCAStats->setBinContent(1, 4, element->getTH1F()->GetKurtosis()); //kurtosis
65  //Transverse
66  histName = "TransDCASig_HeavyIonTk";
67  ME* element1 = igetter.get(TopFolder_ + "/" + histName);
68  //Longitudinal First
69  DCAStats->setBinContent(2, 1, element1->getTH1F()->GetMean()); //mean
70  DCAStats->setBinContent(2, 2, element1->getTH1F()->GetRMS()); //rms
71  DCAStats->setBinContent(2, 3, element1->getTH1F()->GetSkewness()); //skewness
72  DCAStats->setBinContent(2, 4, element1->getTH1F()->GetKurtosis()); //kurtosis
73 }
T getParameter(std::string const &) const
virtual TH2F * getTH2F() const
vector< string > vstring
Definition: ExoticaDQM.cc:8
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
TrackingDQMClientHeavyIons(const edm::ParameterSet &pset)
Definition: ME.h:11
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
HLT enums.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: DQMStore.cc:266
dqm::harvesting::MonitorElement ME
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:437