]>
Commit | Line | Data |
---|---|---|
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 | /* $Id$ */ | |
16 | ||
17 | /* History of cvs commits: | |
18 | * | |
19 | * $Log$ | |
20 | * Revision 1.28 2007/08/07 14:12:03 kharlov | |
21 | * Quality assurance added (Yves Schutz) | |
22 | * | |
23 | * Revision 1.27 2006/08/25 16:56:30 kharlov | |
24 | * Compliance with Effective C++ | |
25 | * | |
26 | * Revision 1.26 2006/08/25 16:00:53 kharlov | |
27 | * Compliance with Effective C++AliPHOSHit.cxx | |
28 | * | |
29 | * Revision 1.25 2005/05/28 14:19:05 schutz | |
30 | * Compilation warnings fixed by T.P. | |
31 | * | |
32 | */ | |
33 | ||
34 | //_________________________________________________________________________ | |
35 | // Algorithm Base class to construct PHOS track segments | |
36 | // Associates EMC and PPSD clusters | |
37 | // Unfolds the EMC cluster | |
38 | //*-- | |
39 | //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH) | |
40 | ||
41 | ||
42 | // --- ROOT system --- | |
43 | #include "TTree.h" | |
44 | ||
45 | // --- Standard library --- | |
46 | ||
47 | // --- AliRoot header files --- | |
48 | #include "AliPHOSTrackSegmentMaker.h" | |
49 | #include "AliPHOSQualAssDataMaker.h" | |
50 | ||
51 | ClassImp( AliPHOSTrackSegmentMaker) | |
52 | ||
53 | ||
54 | //____________________________________________________________________________ | |
55 | AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : | |
56 | TObject(), | |
57 | fESD(0), | |
58 | fQADM(0x0), | |
59 | fGeom(0), | |
60 | fEMCRecPoints(0), | |
61 | fCPVRecPoints(0) | |
62 | { | |
63 | // ctor | |
64 | } | |
65 | ||
66 | //____________________________________________________________________________ | |
67 | AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(AliPHOSGeometry *geom): | |
68 | TObject(), | |
69 | fESD(0), | |
70 | fQADM(0x0), | |
71 | fGeom(geom), | |
72 | fEMCRecPoints(0), | |
73 | fCPVRecPoints(0) | |
74 | { | |
75 | // ctor | |
76 | fQADM = new AliPHOSQualAssDataMaker() ; //!Quality Assurance Data Maker | |
77 | GetQualAssDataMaker()->Init(AliQualAss::kTRACKSEGMENTS) ; | |
78 | } | |
79 | ||
80 | //____________________________________________________________________________ | |
81 | AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMaker & tsmaker) : | |
82 | TObject(tsmaker), | |
83 | fESD(tsmaker.GetESD()), | |
84 | fQADM(tsmaker.fQADM), | |
85 | fGeom(tsmaker.fGeom), | |
86 | fEMCRecPoints(tsmaker.fEMCRecPoints), | |
87 | fCPVRecPoints(tsmaker.fCPVRecPoints) | |
88 | { | |
89 | //Copy constructor | |
90 | } | |
91 | ||
92 | //____________________________________________________________________________ | |
93 | AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker() | |
94 | { | |
95 | //Remove this from the parental task before destroying | |
96 | // if(AliPHOSGetter::Instance()->PhosLoader()) | |
97 | // AliPHOSGetter::Instance()->PhosLoader()->CleanTracker(); | |
98 | delete fQADM ; | |
99 | if (fEMCRecPoints) { | |
100 | fEMCRecPoints->Delete(); | |
101 | delete fEMCRecPoints; | |
102 | } | |
103 | if (fCPVRecPoints) { | |
104 | fCPVRecPoints->Delete(); | |
105 | delete fCPVRecPoints; | |
106 | } | |
107 | } | |
108 | ||
109 | //____________________________________________________________________________ | |
110 | void AliPHOSTrackSegmentMaker::SetInput(TTree *clustersTree) | |
111 | { | |
112 | // Read the clusters tree and creates the | |
113 | // arrays with the EMC and CPV | |
114 | // clusters. | |
115 | // and set the corresponding branch addresses | |
116 | ||
117 | TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP"); | |
118 | if (!emcbranch) { | |
119 | AliError("can't get the branch with the PHOS EMC clusters !"); | |
120 | return; | |
121 | } | |
122 | fEMCRecPoints = new TObjArray(100) ; | |
123 | emcbranch->SetAddress(&fEMCRecPoints); | |
124 | emcbranch->GetEntry(0); | |
125 | ||
126 | TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP"); | |
127 | if (!cpvbranch) { | |
128 | AliError("can't get the branch with the PHOS CPV clusters !"); | |
129 | return; | |
130 | } | |
131 | fCPVRecPoints = new TObjArray(100) ; | |
132 | cpvbranch->SetAddress(&fCPVRecPoints); | |
133 | cpvbranch->GetEntry(0); | |
134 | } |