11 TH1D globalPt(
"globalPt",
"globalPt",100,0.,3.);
12 TH1D primaryPt(
"primaryPt",
"primaryPt",100,0.,3.);
13 TH1D l3Pt(
"l3Pt",
"l3Pt",100,0.,3.);
14 TH1D refMult(
"refMult",
"refMult",100,0.,100.);
16 TH2D etaLength(
"etaLength",
"etaLength",20,-1,+1,200,0.,200.);
19 void exampleStMuIOMaker(
const char* file=
"/star/data14/reco/productionCentral/ReversedFullField/P02ge/2001/324/st_physics_2324001_raw_0006.MuDst.root") {
20 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
21 loadSharedLibraries();
29 maker->SetFileAndOpen(file);
31 TMemStat memStat(
"exampleMuIO");
41 for (
int i=0; i<20; i++) {
43 iret = maker->
Make(i);
52 for (
int l=0; l<n; l++) globalPt.Fill(mu->
globalTracks(l)->pt());
54 for (
int l=0; l<n; l++) primaryPt.Fill(mu->
primaryTracks(l)->pt());
56 for (
int l=0; l<n; l++) {l3Pt.Fill( mu->
l3Tracks(l)->pt() );}
60 int referenceMultiplicity = muEvent->
refMult();
61 refMult.Fill(referenceMultiplicity);
63 cout <<
"#" << i <<
" index=" << maker->currentIndex()
65 <<
" refmult= "<< referenceMultiplicity
66 <<
" used= "<< memStat.Used()
67 <<
" size= "<< memStat.ProgSize() << endl;
71 cout <<
" # of events:" << counter << endl;
74 primaryPt.Draw(
"same");
77 TFile f(
"testMuIO.root",
"RECREATE");
static TObjArray * globalTracks()
returns pointer to the global tracks list
static void setLevel(unsigned int level)
sets the debug level
static TClonesArray * l3Tracks()
returns pointer to the l3Tracks list
StMuIOMaker(const char *name="", const char *ioFile="")
Default constructor.
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)