]>
Commit | Line | Data |
---|---|---|
8c555625 | 1 | |
2 | void AliTPCHits2Digits(const char * name= "pokusD_") | |
3 | { | |
4 | ||
5 | // Dynamically link some shared libs | |
6 | if (gClassTable->GetID("AliRun") < 0) { | |
7 | gROOT->LoadMacro("loadlibs.C"); | |
8 | loadlibs(); | |
9 | } | |
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 | ||
45 | param.SetPadLength(2.05); | |
46 | param.SetPadWidth(0.35); | |
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); | |
55 | param.SetChipGain(24); | |
56 | param.Update(); | |
57 | ||
58 | //Set z (time) response function | |
59 | rf.SetGauss(param.GetZSigma(),param.GetZWidth(),0.4); | |
60 | rf.Update(); | |
61 | //Set two dimensional pad response function | |
62 | TFile f("TPC/AliTPCprf2d.root"); | |
63 | // prf.Read("prf_205035_Gati_062074_d03"); | |
64 | prf.Read("prf_205035_Gati_062074_d03"); | |
65 | f.Close(); | |
66 | ||
67 | printf("**********Digit object dump start********************\n"); | |
68 | paramd->Dump(); | |
69 | printf("**********AliTPCParam**************************\n"); | |
70 | param.Dump(); | |
71 | printf("**********Time response function***************\n"); | |
72 | rf.Dump(); | |
73 | printf("**********Pad response function params*********\n"); | |
74 | prf.Dump(); | |
75 | printf("**********Digit object dump end********************\n"); | |
76 | ||
77 | TPC->Hits2DigitsSector(1); | |
78 | ||
79 | ||
80 | file->cd(); | |
81 | TPC->GetDigParam()->Write(); | |
82 | }; | |
83 | ||
84 |