19 #include "StMessMgr.h"
22 #include "StMuDSTMaker/COMMON/StMuTrack.h"
23 #include "StMuDSTMaker/COMMON/StMuDst.h"
24 #include "StMuDSTMaker/COMMON/StMuDebug.h"
25 #include "StMuAnalysisMaker.h"
34 { mEventCounter = 0; mFile = 0; }
36 StMuAnalysisMaker::~StMuAnalysisMaker() { }
39 Int_t StMuAnalysisMaker::Init()
42 mFileName =
"muAnalysis.root";
44 mGlobalPt =
new TH1D(
"globalPt",
"globalPt",100,0.,3.);
45 mPrimaryPt =
new TH1D(
"primaryPt",
"primaryPt",100,0.,3.);
46 mL3Pt =
new TH1D(
"l3Pt",
"l3Pt",100,0.,3.);
47 mRefMult =
new TH1D(
"refMult",
"refMult",100,0.,100.);
49 return StMaker::Init();
62 cout <<
"StMuAnalysisMaker::Finish()\n";
63 cout <<
"\tProcessed " << mEventCounter <<
" events." << endl;
66 mFile =
new TFile(mFileName.c_str(),
"RECREATE");
67 cout <<
"\tHistograms will be stored in file '"
68 << mFileName.c_str() <<
"'" << endl;
89 DEBUGVALUE2(mEventCounter);
92 mu = (
StMuDst*) GetInputDS(
"MuDst");
96 gMessMgr->Warning() <<
"StMuAnalysisMaker::Make : No MuDst" << endm;
104 int refMult = muEvent->
refMult();
105 mRefMult->Fill(refMult);
112 printf(
"Global track # = %d\n",nTracks);
113 for (
int l=0; l<nTracks; l++) {
115 if(muTrack)
if (accept(muTrack)) mGlobalPt->Fill(muTrack->
pt());
118 printf(
"Primary track # = %d\n",nTracks);
119 for (
int l=0; l<nTracks; l++) {
121 if(muTrack)
if (accept(muTrack)) mPrimaryPt->Fill(muTrack->
pt());
123 nTracks= mu->
l3Tracks()->GetEntries();
124 printf(
"L3 track # = %d\n",nTracks);
125 for (
int l=0; l<nTracks; l++) {
127 if(muTrack)
if (accept(muTrack)) mL3Pt->Fill(muTrack->
pt());
131 if(muEvent) muEventInfo(*muEvent, mEventCounter);
140 return track && track->
flag() >= 0;
static TObjArray * globalTracks()
returns pointer to the global tracks list
void Clear(Option_t *option="")
User defined functions.
Double_t pt() const
Returns pT at point of dca to primary vertex.
virtual void Clear(Option_t *option="")
User defined functions.
static TClonesArray * l3Tracks()
returns pointer to the l3Tracks list
short flag() const
Returns flag, (see StEvent manual for type information)
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
unsigned short refMult(int vtx_id=-1)
Reference multiplicity of charged particles as defined in StEventUtilities/StuRefMult.hh for vertex vtx_id (-1 is default index from StMuDst)
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
A typical Analysis Class for MuDst.