9 #include "StMultiH1F.h"
10 #include "HitHistograms.h"
14 #include "StEventTypes.h"
17 HitHistograms::HitHistograms() :
18 m_innerSectorDeDxHist(0),
19 m_outerSectorDeDxHist(0),
20 m_allSectorsDeDxHist(0)
25 HitHistograms::HitHistograms(
const char *name,
const char *title,
26 Int_t nbinsx,Axis_t xlow,Axis_t xup, Int_t nbinsy,
35 const char* name1 =
"StEQaInnerSectorDeDx";
36 const char* name2 =
"StEQaOuterSectorDeDx";
37 const char* title1 =
"Inner Sector De/Dx Distribution";
38 const char* title2 =
"Outer Sector De/Dx Distribution";
40 m_innerSectorDeDxHist =
new TH1F(name1,title1,xbins,xmin,xmax);
41 m_outerSectorDeDxHist =
new TH1F(name2,title2,xbins,xmin,xmax);
42 m_allSectorsDeDxHist =
new StMultiH1F(name,title,nbinsx,xlow,xup,nbinsy);
43 m_allSectorsDeDxHist->SetStats(kFALSE);
45 m_allSectorsDeDxHist->Rebin(0,
"Outer");
46 m_allSectorsDeDxHist->Rebin(1,
"Inner");
49 mk->AddHist(m_innerSectorDeDxHist);
50 mk->AddHist(m_outerSectorDeDxHist);
51 mk->AddHist(m_allSectorsDeDxHist);
55 HitHistograms::~HitHistograms()
57 if (m_innerSectorDeDxHist)
delete m_innerSectorDeDxHist;
58 if (m_outerSectorDeDxHist)
delete m_outerSectorDeDxHist;
59 if (m_allSectorsDeDxHist)
delete m_allSectorsDeDxHist;
62 void HitHistograms::buildHistMaps()
68 void HitHistograms::fillHistograms()
73 if ( (ds != 0.) && (keepHit(*it)) ) {
74 if ((*it)->padrow() <= 13){
75 m_innerSectorDeDxHist->Fill( (*it)->charge()/ds );
76 m_allSectorsDeDxHist->Fill((*it)->charge()/ds,1.);
78 if ((*it)->padrow() > 13) {
79 m_outerSectorDeDxHist->Fill( (*it)->charge()/ds );
80 m_allSectorsDeDxHist->Fill((*it)->charge()/ds,0.);
87 TH1F* HitHistograms::innerSectorDeDxHist()
const {
88 return m_innerSectorDeDxHist;
91 TH1F* HitHistograms::outerSectorDeDxHist()
const {
92 return m_outerSectorDeDxHist;
vector< StTpcHit * > m_tpcHitVec
Map of 3 points in each padrow.