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 = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
55 calib->SetExBField(field->SolenoidField());
56 AliTPCParam* param = GetTPCParam();
58 AliWarning("Loading default TPC parameters !");
59 param = new AliTPCParamSR;
61 fClusterer = new AliTPCclustererMI(param);
64 AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/):
69 // Dummy copu constructor
73 AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){
80 //_____________________________________________________________________________
81 AliTPCReconstructor::~AliTPCReconstructor()
83 if (fClusterer) delete fClusterer;
86 //_____________________________________________________________________________
87 void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const {
88 // single event local reconstruction
90 fClusterer->SetInput(digitsTree);
91 fClusterer->SetOutput(clustersTree);
92 fClusterer->Digits2Clusters();
95 //_____________________________________________________________________________
96 void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const {
97 // single event local reconstruction
98 // of TPC data starting from raw data
100 fClusterer->SetOutput(clustersTree);
101 fClusterer->Digits2Clusters(rawReader);
104 //_____________________________________________________________________________
105 AliTracker* AliTPCReconstructor::CreateTracker() const
107 // create a TPC tracker
109 AliTPCParam* param = GetTPCParam();
111 AliWarning("Loading default TPC parameters !");
112 param = new AliTPCParamSR;
114 param->ReadGeoMatrices();
115 return new AliTPCtrackerMI(param);
118 //_____________________________________________________________________________
119 void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/,
120 AliESDEvent* esd) const
124 Double_t parTPC[] = {50., 0.07, 5.}; // MIP nnormalized to channel 50 -MI
125 AliTPCpidESD tpcPID(parTPC);
130 //_____________________________________________________________________________
131 AliTPCParam* AliTPCReconstructor::GetTPCParam() const
133 // get the TPC parameters
135 AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters();