1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
20 //*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
21 //*-- Compleetely redesigned by Dmitri Peressounko (SUBATECH & RRC KI) March 2001
22 /////////////////////////////////////////////////////////////////////////////////////
23 // Wrapping class for reconstruction. Allows to produce reconstruction from
24 // different steps: from previously produced hits,sdigits, etc. Each new reconstruction
25 // flow (e.g. digits, made from them RecPoints, subsequently made TrackSegments,
26 // subsequently made RecParticles) are distinguished by the title of created branches. One can
27 // use this title as a comment, see use case below.
28 // Thanks to getters, one can set
29 // parameters to reconstruction briks. The full set of parameters is saved in the
30 // corresponding branch: e.g. parameters of clusterizer are stored in branch
31 // TreeR::AliEMCALClusterizer with the same title as the branch containing the RecPoints.
32 // TTree does not support overwriting, therefore one can not produce several
33 // branches with the same names and titles - use different titles.
37 // root [0] AliEMCALReconstructioner * r = new AliEMCALReconstructioner("galice.root")
38 // // Set the header file
39 // root [1] r->ExecuteTask()
40 // // Make full chain of reconstruction
42 // // One can specify the title for each branch
43 // root [2] r->SetBranchFileName("RecPoints","RecPoints1") ;
45 // // One can change parameters of reconstruction algorithms
46 // root [3] r->GetClusterizer()->SetEmcLocalMaxCut(0.02)
48 // // One can specify the starting point of the reconstruction and title of all
49 // // branches produced in this pass
50 // root [4] r->StartFrom("AliEMCALClusterizer","Local max cut 0.02")
51 // // means that will use already generated Digits and produce only RecPoints,
52 // // TS and RecParticles
54 // // And finally one can call ExecuteTask() with the following options
55 // root [5] r->ExecuteTask("debug all timing")
56 // // deb - prints the numbers of produced SDigits, Digits etc.
57 // // deb all - prints in addition list of made SDigits, digits etc.
58 // // timing - prints benchmarking results
59 ///////////////////////////////////////////////////////////////////////////////////////////////////
61 // --- ROOT system ---
63 #include "TClonesArray.h"
68 // --- Standard library ---
70 // --- AliRoot header files ---
72 #include "AliEMCALReconstructioner.h"
73 #include "AliEMCALClusterizerv1.h"
74 #include "AliEMCALDigitizer.h"
75 #include "AliEMCALSDigitizer.h"
76 //#include "AliEMCALTrackSegmentMakerv1.h"
77 //#include "AliEMCALPIDv1.h"
78 //#include "AliEMCALFastRecParticle.h"
79 //#include "AliEMCALCpvRecPoint.h"
81 ClassImp(AliEMCALReconstructioner)
83 //____________________________________________________________________________
84 AliEMCALReconstructioner::AliEMCALReconstructioner():TTask("AliEMCALReconstructioner","")
93 fHeaderFileName = "galice.root" ;
95 fIsInitialized = kFALSE ;
99 //____________________________________________________________________________
100 AliEMCALReconstructioner::AliEMCALReconstructioner(const char* headerFile,const char * branchName,Bool_t toSplit):
101 TTask("AliEMCALReconstructioner","")
105 fHeaderFileName = headerFile ;
107 fSDigitsBranch= branchName;
108 fSDigitizer = new AliEMCALSDigitizer(fHeaderFileName.Data(),fSDigitsBranch.Data(),toSplit) ;
111 fDigitsBranch=branchName ;
112 fDigitizer = new AliEMCALDigitizer(fHeaderFileName.Data(),fDigitsBranch.Data(),toSplit) ;
116 fRecPointBranch=branchName ;
117 fClusterizer = new AliEMCALClusterizerv1(fHeaderFileName.Data(),fRecPointBranch.Data(),toSplit) ;
121 // fTSBranch=branchName ;
122 // fTSMaker = new AliEMCALTrackSegmentMakerv1(fHeaderFileName.Data(),fTSBranch.Data(),toSplit) ;
126 // fRecPartBranch=branchName ;
127 // fPID = new AliEMCALPIDv1(fHeaderFileName.Data(),fRecPartBranch.Data(),toSplit) ;
130 fIsInitialized = kTRUE ;
133 //____________________________________________________________________________
134 void AliEMCALReconstructioner::Exec(Option_t *option)
136 //chesk, if the names of branches, which should be made conicide with already
142 //____________________________________________________________________________
143 void AliEMCALReconstructioner::Init()
145 // initiliaze Reconstructioner if necessary: we can not do this in default constructor
150 fSDigitsBranch="Default" ;
151 fSDigitizer = new AliEMCALSDigitizer(fHeaderFileName.Data(),fSDigitsBranch.Data(),fToSplit) ;
154 fDigitsBranch="Default" ;
155 fDigitizer = new AliEMCALDigitizer(fHeaderFileName.Data(),fDigitsBranch.Data(),fToSplit) ;
158 fRecPointBranch="Default" ;
159 fClusterizer = new AliEMCALClusterizerv1(fHeaderFileName.Data(),fRecPointBranch.Data(),fToSplit) ;
162 // fTSBranch="Default" ;
163 // fTSMaker = new AliEMCALTrackSegmentMakerv1(fHeaderFileName.Data(),fTSBranch.Data(),fToSplit) ;
167 // fRecPartBranch="Default" ;
168 // fPID = new AliEMCALPIDv1(fHeaderFileName.Data(),fRecPartBranch.Data(),fToSplit) ;
171 fIsInitialized = kTRUE ;
174 //____________________________________________________________________________
175 AliEMCALReconstructioner::~AliEMCALReconstructioner()
177 // Delete data members if any
181 //____________________________________________________________________________
183 void AliEMCALReconstructioner::Print(Option_t * option)const {
184 // Print reconstructioner data
188 printf(" Reconstruction of the header file ");
189 printf(fHeaderFileName.Data());
190 printf("\n with the following modules:\n");
192 if(fSDigitizer->IsActive()){
194 printf(fSDigitizer->GetName());
195 printf(" to branch : ");
196 printf(fSDigitsBranch.Data());
198 if(fDigitizer->IsActive()){
200 printf(fDigitizer->GetName());
201 printf(" to branch : ");
202 printf(fDigitsBranch.Data());
205 if(fClusterizer->IsActive()){
207 printf(fClusterizer->GetName());
208 printf(" to branch : ");
209 printf(fRecPointBranch.Data());