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