Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:23

0001 
0002 #include "DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h"
0003 
0004 #include "DQMServices/Core/interface/DQMStore.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "FWCore/ServiceRegistry/interface/Service.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 #include <TH1F.h>
0010 #include <TClass.h>
0011 #include <TString.h>
0012 #include <string>
0013 #include <cmath>
0014 #include <climits>
0015 #include <boost/tokenizer.hpp>
0016 
0017 using namespace std;
0018 using namespace edm;
0019 
0020 typedef dqm::harvesting::MonitorElement ME;
0021 
0022 TrackingDQMClientHeavyIons::TrackingDQMClientHeavyIons(const edm::ParameterSet& pset) {
0023   TopFolder_ = pset.getParameter<std::string>("FolderName");
0024 }
0025 
0026 void TrackingDQMClientHeavyIons::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
0027   typedef vector<string> vstring;
0028 
0029   // Update 2014-04-02
0030   // Migrated back to the endJob. the DQMFileSaver logic has
0031   // to be reviewed to guarantee that the endJob is properly
0032   // considered. The splitting per run is done centrally when
0033   // running the harvesting in production
0034 
0035   // Update 2009-09-23
0036   // Migrated all code from endJob to this function
0037   // endJob is not necessarily called in the proper sequence
0038   // and does not necessarily book histograms produced in
0039   // that step.
0040   // It more robust to do the histogram manipulation in
0041   // this endRun function
0042   // needed to access the DQMStore::save method
0043 
0044   ibooker.cd();
0045   ibooker.setCurrentFolder(TopFolder_);
0046 
0047   histName = "DCAStats_";
0048   DCAStats = ibooker.book2D(histName, histName, 2, 0, 2, 4, 0, 4);
0049   DCAStats->getTH2F()->GetYaxis()->SetBinLabel(1, "Mean");
0050   DCAStats->getTH2F()->GetYaxis()->SetBinLabel(2, "RMS, #sigma");
0051   DCAStats->getTH2F()->GetYaxis()->SetBinLabel(3, "Skewness ,#gamma_{1}");
0052   DCAStats->getTH2F()->GetYaxis()->SetBinLabel(4, "Kurtosis, #gamma_{2}");
0053   DCAStats->setBinLabel(1, "Longitudinal");
0054   DCAStats->setBinLabel(2, "Transverse");
0055   DCAStats->setOption("text");
0056 
0057   histName = "LongDCASig_HeavyIonTk";
0058   ME* element = igetter.get(TopFolder_ + "/" + histName);
0059   //Longitudinal First
0060   DCAStats->setBinContent(1, 1, element->getTH1F()->GetMean());      //mean
0061   DCAStats->setBinContent(1, 2, element->getTH1F()->GetRMS());       //rms
0062   DCAStats->setBinContent(1, 3, element->getTH1F()->GetSkewness());  //skewness
0063   DCAStats->setBinContent(1, 4, element->getTH1F()->GetKurtosis());  //kurtosis
0064   //Transverse
0065   histName = "TransDCASig_HeavyIonTk";
0066   ME* element1 = igetter.get(TopFolder_ + "/" + histName);
0067   //Longitudinal First
0068   DCAStats->setBinContent(2, 1, element1->getTH1F()->GetMean());      //mean
0069   DCAStats->setBinContent(2, 2, element1->getTH1F()->GetRMS());       //rms
0070   DCAStats->setBinContent(2, 3, element1->getTH1F()->GetSkewness());  //skewness
0071   DCAStats->setBinContent(2, 4, element1->getTH1F()->GetKurtosis());  //kurtosis
0072 }