CMS 3D CMS Logo

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