]>
Commit | Line | Data |
---|---|---|
d15a28e7 | 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 | **************************************************************************/ | |
b2a60966 | 15 | /* $Id$ */ |
702ab87e | 16 | |
17 | /* History of cvs commits: | |
18 | * | |
19 | * $Log$ | |
9a2cdbdf | 20 | * Revision 1.28 2007/08/07 14:12:03 kharlov |
21 | * Quality assurance added (Yves Schutz) | |
22 | * | |
ddd1a39c | 23 | * Revision 1.27 2006/08/25 16:56:30 kharlov |
24 | * Compliance with Effective C++ | |
25 | * | |
0378398c | 26 | * Revision 1.26 2006/08/25 16:00:53 kharlov |
27 | * Compliance with Effective C++AliPHOSHit.cxx | |
28 | * | |
e2429969 | 29 | * Revision 1.25 2005/05/28 14:19:05 schutz |
30 | * Compilation warnings fixed by T.P. | |
31 | * | |
702ab87e | 32 | */ |
33 | ||
d15a28e7 | 34 | //_________________________________________________________________________ |
b2a60966 | 35 | // Algorithm Base class to construct PHOS track segments |
36 | // Associates EMC and PPSD clusters | |
37 | // Unfolds the EMC cluster | |
baef0810 | 38 | //*-- |
b2a60966 | 39 | //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH) |
40 | ||
d15a28e7 | 41 | |
42 | // --- ROOT system --- | |
9a2cdbdf | 43 | #include "TTree.h" |
d15a28e7 | 44 | |
d15a28e7 | 45 | // --- Standard library --- |
46 | ||
d15a28e7 | 47 | // --- AliRoot header files --- |
2731cd1e | 48 | #include "AliPHOSTrackSegmentMaker.h" |
ddd1a39c | 49 | #include "AliPHOSQualAssDataMaker.h" |
d15a28e7 | 50 | |
51 | ClassImp( AliPHOSTrackSegmentMaker) | |
52 | ||
53 | ||
54 | //____________________________________________________________________________ | |
0378398c | 55 | AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : |
9a2cdbdf | 56 | TObject(), |
ddd1a39c | 57 | fESD(0), |
9a2cdbdf | 58 | fQADM(0x0), |
59 | fGeom(0), | |
60 | fEMCRecPoints(0), | |
61 | fCPVRecPoints(0) | |
d15a28e7 | 62 | { |
ddd1a39c | 63 | // ctor |
8d0f3f77 | 64 | } |
65 | ||
b9791748 | 66 | //____________________________________________________________________________ |
9a2cdbdf | 67 | AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(AliPHOSGeometry *geom): |
68 | TObject(), | |
ddd1a39c | 69 | fESD(0), |
9a2cdbdf | 70 | fQADM(0x0), |
71 | fGeom(geom), | |
72 | fEMCRecPoints(0), | |
73 | fCPVRecPoints(0) | |
b9791748 | 74 | { |
75 | // ctor | |
ddd1a39c | 76 | fQADM = new AliPHOSQualAssDataMaker() ; //!Quality Assurance Data Maker |
77 | GetQualAssDataMaker()->Init(AliQualAss::kTRACKSEGMENTS) ; | |
b9791748 | 78 | } |
79 | ||
e2429969 | 80 | //____________________________________________________________________________ |
81 | AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMaker & tsmaker) : | |
9a2cdbdf | 82 | TObject(tsmaker), |
ddd1a39c | 83 | fESD(tsmaker.GetESD()), |
9a2cdbdf | 84 | fQADM(tsmaker.fQADM), |
85 | fGeom(tsmaker.fGeom), | |
86 | fEMCRecPoints(tsmaker.fEMCRecPoints), | |
87 | fCPVRecPoints(tsmaker.fCPVRecPoints) | |
e2429969 | 88 | { |
89 | //Copy constructor | |
90 | } | |
91 | ||
8d0f3f77 | 92 | //____________________________________________________________________________ |
93 | AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker() | |
94 | { | |
b135d5f2 | 95 | //Remove this from the parental task before destroying |
9a2cdbdf | 96 | // if(AliPHOSGetter::Instance()->PhosLoader()) |
97 | // AliPHOSGetter::Instance()->PhosLoader()->CleanTracker(); | |
ddd1a39c | 98 | delete fQADM ; |
9a2cdbdf | 99 | if (fEMCRecPoints) { |
100 | fEMCRecPoints->Delete(); | |
101 | delete fEMCRecPoints; | |
102 | } | |
103 | if (fCPVRecPoints) { | |
104 | fCPVRecPoints->Delete(); | |
105 | delete fCPVRecPoints; | |
106 | } | |
2731cd1e | 107 | } |
108 | ||
9a2cdbdf | 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 | } |