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"
32 ClassImp(AliPMDReconstructor)
35 //_____________________________________________________________________________
36 void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
38 // reconstruct clusters from digits file
40 AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader);
43 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++)
45 pmdClus->Digits2RecPoints(iEvent);
51 //_____________________________________________________________________________
52 void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader,
53 AliRawReader *rawReader) const
55 // reconstruct clusters from Raw Data
57 AliPMDClusterFinder pmdClus(runLoader);
58 pmdClus.LoadClusters();
61 while (rawReader->NextEvent()) {
63 pmdClus.Digits2RecPoints(iEvent,rawReader);
67 pmdClus.UnLoadClusters();
71 // ------------------------------------------------------------------------ //
73 void AliPMDReconstructor::FillESD(AliRunLoader* runLoader,AliESD* esd) const
75 AliLoader* loader = runLoader->GetLoader("PMDLoader");
77 Error("Reconstruct", "PMD loader not found");
80 loader->LoadRecPoints("READ");
82 TTree *treeR = loader->TreeR();
83 AliPMDtracker pmdtracker;
84 pmdtracker.LoadClusters(treeR);
85 pmdtracker.Clusters2Tracks(esd);
86 loader->UnloadRecPoints();