]>
Commit | Line | Data |
---|---|---|
59697224 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // base class for reconstruction algorithms // | |
21 | // // | |
c757bafd | 22 | // Derived classes should implement a default constructor and // |
23 | // the virtual methods // | |
59697224 | 24 | // - Reconstruct : to perform the local reconstruction for all events // |
25 | // - FillESD : to fill the ESD for the current event // | |
26 | // // | |
27 | // The reconstructor classes for the barrel detectors should in addition // | |
28 | // implement the method // | |
29 | // - CreateTracker : to create a tracker object for the barrel detector // | |
30 | // // | |
31 | // The ITS reconstructor should in addition implement the method // | |
32 | // - CreateVertexer : to create an object for the vertex finding // | |
33 | // // | |
34 | /////////////////////////////////////////////////////////////////////////////// | |
35 | ||
36 | ||
f37d970d | 37 | #include "AliLog.h" |
59697224 | 38 | #include "AliReconstructor.h" |
7e88424f | 39 | #include <TClass.h> |
c757bafd | 40 | #include <TString.h> |
59697224 | 41 | |
42 | ||
43 | ClassImp(AliReconstructor) | |
c757bafd | 44 | |
ac4a7581 | 45 | const AliDetectorRecoParam* AliReconstructor::fgRecoParam[AliReconstruction::kNDetectors] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; |
c757bafd | 46 | |
b26c3770 | 47 | //_____________________________________________________________________________ |
48 | void AliReconstructor::ConvertDigits(AliRawReader* /*rawReader*/, | |
49 | TTree* /*digitsTree*/) const | |
50 | { | |
51 | // convert raw data digits into digit objects in a root tree | |
52 | ||
53 | AliError("conversion of raw data digits into digit objects not implemented"); | |
54 | } | |
55 | ||
56 | ||
57 | //_____________________________________________________________________________ | |
58 | void AliReconstructor::Reconstruct(TTree* /*digitsTree*/, | |
59 | TTree* /*clustersTree*/) const | |
60 | { | |
61 | // run the local reconstruction | |
62 | ||
63 | AliError("local event reconstruction not implemented"); | |
64 | } | |
65 | ||
66 | //_____________________________________________________________________________ | |
67 | void AliReconstructor::Reconstruct(AliRawReader* /*rawReader*/, | |
68 | TTree* /*clustersTree*/) const | |
69 | { | |
70 | // run the local reconstruction with raw data input | |
71 | ||
72 | AliError("local event reconstruction not implemented for raw data input"); | |
73 | } | |
74 | ||
b26c3770 | 75 | //_____________________________________________________________________________ |
76 | void AliReconstructor::FillESD(TTree* /*digitsTree*/, TTree* /*clustersTree*/, | |
af885e0f | 77 | AliESDEvent* /*esd*/) const |
b26c3770 | 78 | { |
79 | // fill the ESD. | |
80 | // by default nothing is done | |
81 | ||
82 | } | |
83 | ||
84 | //_____________________________________________________________________________ | |
85 | void AliReconstructor::FillESD(AliRawReader* /*rawReader*/, | |
af885e0f | 86 | TTree* clustersTree, AliESDEvent* esd) const |
b26c3770 | 87 | { |
88 | // fill the ESD in case of raw data input. | |
89 | // by default the FillESD method for MC is called | |
90 | ||
91 | FillESD((TTree*)NULL, clustersTree, esd); | |
92 | } | |
93 | ||
c757bafd | 94 | //_____________________________________________________________________________ |
95 | const char* AliReconstructor::GetDetectorName() const | |
96 | { | |
97 | // get the name of the detector | |
98 | ||
99 | static TString detName; | |
100 | detName = GetName(); | |
101 | detName.Remove(0, 3); | |
102 | detName.Remove(detName.Index("Reconstructor")); | |
103 | return detName.Data(); | |
104 | } | |
7e88424f | 105 | |
106 | //_____________________________________________________________________________ | |
107 | void AliReconstructor::SetRecoParam(const AliDetectorRecoParam *par) | |
108 | { | |
109 | // To be implemented by the detectors. | |
110 | // As soon as we manage to remove the static members | |
111 | // and method in the detector reconstructors, we will | |
112 | // implemented this method in the base class and remove | |
113 | // the detectors implementations. | |
114 | Int_t iDet = AliReconstruction::GetDetIndex(GetDetectorName()); | |
115 | ||
116 | if (iDet >= 0) | |
117 | fgRecoParam[iDet] = par; | |
118 | else | |
119 | AliError(Form("Invalid detector index for (%s)",GetDetectorName())); | |
120 | ||
121 | return; | |
122 | } | |
123 | ||
124 | //_____________________________________________________________________________ | |
125 | const AliDetectorRecoParam* AliReconstructor::GetRecoParam(Int_t iDet) | |
126 | { | |
127 | // Get the current reconstruciton parameters | |
128 | // for a given detector | |
ac4a7581 | 129 | if (iDet >= 0 && iDet < AliReconstruction::kNDetectors) |
7e88424f | 130 | return fgRecoParam[iDet]; |
131 | else { | |
132 | AliErrorClass(Form("Invalid detector index (%d)",iDet)); | |
133 | return NULL; | |
134 | } | |
135 | } |