#include <MultiplicityCorrelatorHistogramMaker.h>
Public Member Functions | |
void | beginRun (const edm::Run &iRun) |
void | fill (const edm::Event &iEvent, const int xmult, const int ymult) |
MultiplicityCorrelatorHistogramMaker (const edm::ParameterSet &iConfig) | |
MultiplicityCorrelatorHistogramMaker () | |
~MultiplicityCorrelatorHistogramMaker () | |
Private Attributes | |
TH1F * | m_atanyoverx |
TH1F ** | m_atanyoverxrun |
TProfile ** | m_atanyoverxvsbxrun |
TH2F ** | m_atanyoverxvsbxrun2D |
RunHistogramManager | m_fhm |
RunHistogramManager | m_rhm |
bool | m_runHisto |
bool | m_runHisto2D |
bool | m_runHistoBX |
bool | m_runHistoBXProfile |
bool | m_runHistoProfileBX |
double | m_scfact |
TProfile2D ** | m_xvsymultprofvsbxrun |
TH2F * | m_yvsxmult |
TProfile2D ** | m_yvsxmultprofvsbxrun |
TH2F ** | m_yvsxmultrun |
Definition at line 15 of file MultiplicityCorrelatorHistogramMaker.h.
MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker | ( | ) |
Definition at line 12 of file MultiplicityCorrelatorHistogramMaker.cc.
: m_rhm(false), m_fhm(true), m_runHisto(false), m_runHistoBXProfile(false), m_runHistoBX(false), m_runHisto2D(false), m_runHistoProfileBX(false), m_scfact(1.), m_yvsxmult(0), m_atanyoverx(0), m_atanyoverxrun(0), m_atanyoverxvsbxrun(0), m_atanyoverxvsbxrun2D(0), m_yvsxmultrun(0), m_yvsxmultprofvsbxrun(0), m_xvsymultprofvsbxrun(0) {}
MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 19 of file MultiplicityCorrelatorHistogramMaker.cc.
References edm::ParameterSet::getParameter(), m_atanyoverx, m_atanyoverxrun, m_atanyoverxvsbxrun, m_atanyoverxvsbxrun2D, m_fhm, m_rhm, m_runHisto, m_runHisto2D, m_runHistoBX, m_runHistoBXProfile, m_runHistoProfileBX, m_scfact, m_xvsymultprofvsbxrun, m_yvsxmult, m_yvsxmultprofvsbxrun, m_yvsxmultrun, RunHistogramManager::makeTH1F(), RunHistogramManager::makeTH2F(), RunHistogramManager::makeTProfile(), and RunHistogramManager::makeTProfile2D().
: m_rhm(false), m_fhm(true), m_runHisto(iConfig.getParameter<bool>("runHisto")), m_runHistoBXProfile(iConfig.getParameter<bool>("runHistoBXProfile")), m_runHistoBX(iConfig.getParameter<bool>("runHistoBX")), m_runHisto2D(iConfig.getParameter<bool>("runHisto2D")), m_runHistoProfileBX(iConfig.getUntrackedParameter<bool>("runHistoProfileBX",false)), m_scfact(iConfig.getUntrackedParameter<double>("scaleFactor",1.)), m_atanyoverxrun(0), m_atanyoverxvsbxrun(0), m_atanyoverxvsbxrun2D(0), m_yvsxmultrun(0), m_yvsxmultprofvsbxrun(0), m_xvsymultprofvsbxrun(0) { edm::Service<TFileService> tfserv; char hname[300]; sprintf(hname,"%sVs%s", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); char htitle[300]; sprintf(htitle,"%s Vs %s multiplicity", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); m_yvsxmult = tfserv->make<TH2F>(hname,htitle, iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax"), iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax")); if(m_runHisto && m_runHisto2D) { m_yvsxmultrun = m_rhm.makeTH2F(hname,htitle, iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax"), iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax")); } if(m_runHisto && m_runHistoProfileBX) { sprintf(hname,"%sVs%sprofvsbx", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); sprintf(htitle,"%s Vs %s multiplicity vs BX", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); m_yvsxmultprofvsbxrun = m_fhm.makeTProfile2D(hname,htitle, 3564,0.5,3563.5, iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax")); sprintf(hname,"%sVs%sprofvsbx", iConfig.getParameter<std::string>("xDetLabel").c_str(), iConfig.getParameter<std::string>("yDetLabel").c_str()); sprintf(htitle,"%s Vs %s multiplicity vs BX", iConfig.getParameter<std::string>("xDetLabel").c_str(), iConfig.getParameter<std::string>("yDetLabel").c_str()); m_xvsymultprofvsbxrun = m_fhm.makeTProfile2D(hname,htitle, 3564,0.5,3563.5, iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax")); } sprintf(hname,"%sOver%s", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)", m_scfact, iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str() ); m_atanyoverx = tfserv->make<TH1F>(hname,htitle, iConfig.getParameter<unsigned int>("rBins"),0.,1.6); if(m_runHisto) { sprintf(hname,"%sOver%srun", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); m_atanyoverxrun = m_rhm.makeTH1F(hname,htitle, iConfig.getParameter<unsigned int>("rBins"),0.,1.6); if(m_runHistoBX) { sprintf(hname,"%sOver%svsbx2D", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)", m_scfact, iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str() ); m_atanyoverxvsbxrun2D = m_fhm.makeTH2F(hname,htitle,3564,-0.5,3563.5, iConfig.getParameter<unsigned int>("rBins"),0.,1.6); } if(m_runHistoBXProfile) { sprintf(hname,"%sOver%svsbx", iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str()); sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)", m_scfact, iConfig.getParameter<std::string>("yDetLabel").c_str(), iConfig.getParameter<std::string>("xDetLabel").c_str() ); m_atanyoverxvsbxrun = m_fhm.makeTProfile(hname,htitle,3564,-0.5,3563.5); } } }
MultiplicityCorrelatorHistogramMaker::~MultiplicityCorrelatorHistogramMaker | ( | ) |
Definition at line 120 of file MultiplicityCorrelatorHistogramMaker.cc.
{ }
void MultiplicityCorrelatorHistogramMaker::beginRun | ( | const edm::Run & | iRun | ) |
Definition at line 122 of file MultiplicityCorrelatorHistogramMaker.cc.
References RunHistogramManager::beginRun(), m_fhm, and m_rhm.
void MultiplicityCorrelatorHistogramMaker::fill | ( | const edm::Event & | iEvent, |
const int | xmult, | ||
const int | ymult | ||
) |
Definition at line 129 of file MultiplicityCorrelatorHistogramMaker.cc.
References edm::EventBase::bunchCrossing(), m_atanyoverx, m_atanyoverxrun, m_atanyoverxvsbxrun, m_atanyoverxvsbxrun2D, m_scfact, m_xvsymultprofvsbxrun, m_yvsxmult, m_yvsxmultprofvsbxrun, and m_yvsxmultrun.
{ const int bx = iEvent.bunchCrossing(); if(m_yvsxmult) m_yvsxmult->Fill(xmult,ymult); if(m_atanyoverx) m_atanyoverx->Fill(atan2(ymult*m_scfact,xmult)); if(m_yvsxmultrun && *m_yvsxmultrun) (*m_yvsxmultrun)->Fill(xmult,ymult); if(m_atanyoverxrun && *m_atanyoverxrun) (*m_atanyoverxrun)->Fill(atan2(ymult*m_scfact,xmult)); if(m_atanyoverxvsbxrun && *m_atanyoverxvsbxrun) (*m_atanyoverxvsbxrun)->Fill(bx,atan2(ymult*m_scfact,xmult)); if(m_atanyoverxvsbxrun2D && *m_atanyoverxvsbxrun2D) (*m_atanyoverxvsbxrun2D)->Fill(bx,atan2(ymult*m_scfact,xmult)); if(m_yvsxmultprofvsbxrun && *m_yvsxmultprofvsbxrun) (*m_yvsxmultprofvsbxrun)->Fill(bx,xmult,ymult); if(m_xvsymultprofvsbxrun && *m_xvsymultprofvsbxrun) (*m_xvsymultprofvsbxrun)->Fill(bx,ymult,xmult); }
TH1F* MultiplicityCorrelatorHistogramMaker::m_atanyoverx [private] |
Definition at line 37 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TH1F** MultiplicityCorrelatorHistogramMaker::m_atanyoverxrun [private] |
Definition at line 38 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TProfile** MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun [private] |
Definition at line 39 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TH2F** MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun2D [private] |
Definition at line 40 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
Definition at line 29 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by beginRun(), and MultiplicityCorrelatorHistogramMaker().
Definition at line 28 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by beginRun(), and MultiplicityCorrelatorHistogramMaker().
bool MultiplicityCorrelatorHistogramMaker::m_runHisto [private] |
Definition at line 30 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by MultiplicityCorrelatorHistogramMaker().
bool MultiplicityCorrelatorHistogramMaker::m_runHisto2D [private] |
Definition at line 33 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by MultiplicityCorrelatorHistogramMaker().
bool MultiplicityCorrelatorHistogramMaker::m_runHistoBX [private] |
Definition at line 32 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by MultiplicityCorrelatorHistogramMaker().
bool MultiplicityCorrelatorHistogramMaker::m_runHistoBXProfile [private] |
Definition at line 31 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by MultiplicityCorrelatorHistogramMaker().
bool MultiplicityCorrelatorHistogramMaker::m_runHistoProfileBX [private] |
Definition at line 34 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by MultiplicityCorrelatorHistogramMaker().
double MultiplicityCorrelatorHistogramMaker::m_scfact [private] |
Definition at line 35 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TProfile2D** MultiplicityCorrelatorHistogramMaker::m_xvsymultprofvsbxrun [private] |
Definition at line 43 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TH2F* MultiplicityCorrelatorHistogramMaker::m_yvsxmult [private] |
Definition at line 36 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TProfile2D** MultiplicityCorrelatorHistogramMaker::m_yvsxmultprofvsbxrun [private] |
Definition at line 42 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().
TH2F** MultiplicityCorrelatorHistogramMaker::m_yvsxmultrun [private] |
Definition at line 41 of file MultiplicityCorrelatorHistogramMaker.h.
Referenced by fill(), and MultiplicityCorrelatorHistogramMaker().