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 // class for TPC reconstruction //
22 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliTPCReconstructor.h"
26 #include "AliRunLoader.h"
28 #include "AliRawReader.h"
29 #include "AliTPCclustererMI.h"
30 #include "AliTPCtrackerMI.h"
31 #include "AliTPCpidESD.h"
32 #include "AliTPCParam.h"
33 #include "AliTPCParamSR.h"
34 #include "AliTPCcalibDB.h"
36 ClassImp(AliTPCReconstructor)
39 AliTPCRecoParam * AliTPCReconstructor::fgkRecoParam =0; // reconstruction parameters
40 Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level
43 AliTPCReconstructor::AliTPCReconstructor():
48 // default constructor
54 // 1. try to get reco parameters from OCDB
56 fgkRecoParam = AliTPCcalibDB::Instance()->GetRecoParam(0);
57 AliInfo("Reconstruction parameters from OCDB used");
59 // 2. If not initialized take default
62 fgkRecoParam = AliTPCRecoParam::GetHighFluxParam();
63 AliError("Default reconstruction parameters used");
67 AliTPCParam* param = GetTPCParam();
69 AliWarning("Loading default TPC parameters !");
70 param = new AliTPCParamSR;
72 fClusterer = new AliTPCclustererMI(param);
75 //_____________________________________________________________________________
76 AliTPCReconstructor::~AliTPCReconstructor()
78 if (fgkRecoParam) delete fgkRecoParam;
79 if (fClusterer) delete fClusterer;
82 //_____________________________________________________________________________
83 void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const {
84 // single event local reconstruction
86 fClusterer->SetInput(digitsTree);
87 fClusterer->SetOutput(clustersTree);
88 fClusterer->Digits2Clusters();
91 //_____________________________________________________________________________
92 void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const {
93 // single event local reconstruction
94 // of TPC data starting from raw data
95 TString option = GetOption();
96 if (option.Contains("OldRCUFormat"))
97 fClusterer->SetOldRCUFormat(kTRUE);
99 fClusterer->SetOutput(clustersTree);
100 fClusterer->Digits2Clusters(rawReader);
103 //_____________________________________________________________________________
104 AliTracker* AliTPCReconstructor::CreateTracker() const
106 // create a TPC tracker
108 AliTPCParam* param = GetTPCParam();
110 AliWarning("Loading default TPC parameters !");
111 param = new AliTPCParamSR;
113 param->ReadGeoMatrices();
114 return new AliTPCtrackerMI(param);
117 //_____________________________________________________________________________
118 void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/,
119 AliESDEvent* esd) const
123 Double_t parTPC[] = {47., 0.07, 5.};
124 AliTPCpidESD tpcPID(parTPC);
129 //_____________________________________________________________________________
130 AliTPCParam* AliTPCReconstructor::GetTPCParam() const
132 // get the TPC parameters
134 AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters();