]>
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 | // class for TPC reconstruction // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | ||
25 | #include "AliTPCReconstructor.h" | |
26 | #include "AliRunLoader.h" | |
27 | #include "AliRun.h" | |
38e6e547 | 28 | #include "AliRawReader.h" |
59697224 | 29 | #include "AliTPCclustererMI.h" |
30 | #include "AliTPCtrackerMI.h" | |
31 | #include "AliTPCpidESD.h" | |
4fb6310b | 32 | #include "AliTPCParam.h" |
90c7886e | 33 | #include "AliTPCParamSR.h" |
3d37b790 | 34 | #include "AliTPCcalibDB.h" |
59697224 | 35 | |
36 | ClassImp(AliTPCReconstructor) | |
37 | ||
194b0609 | 38 | |
194b0609 | 39 | Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level |
40 | ||
41 | ||
3464c690 | 42 | AliTPCReconstructor::AliTPCReconstructor(): |
43 | AliReconstructor(), | |
44 | fClusterer(NULL) | |
45 | { | |
194b0609 | 46 | // |
47 | // default constructor | |
48 | // | |
7a9e557b | 49 | // |
50 | // | |
5f85753f | 51 | |
3464c690 | 52 | AliTPCParam* param = GetTPCParam(); |
53 | if (!param) { | |
54 | AliWarning("Loading default TPC parameters !"); | |
55 | param = new AliTPCParamSR; | |
56 | } | |
57 | fClusterer = new AliTPCclustererMI(param); | |
194b0609 | 58 | } |
59 | ||
3464c690 | 60 | //_____________________________________________________________________________ |
61 | AliTPCReconstructor::~AliTPCReconstructor() | |
62 | { | |
3464c690 | 63 | if (fClusterer) delete fClusterer; |
64 | } | |
194b0609 | 65 | |
3464c690 | 66 | //_____________________________________________________________________________ |
67 | void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { | |
68 | // single event local reconstruction | |
69 | // of TPC data | |
70 | fClusterer->SetInput(digitsTree); | |
71 | fClusterer->SetOutput(clustersTree); | |
72 | fClusterer->Digits2Clusters(); | |
73 | } | |
74 | ||
59697224 | 75 | //_____________________________________________________________________________ |
3464c690 | 76 | void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const { |
77 | // single event local reconstruction | |
78 | // of TPC data starting from raw data | |
3464c690 | 79 | |
80 | fClusterer->SetOutput(clustersTree); | |
81 | fClusterer->Digits2Clusters(rawReader); | |
82 | } | |
83 | ||
84 | //_____________________________________________________________________________ | |
d76c31f4 | 85 | AliTracker* AliTPCReconstructor::CreateTracker() const |
59697224 | 86 | { |
87 | // create a TPC tracker | |
88 | ||
3464c690 | 89 | AliTPCParam* param = GetTPCParam(); |
90c7886e | 90 | if (!param) { |
91 | AliWarning("Loading default TPC parameters !"); | |
92 | param = new AliTPCParamSR; | |
93 | } | |
4fb6310b | 94 | param->ReadGeoMatrices(); |
59697224 | 95 | return new AliTPCtrackerMI(param); |
96 | } | |
97 | ||
98 | //_____________________________________________________________________________ | |
d76c31f4 | 99 | void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/, |
af885e0f | 100 | AliESDEvent* esd) const |
59697224 | 101 | { |
102 | // make PID | |
103 | ||
7a8614f3 | 104 | Double_t parTPC[] = {47., 0.07, 5.}; |
59697224 | 105 | AliTPCpidESD tpcPID(parTPC); |
106 | tpcPID.MakePID(esd); | |
107 | } | |
108 | ||
109 | ||
110 | //_____________________________________________________________________________ | |
3464c690 | 111 | AliTPCParam* AliTPCReconstructor::GetTPCParam() const |
59697224 | 112 | { |
113 | // get the TPC parameters | |
114 | ||
3464c690 | 115 | AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters(); |
3d37b790 | 116 | |
6d75e4b6 | 117 | return param; |
59697224 | 118 | } |