]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/Reconstruct.C
Class that performs Hits2SDigits, SDigits2Digits and Hits2Digits in split file or...
[u/mrichter/AliRoot.git] / PHOS / Reconstruct.C
CommitLineData
aca467af 1// YS Subatech Mai 2002
2
3//Root
4#include "TString.h"
5
6//AliRoot
7#include "PHOS/AliPHOSSDigitizer.h"
8#include "PHOS/AliPHOSDigitizer.h"
9#include "EMCAL/AliEMCALSDigitizer.h"
10#include "EMCAL/AliEMCALDigitizer.h"
11
12void Hits2SDigits( Bool_t split=kFALSE, TString fileName = "galice.root") {
13
14 // usage :
15 // 1. write SDigits in the same file as Hits --------------- (OK)
16 //root [0] .L Reconstruct.C++
17 //root [1] SDigits2Digits()
18 // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
19 //root [0] .L Reconstruct.C++
20 //root [1] SDigits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
21
22 AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ;
23 if (split)
24 sdp->SetSplitFile() ;
25 sdp->ExecuteTask("deb") ;
26
27 AliEMCALSDigitizer * sde = new AliEMCALSDigitizer(fileName) ;
28 if (split)
29 sde->SetSplitFile() ;
30 sde->ExecuteTask("deb") ;
31
32 delete sdp ;
33 delete sde ;
34
35}
36
37//________________________________________________________________________
38void SDigits2Digits( Bool_t split=kFALSE, TString fileName = "galice.root") {
39
40 // usage :
41 // 1. write SDigits in the same file as Hits --------------- (OK)
42 //root [0] .L Reconstruct.C++
43 //root [1] Hits2Digits()
44 // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
45 //root [0] .L Reconstruct.C++
46 //root [1] Hits2Digits(kTRUE) // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)
47
48 AliPHOSDigitizer * dp ;
49 AliEMCALDigitizer * de ;
50 if (split) {
51 dp = new AliPHOSDigitizer("PHOS.SDigits.root") ;
52 dp->SetSplitFile() ; }
53 else
54 dp = new AliPHOSDigitizer(fileName) ;
55
56 dp->ExecuteTask("deb") ;
57
58 if (split) {
59 de = new AliEMCALDigitizer("EMCAL.SDigits.root") ;
60 de->SetSplitFile() ;
61 } else
62 de = new AliEMCALDigitizer(fileName) ;
63
64 de->ExecuteTask("deb") ;
65
66 delete dp ;
67 delete de ;
68}
69
70//________________________________________________________________________
71void Hits2Digits (Bool_t split=kFALSE, TString fileName = "galice.root") {
72 // usage :
73 // 1. write (S)Digits in the same file as Hits --------------- (OK)
74 //root [0] .L Reconstruct.C++
75 //root [1] Hits2Digits()
76 // 2. write (S)Digits in a separate file, one per detector, from Hits --------------- (OK)
77 //root [0] .L Reconstruct.C++
78 //root [1] Hits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
79 // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)
80
81 Hits2SDigits(split, fileName) ;
82 SDigits2Digits(split, fileName) ;
83}