]>
Commit | Line | Data |
---|---|---|
46a0eaea | 1 | /* |
2 | ||
44a0fef0 | 3 | Macro to generate random tracks and clusters. |
4 | Fast MC - Geant equivalent used | |
46a0eaea | 5 | |
46a0eaea | 6 | |
7 | */ | |
8 | ||
46a0eaea | 9 | |
10 | void simul(Int_t npoints){ | |
11 | // | |
12 | // simulation submit script | |
13 | // | |
14 | printf("Hallo world\n"); | |
15 | gRandom->SetSeed(0); | |
44a0fef0 | 16 | gROOT->LoadMacro("$mcPath/AliTPCclusterFast.cxx+"); |
17 | ||
46a0eaea | 18 | AliTPCclusterFast::fPRF = new TF1("fprf","gausn",-5,5); |
19 | AliTPCclusterFast::fTRF = new TF1("ftrf","gausn",-5,5); | |
20 | AliTPCclusterFast::fPRF->SetParameters(1,0,0.5); | |
21 | AliTPCclusterFast::fTRF->SetParameters(1,0,0.5); | |
22 | // | |
23 | AliTPCtrackFast::Simul("trackerSimul.root",npoints); | |
24 | } | |
25 | ||
26 | ||
27 | ||
28 | void Merge(){ | |
29 | // | |
30 | // | |
31 | // | |
32 | TString objfile; | |
33 | AliTPCtrackFast track0; | |
34 | track0.MakeHisto(); | |
35 | AliTPCtrackFast *track1; | |
36 | ifstream in; | |
37 | Int_t counter=0; | |
38 | in.open("track.txt"); | |
39 | while(in.good()) { | |
40 | in >> objfile; | |
41 | if (!objfile.Contains("root")) continue; // protection | |
42 | TFile currentFile(objfile.Data()); | |
43 | printf("Open file:Counter\t%d\tMerging file %s\n",counter,objfile.Data()); | |
44 | track1=(AliTPCtrackFast)currentFile.Get("track"); | |
45 | if (!track1) continue; | |
46 | track0.Add(*track1); | |
47 | counter++; | |
48 | } | |
49 | TFile f("mergetrack.root","recreate"); | |
50 | track0.Write("track"); | |
51 | f.Close(""); | |
52 | } | |
53 | ||
54 | ||
55 | ||
44a0fef0 | 56 | |
57 | void DrawdEdxResolExample(){ | |
46a0eaea | 58 | // |
44a0fef0 | 59 | // Example analysis to make an space point resolution study |
46a0eaea | 60 | // |
44a0fef0 | 61 | TChain * chain = AliXRDPROOFtoolkit::MakeChain("trackerSimul.list", "simulTrack",0,100); |
62 | chain->SetCacheSize(10000000000); | |
c9e8d4ec | 63 | |
c9e8d4ec | 64 | // |
44a0fef0 | 65 | // 1.) Qmax/Qtot as function of the input ionization density |
c9e8d4ec | 66 | // |
44a0fef0 | 67 | 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); |
c9e8d4ec | 68 | // |
44a0fef0 | 69 | // 2.) Non linearity due to the tucncation Qtot_{60%}/Qtot 100% |
70 | // | |
71 | 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); | |
72 | // | |
73 | // | |
74 | // | |
75 | ||
76 | ||
c9e8d4ec | 77 | } |