]>
Commit | Line | Data |
---|---|---|
8c555625 | 1 | |
2 | void AliTPCHits2Digits(const char * name= "pokusD_") | |
3 | { | |
4 | ||
5 | // Dynamically link some shared libs | |
1283eee5 | 6 | if (gClassTable->GetID("AliRun") < 0) { |
7 | gROOT->LoadMacro("loadlibs.C"); | |
8 | loadlibs(); | |
9 | } | |
8c555625 | 10 | |
11 | //names of trees | |
12 | const char * inFile = "galice.root"; | |
13 | // const * char ident= "TreeD1par_"; | |
14 | ||
15 | // Connect the Root Galice file containing Geometry, Kine and Hits | |
16 | TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(inFile); | |
17 | if (file) file->Close(); | |
18 | file = new TFile(inFile,"UPDATE"); | |
19 | // Get AliRun object from file or create it if not on file | |
20 | ||
21 | if(gAlice){ | |
22 | delete gAlice; | |
23 | gAlice=0; | |
24 | } | |
25 | if (!gAlice) { | |
26 | gAlice = (AliRun*)file->Get("gAlice"); | |
27 | if (gAlice) printf("AliRun object found on file\n"); | |
28 | if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); | |
29 | } | |
30 | gAlice->GetEvent(0); | |
31 | AliTPC *TPC = (AliTPC*)gAlice->GetModule("TPC"); | |
32 | TPC->Dump(); | |
33 | //adjust parameters | |
34 | ||
35 | AliTPCD *paramd = TPC->GetDigParam(); | |
36 | paramd->Dump(); | |
37 | paramd->SetName("Param1"); | |
38 | paramd->MakeTree(); | |
39 | //set pointers to parameters | |
40 | paramd->Dump(); | |
41 | AliTPCParam ¶m = paramd->GetParam(); | |
42 | AliTPCPRF2D &prf = paramd->GetPRF2D(); | |
43 | AliTPCRF1D & rf = paramd->GetRF(); | |
44 | ||
3c0f9266 | 45 | param.SetPadLength(2.0); |
46 | param.SetPadWidth(0.3); | |
8c555625 | 47 | param.SetPadPitchLength(2.05); |
48 | param.SetPadPitchWidth(0.35); | |
49 | param.SetNWires(5); | |
50 | param.SetZeroSup(5); | |
51 | param.SetDiffT(0.022); | |
52 | param.SetDiffL(0.022); | |
53 | param.SetNoise(500); | |
54 | param.SetGasGain(1.e4); | |
1283eee5 | 55 | param.SetChipGain(24); |
3c0f9266 | 56 | param.SetSectorAngles(20.,0.,20.,0.); |
57 | param.SetInnerRadiusLow(83.9); | |
58 | param.SetInnerRadiusUp(141.3); | |
1283eee5 | 59 | param.SetOuterRadiusLow(146.9); |
60 | param.SetOuterRadiusUp(249.4); | |
3c0f9266 | 61 | param.SetTSample(1.9e-7); |
62 | param.SetTSigma(1.5e-7/2.35); | |
63 | param.SetInSecLowEdge(81.6); | |
64 | param.SetInSecUpEdge(143.6); | |
65 | param.SetOuSecLowEdge(144.2); | |
66 | param.SetOuSecUpEdge(252.1); | |
67 | param.SetEdge(1.5); | |
68 | param.SetDeadZone(1.15); | |
8c555625 | 69 | param.Update(); |
70 | ||
71 | //Set z (time) response function | |
b6738b36 | 72 | |
73 | rf.SetOffset(3.*param.GetZSigma()); | |
8c555625 | 74 | rf.SetGauss(param.GetZSigma(),param.GetZWidth(),0.4); |
75 | rf.Update(); | |
76 | //Set two dimensional pad response function | |
3c0f9266 | 77 | TFile f("$(ALICE_ROOT)/TPC/AliTPCprf2d.root"); |
8c555625 | 78 | // prf.Read("prf_205035_Gati_062074_d03"); |
79 | prf.Read("prf_205035_Gati_062074_d03"); | |
80 | f.Close(); | |
81 | ||
82 | printf("**********Digit object dump start********************\n"); | |
83 | paramd->Dump(); | |
84 | printf("**********AliTPCParam**************************\n"); | |
85 | param.Dump(); | |
86 | printf("**********Time response function***************\n"); | |
87 | rf.Dump(); | |
88 | printf("**********Pad response function params*********\n"); | |
89 | prf.Dump(); | |
90 | printf("**********Digit object dump end********************\n"); | |
91 | ||
3c0f9266 | 92 | TPC->Hits2DigitsSector(1); |
93 | TPC->Hits2DigitsSector(2); | |
94 | TPC->Hits2DigitsSector(3); | |
95 | TPC->Hits2DigitsSector(1+18); | |
96 | TPC->Hits2DigitsSector(2+18); | |
97 | TPC->Hits2DigitsSector(3+18); | |
98 | TPC->Hits2DigitsSector(1+36); | |
99 | TPC->Hits2DigitsSector(2+36); | |
100 | TPC->Hits2DigitsSector(3+36); | |
101 | TPC->Hits2DigitsSector(1+36+18); | |
102 | TPC->Hits2DigitsSector(2+36+18); | |
103 | TPC->Hits2DigitsSector(3+36+18); | |
8c555625 | 104 | |
105 | ||
106 | file->cd(); | |
107 | TPC->GetDigParam()->Write(); | |
108 | }; | |
109 | ||
110 |