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 "AliTPCclustererMI.h"
29 #include "AliTPCtrackerMI.h"
30 #include "AliTPCpidESD.h"
33 ClassImp(AliTPCReconstructor)
35 Double_t AliTPCReconstructor::fgCtgRange = 1.05;
37 //_____________________________________________________________________________
38 void AliTPCReconstructor::Reconstruct(AliRunLoader* runLoader) const
40 // reconstruct clusters
42 AliLoader* loader = runLoader->GetLoader("TPCLoader");
44 Error("Reconstruct", "TPC loader not found");
47 loader->LoadRecPoints("recreate");
48 loader->LoadDigits("read");
50 AliTPCParam* param = GetTPCParam(runLoader);
52 AliTPCclustererMI clusterer(param);
53 Int_t nEvents = runLoader->GetNumberOfEvents();
55 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
56 runLoader->GetEvent(iEvent);
58 TTree* treeClusters = loader->TreeR();
60 loader->MakeTree("R");
61 treeClusters = loader->TreeR();
63 TTree* treeDigits = loader->TreeD();
65 Error("Reconstruct", "Can't get digits tree !");
69 clusterer.SetInput(treeDigits);
70 clusterer.SetOutput(treeClusters);
71 clusterer.Digits2Clusters();
73 loader->WriteRecPoints("OVERWRITE");
76 loader->UnloadRecPoints();
77 loader->UnloadDigits();
80 //_____________________________________________________________________________
81 AliTracker* AliTPCReconstructor::CreateTracker(AliRunLoader* runLoader) const
83 // create a TPC tracker
85 AliTPCParam* param = GetTPCParam(runLoader);
86 if (!param) return NULL;
87 return new AliTPCtrackerMI(param);
90 //_____________________________________________________________________________
91 void AliTPCReconstructor::FillESD(AliRunLoader* /*runLoader*/,
96 Double_t parTPC[] = {47., 0.10, 10.};
97 AliTPCpidESD tpcPID(parTPC);
102 //_____________________________________________________________________________
103 AliTPCParam* AliTPCReconstructor::GetTPCParam(AliRunLoader* runLoader) const
105 // get the TPC parameters
107 TDirectory* saveDir = gDirectory;
108 runLoader->CdGAFile();
110 AliTPCParam* param = (AliTPCParam*) gDirectory->Get("75x40_100x60_150x60");
111 if (!param) Error("GetTPCParam", "no TPC parameters found");