]>
Commit | Line | Data |
---|---|---|
1 | Int_t AliTRDcreateDigits() | |
2 | { | |
3 | // | |
4 | // Creates the digits from the hits of the slow simulator | |
5 | // | |
6 | ||
7 | Int_t rc = 0; | |
8 | ||
9 | if (!gAlice) { | |
10 | cout << "<AliTRDcreateDigits> No AliRun object found" << endl; | |
11 | rc = 1; | |
12 | return rc; | |
13 | } | |
14 | gAlice->GetEvent(0); | |
15 | ||
16 | // Create the TRD digitzer | |
17 | AliTRDdigitizer *Digitizer = new AliTRDdigitizer("digitizer","Digitizer class"); | |
18 | Digitizer->InitDetector(); | |
19 | ||
20 | // Set the parameter (for TRF ~200ns) | |
21 | Digitizer->SetGasGain(1600.); | |
22 | Digitizer->SetChipGain(8.0); | |
23 | Digitizer->SetNoise(1000.); | |
24 | Digitizer->SetADCinRange(1000.); | |
25 | Digitizer->SetADCoutRange(1023.); | |
26 | Digitizer->SetADCthreshold(0); | |
27 | Digitizer->SetVerbose(1); | |
28 | ||
29 | // Create the digits | |
30 | if (!(Digitizer->MakeDigits())) { | |
31 | rc = 2; | |
32 | return rc; | |
33 | } | |
34 | ||
35 | // Write the digits into the input file | |
36 | if (!(Digitizer->WriteDigits())) { | |
37 | rc = 3; | |
38 | return rc; | |
39 | } | |
40 | ||
41 | // Save the digitizer class in the AliROOT file | |
42 | if (!(Digitizer->Write())) { | |
43 | rc = 4; | |
44 | return rc; | |
45 | } | |
46 | ||
47 | return rc; | |
48 | ||
49 | } |