101 #include <TBrowser.h>
102 #include "StEpcMaker.h"
103 #include "StPointCollection.h"
105 #include "StEventTypes.h"
115 m_point_energy[i] = 0;
118 m_point_sigeta[i] = 0;
119 m_point_sigphi[i] = 0;
120 m_point_trmom[i] = 0;
127 StEpcMaker::~StEpcMaker()
130 Int_t StEpcMaker::Init()
133 m_point_flag=
new TH1F(
" Point_Flag ",
" Point Flag ",5,0.5,5.5);
134 m_point_quality=
new TH1F(
" Point_Quality ",
" Point Quality distribution ",32,-0.5,31.5);
136 const TString catname[] =
137 {
"Cat1",
"Cat2",
"Cat3",
"Cat4"
140 for (Int_t i=0; i<4; i++)
142 TString name_e = catname[i] +
"_Point_Energy";
143 TString tit_e = catname[i] +
" Point Energy";
146 TString name_eta = catname[i] +
"_Point_Eta";
147 TString tit_eta = catname[i] +
" Point Eta";
148 m_point_eta[i]=
new TH1F(name_eta,tit_eta,100,-1.,1.);
150 TString name_phi = catname[i] +
"_Point_Phi";
151 TString tit_phi = catname[i] +
" Point Phi";
152 m_point_phi[i]=
new TH1F(name_phi,tit_phi,100,-3.14,3.14);
155 TString name_sigeta = catname[i] +
"_Sigma_Eta";
156 TString tit_sigeta = catname[i] +
" Sigma Eta";
159 TString name_sigphi = catname[i] +
"_Sigma_Phi";
160 TString tit_sigphi = catname[i] +
" Sigma Phi";
163 TString name_points = catname[i] +
"_Points_Multiplicity";
164 TString tit_points = catname[i] +
" Points Multiplicity";
165 m_emc_points[i]=
new TH1F(name_points,tit_points,200,0.,200.);
167 TString name_mom = catname[i] +
"_Track_Momenta";
168 TString tit_mom = catname[i] +
" Track Momenta ";
172 return StMaker::Init();
177 mEvent = (
StEvent *) GetInputDS(
"StEvent");
181 LOG_ERROR <<
"No StEvent! Can not continue. " << endm;
184 mTheEmcCollection = mEvent->emcCollection();
185 if(!mTheEmcCollection)
187 LOG_ERROR <<
" EPC:: No EmcCollection, Cannot continue**"<<endm;
195 if(mPoint->makeEmcPoints(mEvent) != 1)
200 LOG_DEBUG <<
"findEmcPoint == kStOK" << endm;
204 LOG_DEBUG <<
"Epc: *** Filling StEvent ***" << endm;
205 if(fillStEvent() !=
kStOK)
207 LOG_WARN <<
"StEvent filling is not OK"<<endm;
213 void StEpcMaker::MakeHistograms()
215 Int_t mult[4]={0,0,0,0};
218 Int_t nR = mPoint->NPointsReal();
222 LOG_DEBUG <<
"Number of Emc points " << nR << endm;
223 TIter next(mPoint->PointsReal());
226 for(Int_t i=0; i<nR; i++)
232 Int_t Q = cl->quality();
239 if( (Q&1) && (Q&4) && (Q&8))
241 m_point_flag->Fill(C);
249 m_point_eta[C-1]->Fill(cl->position().pseudoRapidity());
256 StPtrVecTrack& tr = cl->track();
257 for(UInt_t j = 0;j<tr.size();j++)
272 for(Int_t i = 0;i<4;i++)
278 StEpcMaker::fillStEvent()
280 LOG_DEBUG <<
"Epc::fillStEvent() ***"<<endm;
284 Int_t nR = mPoint->NPointsReal();
288 LOG_DEBUG <<
"Number of Emc points " << nR << endm;
289 TIter next(mPoint->PointsReal());
292 for(Int_t i=0; i<nR; i++)
295 mTheEmcCollection->addBarrelPoint(cl);
300 LOG_DEBUG <<
"There is no BEMC points in this event" <<endm;
313 if(mTheEmcCollection)
314 b->Add((TObject*)mTheEmcCollection);
TH1F * m_point_sigphi[4]
//Point SigmaEta spectra
Bool_t mFillHisto
//Emc Point multiplicity
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
TH1F * m_point_quality
//Point Flag spectra
TH1F * m_point_sigeta[4]
//Point Phi spectra
virtual void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).
TH1F * m_emc_points[4]
//Point TrMom spectra
TH1F * m_point_eta[4]
//Point Energy spectra
TH1F * m_point_energy[4]
//Point quality spectra
TH1F * m_point_trmom[4]
//Point SigmaPhi spectra
TH1F * m_point_phi[4]
//Point Eta spectra
virtual void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).