]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDcreateDigits.C
Extended Global2Local to include slice as input
[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
17 AliTRDdigitizer *Digitizer = new AliTRDdigitizer("digitizer","Digitizer class");
f9428ca8 18 Digitizer->InitDetector();
793ff80c 19
f9428ca8 20 // Set the parameter (for TRF ~200ns)
21 Digitizer->SetGasGain(1600.);
4a0fe73c 22 Digitizer->SetChipGain(8.0);
23 Digitizer->SetNoise(1000.);
24 Digitizer->SetADCinRange(1000.);
25 Digitizer->SetADCoutRange(1023.);
26 Digitizer->SetADCthreshold(0);
793ff80c 27 Digitizer->SetVerbose(1);
28
29 // Create the digits
e2c86a4a 30 if (!(Digitizer->MakeDigits())) {
6244debe 31 rc = 2;
793ff80c 32 return rc;
33 }
34
e2c86a4a 35 // Write the digits into the input file
36 if (!(Digitizer->WriteDigits())) {
6244debe 37 rc = 3;
e2c86a4a 38 return rc;
39 }
40
41 // Save the digitizer class in the AliROOT file
42 if (!(Digitizer->Write())) {
6244debe 43 rc = 4;
e2c86a4a 44 return rc;
45 }
46
793ff80c 47 return rc;
48
49}