]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcreateDigits.C
Update of digitization. Moved digit branch definition to AliTRD
[u/mrichter/AliRoot.git] / TRD / AliTRDcreateDigits.C
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
19   // Set the parameter
20   Digitizer->SetDiffusion();
21   Digitizer->SetVerbose(1);
22
23   // Create the digits
24   if (!(Digitizer->MakeDigits())) {
25     rc = 2;
26     return rc;
27   }
28
29   // Write the digits into the input file
30   if (!(Digitizer->WriteDigits())) {
31     rc = 3;
32     return rc;
33   }
34
35   // Save the digitizer class in the AliROOT file
36   if (!(Digitizer->Write())) {
37     rc = 4;
38     return rc;
39   }
40
41   return rc;
42
43 }