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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // class for PMD reconstruction //
20 ///////////////////////////////////////////////////////////////////////////////
22 #include "Riostream.h"
23 #include "AliPMDReconstructor.h"
24 #include "AliRunLoader.h"
26 #include "AliPMDClusterFinder.h"
27 #include "AliPMDtracker.h"
28 #include "AliRawReader.h"
29 #include "AliESDPmdTrack.h"
33 ClassImp(AliPMDReconstructor)
35 //_____________________________________________________________________________
36 void AliPMDReconstructor::Init(AliRunLoader* runLoader)
38 // Initialize the reconstructor
39 AliDebug(1, Form("Init called with runloader 0x%x", runLoader));
42 AliWarning("Init : No run loader");
47 //_____________________________________________________________________________
48 void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
50 // reconstruct clusters from digits file
52 AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader);
54 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++)
56 pmdClus->Digits2RecPoints(iEvent);
62 // ------------------------------------------------------------------------ //
64 void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader,
65 AliRawReader *rawReader) const
67 // reconstruct clusters from Raw Data
69 AliPMDClusterFinder pmdClus(runLoader);
70 pmdClus.LoadClusters();
73 while (rawReader->NextEvent()) {
74 pmdClus.Digits2RecPoints(iEvent,rawReader);
77 pmdClus.UnLoadClusters();
82 // ------------------------------------------------------------------------ //
84 void AliPMDReconstructor::Reconstruct(AliRawReader *rawReader,
85 TTree *clustersTree) const
87 // reconstruct clusters from Raw Data
89 AliPMDClusterFinder pmdClus;
90 pmdClus.Digits2RecPoints(rawReader, clustersTree);
94 // ------------------------------------------------------------------------ //
96 //void AliPMDReconstructor::FillESD(AliRunLoader* runLoader,AliESD* esd) const
98 // AliLoader* loader = runLoader->GetLoader("PMDLoader");
100 // AliError("PMD loader not found");
103 // loader->LoadRecPoints("READ");
104 // TTree *treeR = loader->TreeR();
105 // AliPMDtracker pmdtracker;
106 // pmdtracker.LoadClusters(treeR);
107 // pmdtracker.Clusters2Tracks(esd);
108 // loader->UnloadRecPoints();
111 // ------------------------------------------------------------------------ //
112 void AliPMDReconstructor::FillESD(AliRawReader* /*rawReader*/,
113 TTree* clustersTree, AliESD* esd) const
115 AliPMDtracker pmdtracker;
116 pmdtracker.LoadClusters(clustersTree);
117 pmdtracker.Clusters2Tracks(esd);