]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcreateDigits.C
Segmentation in non bending plane for stations 4 and 5 like for station 3:
[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   // Initialize the TRD and the geometry
20   if (!(Digitizer->InitDetector())) {
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
31   if (!(Digitizer->MakeDigits())) {
32     rc = 3;
33     return rc;
34   }
35
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
48   return rc;
49
50 }