AliRoot Core  3dc7879 (3dc7879)
simul.C
Go to the documentation of this file.
1 
5 Int_t kmarkes[5]={20,21,24,25,23};
6 Int_t kcolors[5]={1,2,4,3,6};
7 
8 void simul(Int_t npoints, Double_t diffFactor){
10 
11  printf("Hallo world\n");
12  gRandom->SetSeed(0);
13  gROOT->LoadMacro("$mcPath/AliTPCclusterFast.cxx+");
14 
15  AliTPCclusterFast::fPRF = new TF1("fprf","gausn",-5,5);
16  AliTPCclusterFast::fTRF = new TF1("ftrf","gausn",-5,5);
17  AliTPCclusterFast::fPRF->SetParameters(1,0,0.5);
18  AliTPCclusterFast::fTRF->SetParameters(1,0,0.5);
19  //
20  AliTPCtrackFast::Simul("trackerSimul.root",npoints, diffFactor);
21 }
22 
23 
24 
25 void Merge(){
27 
28  TString objfile;
29  AliTPCtrackFast track0;
30  track0.MakeHisto();
31  AliTPCtrackFast *track1;
32  ifstream in;
33  Int_t counter=0;
34  in.open("track.txt");
35  while(in.good()) {
36  in >> objfile;
37  if (!objfile.Contains("root")) continue; // protection
38  TFile currentFile(objfile.Data());
39  printf("Open file:Counter\t%d\tMerging file %s\n",counter,objfile.Data());
40  track1=(AliTPCtrackFast)currentFile.Get("track");
41  if (!track1) continue;
42  track0.Add(*track1);
43  counter++;
44  }
45  TFile f("mergetrack.root","recreate");
46  track0.Write("track");
47  f.Close("");
48 }
49 
50 
51 
52 
55 
56  TChain * chain = AliXRDPROOFtoolkit::MakeChain("trackerSimul.list", "simulTrack",0,100);
57  chain->SetCacheSize(10000000000);
58 
59  //
60  // 1.) Qmax/Qtot as function of the input ionization density
61  //
62  chain->Draw("tr.CookdEdxDmax(0,0.6,1,0,1,0)/tr.CookdEdxDtot(0,0.6,1,0,1,0):tr.fMNprim>>hisQtotMax(10,10,50)","","prof",10000);
63  //
64  // 2.) Non linearity due to the truncation Qtot_{60%}/Qtot 100%
65  //
66  chain->Draw("tr.CookdEdxDtot(0,0.6,1,0,1,0)/tr.CookdEdxDtot(0,0.99,1,0,1,0):tr.fMNprim>>hisQtot60100(10,10,50)","","prof",10000);
67  //
68  // 3.)
69  //
70  chain->Draw("tr.CookdEdxDtot(0,0.6,1,0,1,0)/tr.fMNprim:tr.fMNprim>>profQtot60(10,10,50)","","prof",10000);
71  chain->Draw("tr.CookdEdxDtot(0,0.99,1,0,1,0)/tr.fMNprim:tr.fMNprim>>profQtot100(10,10,50)","","profsame",10000);
72 
73 }
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void Merge()
Definition: simul.C:25
static void Simul(const char *simul, Int_t ntracks, Double_t diff, Bool_t simulOverlap=kTRUE)
TROOT * gROOT
static TChain * MakeChain(const char *fileIn, const char *treeName, const char *fName=0, Int_t maxFiles=-1, Int_t startFile=0, Int_t checkLevel=0)
TChain * chain
npoints
Definition: driftITSTPC.C:85
static TF1 * fTRF
Time response function.
void simul(Int_t npoints, Double_t diffFactor)
Definition: simul.C:8
TF1 * f
Definition: interpolTest.C:21
Int_t kmarkes[5]
Definition: simul.C:5
static TF1 * fPRF
time rsponsefunction width
void DrawdEdxResolExample()
Definition: simul.C:53
Int_t kcolors[5]
Definition: simul.C:6