]>
Commit | Line | Data |
---|---|---|
05f4fa74 | 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 | /////////////////////////////////////////////////////////////////////////////// | |
17 | // // | |
18 | // class for PMD reconstruction // | |
19 | // // | |
20 | /////////////////////////////////////////////////////////////////////////////// | |
21 | ||
22 | #include "Riostream.h" | |
23 | #include "AliPMDReconstructor.h" | |
24 | #include "AliRunLoader.h" | |
25 | #include "AliRun.h" | |
26 | #include "AliPMDClusterFinder.h" | |
27 | #include "AliPMDtracker.h" | |
01b56f5c | 28 | #include "AliRawReader.h" |
05f4fa74 | 29 | #include "AliESDPmdTrack.h" |
af885e0f | 30 | #include "AliESDEvent.h" |
cb6ed79d | 31 | #include "AliLog.h" |
05f4fa74 | 32 | |
05f4fa74 | 33 | ClassImp(AliPMDReconstructor) |
34 | ||
05f4fa74 | 35 | //_____________________________________________________________________________ |
36 | void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const | |
37 | { | |
01b56f5c | 38 | // reconstruct clusters from digits file |
05f4fa74 | 39 | |
40 | AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader); | |
41 | pmdClus->Load(); | |
42 | for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) | |
43 | { | |
44 | pmdClus->Digits2RecPoints(iEvent); | |
45 | } | |
46 | pmdClus->UnLoad(); | |
47 | delete pmdClus; | |
48 | ||
01b56f5c | 49 | } |
cb6ed79d | 50 | // ------------------------------------------------------------------------ // |
51 | ||
01b56f5c | 52 | void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader, |
53 | AliRawReader *rawReader) const | |
54 | { | |
55 | // reconstruct clusters from Raw Data | |
56 | ||
57 | AliPMDClusterFinder pmdClus(runLoader); | |
58 | pmdClus.LoadClusters(); | |
59 | ||
60 | Int_t iEvent = 0; | |
61 | while (rawReader->NextEvent()) { | |
01b56f5c | 62 | pmdClus.Digits2RecPoints(iEvent,rawReader); |
01b56f5c | 63 | iEvent++; |
64 | } | |
65 | pmdClus.UnLoadClusters(); | |
66 | ||
05f4fa74 | 67 | } |
68 | ||
cb6ed79d | 69 | |
05f4fa74 | 70 | // ------------------------------------------------------------------------ // |
71 | ||
cb6ed79d | 72 | void AliPMDReconstructor::Reconstruct(AliRawReader *rawReader, |
73 | TTree *clustersTree) const | |
05f4fa74 | 74 | { |
cb6ed79d | 75 | // reconstruct clusters from Raw Data |
76 | ||
77 | AliPMDClusterFinder pmdClus; | |
78 | pmdClus.Digits2RecPoints(rawReader, clustersTree); | |
79 | ||
80 | } | |
81 | ||
8fbad6d3 | 82 | // ------------------------------------------------------------------------ // |
83 | void AliPMDReconstructor::Reconstruct(TTree *digitsTree, | |
84 | TTree *clustersTree) const | |
85 | { | |
86 | // reconstruct clusters from Raw Data | |
87 | ||
88 | AliPMDClusterFinder pmdClus; | |
89 | pmdClus.Digits2RecPoints(digitsTree, clustersTree); | |
90 | ||
91 | } | |
92 | ||
cb6ed79d | 93 | // ------------------------------------------------------------------------ // |
05f4fa74 | 94 | |
af885e0f | 95 | //void AliPMDReconstructor::FillESD(AliRunLoader* runLoader,AliESDEvent* esd) const |
cb6ed79d | 96 | //{ |
97 | // AliLoader* loader = runLoader->GetLoader("PMDLoader"); | |
98 | // if (!loader) { | |
99 | // AliError("PMD loader not found"); | |
100 | // return; | |
101 | // } | |
102 | // loader->LoadRecPoints("READ"); | |
103 | // TTree *treeR = loader->TreeR(); | |
104 | // AliPMDtracker pmdtracker; | |
105 | // pmdtracker.LoadClusters(treeR); | |
106 | // pmdtracker.Clusters2Tracks(esd); | |
107 | // loader->UnloadRecPoints(); | |
108 | //} | |
109 | ||
110 | // ------------------------------------------------------------------------ // | |
111 | void AliPMDReconstructor::FillESD(AliRawReader* /*rawReader*/, | |
af885e0f | 112 | TTree* clustersTree, AliESDEvent* esd) const |
cb6ed79d | 113 | { |
05f4fa74 | 114 | AliPMDtracker pmdtracker; |
cb6ed79d | 115 | pmdtracker.LoadClusters(clustersTree); |
05f4fa74 | 116 | pmdtracker.Clusters2Tracks(esd); |
05f4fa74 | 117 | } |
8fbad6d3 | 118 | // ------------------------------------------------------------------------ // |
119 | void AliPMDReconstructor::FillESD(TTree * /*digitsTree*/, | |
af885e0f | 120 | TTree* clustersTree, AliESDEvent* esd) const |
8fbad6d3 | 121 | { |
122 | AliPMDtracker pmdtracker; | |
123 | pmdtracker.LoadClusters(clustersTree); | |
124 | pmdtracker.Clusters2Tracks(esd); | |
125 | } | |
cb6ed79d | 126 | |
127 |