]>
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" |
30 | #include "AliESD.h" | |
cb6ed79d | 31 | #include "AliLog.h" |
05f4fa74 | 32 | |
05f4fa74 | 33 | ClassImp(AliPMDReconstructor) |
34 | ||
cb6ed79d | 35 | //_____________________________________________________________________________ |
36 | void AliPMDReconstructor::Init(AliRunLoader* runLoader) | |
37 | { | |
38 | // Initialize the reconstructor | |
39 | AliDebug(1, Form("Init called with runloader 0x%x", runLoader)); | |
40 | if (!runLoader) | |
41 | { | |
42 | AliWarning("Init : No run loader"); | |
43 | return; | |
44 | } | |
45 | } | |
46 | ||
05f4fa74 | 47 | //_____________________________________________________________________________ |
48 | void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const | |
49 | { | |
01b56f5c | 50 | // reconstruct clusters from digits file |
05f4fa74 | 51 | |
52 | AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader); | |
53 | pmdClus->Load(); | |
54 | for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) | |
55 | { | |
56 | pmdClus->Digits2RecPoints(iEvent); | |
57 | } | |
58 | pmdClus->UnLoad(); | |
59 | delete pmdClus; | |
60 | ||
01b56f5c | 61 | } |
cb6ed79d | 62 | // ------------------------------------------------------------------------ // |
63 | ||
01b56f5c | 64 | void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader, |
65 | AliRawReader *rawReader) const | |
66 | { | |
67 | // reconstruct clusters from Raw Data | |
68 | ||
69 | AliPMDClusterFinder pmdClus(runLoader); | |
70 | pmdClus.LoadClusters(); | |
71 | ||
72 | Int_t iEvent = 0; | |
73 | while (rawReader->NextEvent()) { | |
01b56f5c | 74 | pmdClus.Digits2RecPoints(iEvent,rawReader); |
01b56f5c | 75 | iEvent++; |
76 | } | |
77 | pmdClus.UnLoadClusters(); | |
78 | ||
05f4fa74 | 79 | } |
80 | ||
cb6ed79d | 81 | |
05f4fa74 | 82 | // ------------------------------------------------------------------------ // |
83 | ||
cb6ed79d | 84 | void AliPMDReconstructor::Reconstruct(AliRawReader *rawReader, |
85 | TTree *clustersTree) const | |
05f4fa74 | 86 | { |
cb6ed79d | 87 | // reconstruct clusters from Raw Data |
88 | ||
89 | AliPMDClusterFinder pmdClus; | |
90 | pmdClus.Digits2RecPoints(rawReader, clustersTree); | |
91 | ||
92 | } | |
93 | ||
94 | // ------------------------------------------------------------------------ // | |
05f4fa74 | 95 | |
cb6ed79d | 96 | //void AliPMDReconstructor::FillESD(AliRunLoader* runLoader,AliESD* esd) const |
97 | //{ | |
98 | // AliLoader* loader = runLoader->GetLoader("PMDLoader"); | |
99 | // if (!loader) { | |
100 | // AliError("PMD loader not found"); | |
101 | // return; | |
102 | // } | |
103 | // loader->LoadRecPoints("READ"); | |
104 | // TTree *treeR = loader->TreeR(); | |
105 | // AliPMDtracker pmdtracker; | |
106 | // pmdtracker.LoadClusters(treeR); | |
107 | // pmdtracker.Clusters2Tracks(esd); | |
108 | // loader->UnloadRecPoints(); | |
109 | //} | |
110 | ||
111 | // ------------------------------------------------------------------------ // | |
112 | void AliPMDReconstructor::FillESD(AliRawReader* /*rawReader*/, | |
113 | TTree* clustersTree, AliESD* esd) const | |
114 | { | |
05f4fa74 | 115 | AliPMDtracker pmdtracker; |
cb6ed79d | 116 | pmdtracker.LoadClusters(clustersTree); |
05f4fa74 | 117 | pmdtracker.Clusters2Tracks(esd); |
05f4fa74 | 118 | } |
cb6ed79d | 119 | |
120 |