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"
35 #include "AliTracker.h"
38 ClassImp(AliTPCReconstructor)
41 Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level
44 AliTPCReconstructor::AliTPCReconstructor():
49 // default constructor
53 AliTPCcalibDB * calib = AliTPCcalibDB::Instance();
54 const AliMagF * field = AliTracker::GetFieldMap();
55 if (field) { // Set correctly the magnetic field in the ExB calculation
56 calib->SetExBField(field->SolenoidField());
58 AliTPCParam* param = GetTPCParam();
60 AliWarning("Loading default TPC parameters !");
61 param = new AliTPCParamSR;
63 fClusterer = new AliTPCclustererMI(param);
66 AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/):
71 // Dummy copu constructor
75 AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){
82 //_____________________________________________________________________________
83 AliTPCReconstructor::~AliTPCReconstructor()
85 if (fClusterer) delete fClusterer;
88 //_____________________________________________________________________________
89 void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const {
90 // single event local reconstruction
92 fClusterer->SetInput(digitsTree);
93 fClusterer->SetOutput(clustersTree);
94 fClusterer->Digits2Clusters();
97 //_____________________________________________________________________________
98 void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const {
99 // single event local reconstruction
100 // of TPC data starting from raw data
102 fClusterer->SetOutput(clustersTree);
103 fClusterer->Digits2Clusters(rawReader);
106 //_____________________________________________________________________________
107 AliTracker* AliTPCReconstructor::CreateTracker() const
109 // create a TPC tracker
111 AliTPCParam* param = GetTPCParam();
113 AliWarning("Loading default TPC parameters !");
114 param = new AliTPCParamSR;
116 param->ReadGeoMatrices();
117 return new AliTPCtrackerMI(param);
120 //_____________________________________________________________________________
121 void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/,
122 AliESDEvent* esd) const
126 Double_t parTPC[] = {47., 0.07, 5.};
127 AliTPCpidESD tpcPID(parTPC);
132 //_____________________________________________________________________________
133 AliTPCParam* AliTPCReconstructor::GetTPCParam() const
135 // get the TPC parameters
137 AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters();