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