]>
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 | ||
19 | // Initialize the TRD and the geometry | |
e2c86a4a | 20 | if (!(Digitizer->InitDetector())) { |
793ff80c | 21 | cout << "<AliTRDcreateDigits> No TRD geometry found" << endl; |
22 | rc = 2; | |
23 | return rc; | |
24 | } | |
25 | ||
26 | // Set the parameter | |
27 | Digitizer->SetDiffusion(); | |
28 | Digitizer->SetVerbose(1); | |
29 | ||
30 | // Create the digits | |
e2c86a4a | 31 | if (!(Digitizer->MakeDigits())) { |
793ff80c | 32 | rc = 3; |
33 | return rc; | |
34 | } | |
35 | ||
e2c86a4a | 36 | // Write the digits into the input file |
37 | if (!(Digitizer->WriteDigits())) { | |
38 | rc = 4; | |
39 | return rc; | |
40 | } | |
41 | ||
42 | // Save the digitizer class in the AliROOT file | |
43 | if (!(Digitizer->Write())) { | |
44 | rc = 5; | |
45 | return rc; | |
46 | } | |
47 | ||
793ff80c | 48 | return rc; |
49 | ||
50 | } |