2 #include "/afs/cern.ch/user/s/skowron/aliroot/my/TPC/alles.h"
3 #include "AliHBTReader.h"
4 #include "AliHBTReaderKineTree.h"
5 #include "AliHBTReaderITSv2.h"
6 #include "AliHBTReaderITSv1.h"
7 #include "AliHBTReaderTPC.h"
8 #include "AliHBTParticleCut.h"
9 #include "AliHBTEvent.h"
10 #include "AliHBTPairCut.h"
11 #include "AliHBTQResolutionFctns.h"
12 #include "AliHBTTwoTrackEffFctn.h"
13 #include "AliHBTCorrelFctn.h"
15 #include "TObjString.h"
21 void AliHBTWriteInternFormat(Option_t* datatype, Option_t* processopt="TracksAndParticles",
22 Int_t first = -1,Int_t last = -1,
23 char *outfile = "data.root")
26 //Anlyzes TPC recontructed tracks and simulated particles that corresponds to them
28 //datatype defines type of data to be read
29 // Kine - analyzes Kine Tree: simulated particles
30 // TPC - analyzes TPC tracking + particles corresponding to these tracks
31 // ITSv1 - analyzes ITSv1 ----------------------//--------------------------
32 // ITSv2 - analyzes ITSv2 ----------------------//--------------------------
34 //processopt defines option passed to AliHBTAnlysis::Process method
35 // default: TracksAndParticles - process both recontructed tracks and sim. particles corresponding to them
36 // Tracks - process only recontructed tracks
37 // Particles - process only simulated particles
39 //Reads data from diroctories from first to last(including)
40 // For examples if first=3 and last=5 it reads from
44 //if first or last is negative (or both), it reads from current directory
46 //these names I use when analysis is done directly from CASTOR files via RFIO
47 const char* basedir="rfio:/castor/cern.ch/user/s/skowron";
48 const char* serie="10k.12fm";
49 const char* field = "0.2";
51 // Dynamically link some shared libs
53 // gROOT->LoadMacro("loadlibs.C");
56 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libHBTAN");
59 /***********************************************************/
62 Int_t kine = strcmp(datatype,"Kine");
63 Int_t TPC = strcmp(datatype,"TPC");
64 Int_t ITSv1 = strcmp(datatype,"ITSv1");
65 Int_t ITSv2 = strcmp(datatype,"ITSv2");
69 reader = new AliHBTReaderKineTree();
70 processopt="Particles"; //this reader by definition reads only simulated particles
74 reader = new AliHBTReaderTPC();
78 reader = new AliHBTReaderITSv1();
82 reader = new AliHBTReaderITSv2();
86 cerr<<"Option "<<datatype<<" not recognized. Exiting"<<endl;
91 if ( (first >= 0) && (last>=0) && ( (last-first)>=0 ) )
92 {//read from many dirs dirs
94 dirs = new TObjArray(last-first+1);
95 for (Int_t i = first; i<=last; i++)
97 sprintf(buff,"%s/%s/%s/%d",basedir,field,serie,i);
98 TObjString *odir= new TObjString(buff);
102 reader->SetDirs(dirs);
103 AliHBTReaderInternal::Write(reader,outfile);