]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDcreateDigits.C
Reintroduce the hit flags
[u/mrichter/AliRoot.git] / TRD / AliTRDcreateDigits.C
CommitLineData
793ff80c 1Int_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
50ecb1bd 17 AliTRDdigitizer *digitizer = new AliTRDdigitizer("TRDdigitizer","Digitizer class");
abaf1f1d 18 digitizer->InitDetector();
793ff80c 19
29b902d4 20 // Set the parameter
21 digitizer->SetTailCancelation(0);
abaf1f1d 22 digitizer->SetADCthreshold(0);
29b902d4 23 digitizer->SetDebug(1);
793ff80c 24
25 // Create the digits
abaf1f1d 26 if (!(digitizer->MakeDigits())) {
6244debe 27 rc = 2;
793ff80c 28 return rc;
29 }
30
e2c86a4a 31 // Write the digits into the input file
abaf1f1d 32 if (!(digitizer->MakeBranch())) {
6244debe 33 rc = 3;
e2c86a4a 34 return rc;
35 }
36
abaf1f1d 37 // Write the digits into the input file
38 if (!(digitizer->WriteDigits())) {
39 rc = 4;
40 return rc;
41 }
42
e2c86a4a 43 // Save the digitizer class in the AliROOT file
abaf1f1d 44 if (!(digitizer->Write())) {
6244debe 45 rc = 4;
e2c86a4a 46 return rc;
47 }
48
793ff80c 49 return rc;
50
51}