]>
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" | |
10d100d4 | 31 | //#include "AliTPCpidESD.h" |
4fb6310b | 32 | #include "AliTPCParam.h" |
90c7886e | 33 | #include "AliTPCParamSR.h" |
3d37b790 | 34 | #include "AliTPCcalibDB.h" |
7bab76cf | 35 | #include "AliTracker.h" |
36 | #include "AliMagF.h" | |
59697224 | 37 | |
38 | ClassImp(AliTPCReconstructor) | |
39 | ||
194b0609 | 40 | |
7f7ed03b | 41 | Int_t AliTPCReconstructor::fgStreamLevel = 1; // stream (debug) level |
194b0609 | 42 | |
43 | ||
3464c690 | 44 | AliTPCReconstructor::AliTPCReconstructor(): |
45 | AliReconstructor(), | |
46 | fClusterer(NULL) | |
47 | { | |
194b0609 | 48 | // |
49 | // default constructor | |
50 | // | |
7a9e557b | 51 | // |
52 | // | |
7bab76cf | 53 | AliTPCcalibDB * calib = AliTPCcalibDB::Instance(); |
745b6db9 | 54 | const AliMagF * field = (AliMagF*)TGeoGlobalMagField::Instance()->GetField(); |
0a997b33 | 55 | calib->SetExBField(field); |
3464c690 | 56 | AliTPCParam* param = GetTPCParam(); |
57 | if (!param) { | |
58 | AliWarning("Loading default TPC parameters !"); | |
59 | param = new AliTPCParamSR; | |
60 | } | |
61 | fClusterer = new AliTPCclustererMI(param); | |
194b0609 | 62 | } |
63 | ||
0ffd2ae1 | 64 | AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/): |
65 | AliReconstructor(), | |
66 | fClusterer(NULL) | |
67 | { | |
68 | // | |
69 | // Dummy copu constructor | |
70 | // | |
71 | } | |
72 | ||
73 | AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){ | |
74 | // | |
75 | // dummy operator | |
76 | // | |
77 | return *this; | |
78 | } | |
79 | ||
3464c690 | 80 | //_____________________________________________________________________________ |
81 | AliTPCReconstructor::~AliTPCReconstructor() | |
82 | { | |
3464c690 | 83 | if (fClusterer) delete fClusterer; |
84 | } | |
194b0609 | 85 | |
3464c690 | 86 | //_____________________________________________________________________________ |
87 | void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { | |
88 | // single event local reconstruction | |
89 | // of TPC data | |
90 | fClusterer->SetInput(digitsTree); | |
91 | fClusterer->SetOutput(clustersTree); | |
92 | fClusterer->Digits2Clusters(); | |
93 | } | |
94 | ||
59697224 | 95 | //_____________________________________________________________________________ |
3464c690 | 96 | void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const { |
97 | // single event local reconstruction | |
98 | // of TPC data starting from raw data | |
3464c690 | 99 | |
100 | fClusterer->SetOutput(clustersTree); | |
101 | fClusterer->Digits2Clusters(rawReader); | |
102 | } | |
103 | ||
104 | //_____________________________________________________________________________ | |
d76c31f4 | 105 | AliTracker* AliTPCReconstructor::CreateTracker() const |
59697224 | 106 | { |
107 | // create a TPC tracker | |
108 | ||
3464c690 | 109 | AliTPCParam* param = GetTPCParam(); |
90c7886e | 110 | if (!param) { |
111 | AliWarning("Loading default TPC parameters !"); | |
112 | param = new AliTPCParamSR; | |
113 | } | |
4fb6310b | 114 | param->ReadGeoMatrices(); |
59697224 | 115 | return new AliTPCtrackerMI(param); |
116 | } | |
117 | ||
118 | //_____________________________________________________________________________ | |
d76c31f4 | 119 | void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/, |
937a076a | 120 | AliESDEvent* /*esd*/) const |
59697224 | 121 | { |
122 | // make PID | |
10d100d4 | 123 | /* Now done in AliESDpid |
83afd539 | 124 | Double_t parTPC[] = {50., 0.07, 5.}; // MIP nnormalized to channel 50 -MI |
59697224 | 125 | AliTPCpidESD tpcPID(parTPC); |
126 | tpcPID.MakePID(esd); | |
10d100d4 | 127 | */ |
59697224 | 128 | } |
129 | ||
130 | ||
131 | //_____________________________________________________________________________ | |
3464c690 | 132 | AliTPCParam* AliTPCReconstructor::GetTPCParam() const |
59697224 | 133 | { |
134 | // get the TPC parameters | |
135 | ||
3464c690 | 136 | AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters(); |
3d37b790 | 137 | |
6d75e4b6 | 138 | return param; |
59697224 | 139 | } |