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)
36 //_____________________________________________________________________________
37 void AliTPCReconstructor::Reconstruct(AliRunLoader* runLoader) const
39 // reconstruct clusters
41 AliLoader* loader = runLoader->GetLoader("TPCLoader");
43 Error("Reconstruct", "TPC loader not found");
46 loader->LoadRecPoints("recreate");
47 loader->LoadDigits("read");
49 AliTPCParam* param = GetTPCParam(runLoader);
51 AliTPCclustererMI clusterer(param);
52 Int_t nEvents = runLoader->GetNumberOfEvents();
54 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
55 runLoader->GetEvent(iEvent);
57 TTree* treeClusters = loader->TreeR();
59 loader->MakeTree("R");
60 treeClusters = loader->TreeR();
62 TTree* treeDigits = loader->TreeD();
64 Error("Reconstruct", "Can't get digits tree !");
68 clusterer.SetInput(treeDigits);
69 clusterer.SetOutput(treeClusters);
70 clusterer.Digits2Clusters();
72 loader->WriteRecPoints("OVERWRITE");
75 loader->UnloadRecPoints();
76 loader->UnloadDigits();
79 //_____________________________________________________________________________
80 AliTracker* AliTPCReconstructor::CreateTracker(AliRunLoader* runLoader) const
82 // create a TPC tracker
84 AliTPCParam* param = GetTPCParam(runLoader);
85 if (!param) return NULL;
86 return new AliTPCtrackerMI(param);
89 //_____________________________________________________________________________
90 void AliTPCReconstructor::FillESD(AliRunLoader* /*runLoader*/,
95 Double_t parTPC[] = {47., 0.10, 10.};
96 AliTPCpidESD tpcPID(parTPC);
101 //_____________________________________________________________________________
102 AliTPCParam* AliTPCReconstructor::GetTPCParam(AliRunLoader* runLoader) const
104 // get the TPC parameters
106 TDirectory* saveDir = gDirectory;
107 runLoader->CdGAFile();
109 AliTPCParam* param = (AliTPCParam*) gDirectory->Get("75x40_100x60_150x60");
110 if (!param) Error("GetTPCParam", "no TPC parameters found");