From aca467af50a551ee5f2befeca3b8baf70b82e3cf Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 31 May 2002 16:29:42 +0000 Subject: [PATCH] Class that performs Hits2SDigits, SDigits2Digits and Hits2Digits in split file or not for both PHOS and EMCAL --- PHOS/Reconstruct.C | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 PHOS/Reconstruct.C diff --git a/PHOS/Reconstruct.C b/PHOS/Reconstruct.C new file mode 100644 index 00000000000..2cf436e2731 --- /dev/null +++ b/PHOS/Reconstruct.C @@ -0,0 +1,83 @@ +// YS Subatech Mai 2002 + +//Root +#include "TString.h" + +//AliRoot +#include "PHOS/AliPHOSSDigitizer.h" +#include "PHOS/AliPHOSDigitizer.h" +#include "EMCAL/AliEMCALSDigitizer.h" +#include "EMCAL/AliEMCALDigitizer.h" + +void Hits2SDigits( Bool_t split=kFALSE, TString fileName = "galice.root") { + + // usage : + // 1. write SDigits in the same file as Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] SDigits2Digits() + // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] SDigits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL) + + AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ; + if (split) + sdp->SetSplitFile() ; + sdp->ExecuteTask("deb") ; + + AliEMCALSDigitizer * sde = new AliEMCALSDigitizer(fileName) ; + if (split) + sde->SetSplitFile() ; + sde->ExecuteTask("deb") ; + + delete sdp ; + delete sde ; + +} + +//________________________________________________________________________ +void SDigits2Digits( Bool_t split=kFALSE, TString fileName = "galice.root") { + + // usage : + // 1. write SDigits in the same file as Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] Hits2Digits() + // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] Hits2Digits(kTRUE) // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL) + + AliPHOSDigitizer * dp ; + AliEMCALDigitizer * de ; + if (split) { + dp = new AliPHOSDigitizer("PHOS.SDigits.root") ; + dp->SetSplitFile() ; } + else + dp = new AliPHOSDigitizer(fileName) ; + + dp->ExecuteTask("deb") ; + + if (split) { + de = new AliEMCALDigitizer("EMCAL.SDigits.root") ; + de->SetSplitFile() ; + } else + de = new AliEMCALDigitizer(fileName) ; + + de->ExecuteTask("deb") ; + + delete dp ; + delete de ; +} + +//________________________________________________________________________ +void Hits2Digits (Bool_t split=kFALSE, TString fileName = "galice.root") { + // usage : + // 1. write (S)Digits in the same file as Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] Hits2Digits() + // 2. write (S)Digits in a separate file, one per detector, from Hits --------------- (OK) + //root [0] .L Reconstruct.C++ + //root [1] Hits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL) + // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL) + + Hits2SDigits(split, fileName) ; + SDigits2Digits(split, fileName) ; +} -- 2.31.1