]>
Commit | Line | Data |
---|---|---|
793ff80c | 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 | ||
793ff80c | 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 | ||
4a0fe73c | 19 | // Set the parameter |
20 | Digitizer->SetGasGain(3300.); | |
21 | Digitizer->SetChipGain(8.0); | |
22 | Digitizer->SetNoise(1000.); | |
23 | Digitizer->SetADCinRange(1000.); | |
24 | Digitizer->SetADCoutRange(1023.); | |
25 | Digitizer->SetADCthreshold(0); | |
793ff80c | 26 | Digitizer->SetVerbose(1); |
27 | ||
28 | // Create the digits | |
e2c86a4a | 29 | if (!(Digitizer->MakeDigits())) { |
6244debe | 30 | rc = 2; |
793ff80c | 31 | return rc; |
32 | } | |
33 | ||
e2c86a4a | 34 | // Write the digits into the input file |
35 | if (!(Digitizer->WriteDigits())) { | |
6244debe | 36 | rc = 3; |
e2c86a4a | 37 | return rc; |
38 | } | |
39 | ||
40 | // Save the digitizer class in the AliROOT file | |
41 | if (!(Digitizer->Write())) { | |
6244debe | 42 | rc = 4; |
e2c86a4a | 43 | return rc; |
44 | } | |
45 | ||
793ff80c | 46 | return rc; |
47 | ||
48 | } |