]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSESDMaker.cxx
Fixing comments
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSESDMaker.cxx
CommitLineData
1b41ab20 1// $Id$
2
5f96dd31 3/**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * All rights reserved. *
6 * *
7 * Primary Authors: Oystein Djuvsland *
8 * *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
17
7a09cd3d 18
5f96dd31 19/**
20 * @file AliHLTPHOSESDMaker.cxx
21 * @author Oystein Djuvsland
22 * @date
23 * @brief ESD maker for PHOS HLT
24 */
25
26// see header file for class documentation
27// or
28// refer to README to build package
29// or
30// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
31
32#include "AliHLTPHOSESDMaker.h"
33#include "AliHLTPHOSCaloClusterContainerStruct.h"
9f050726 34//#include "AliHLTPHOSBase.h"
7fc04b67 35#include "AliHLTCaloClusterDataStruct.h"
5f96dd31 36#include "AliESDEvent.h"
37#include "AliESDCaloCluster.h"
38#include "TClonesArray.h"
39
40ClassImp(AliHLTPHOSESDMaker);
41
42AliHLTPHOSESDMaker::AliHLTPHOSESDMaker() :
9f050726 43 // AliHLTPHOSBase(),
5f96dd31 44 fNCaloClusters(0),
45 fCaloClustersPtr(0),
46 fESDEventPtr(0),
47 fCaloClusterContainerPtr(0)
48{
49 //See header file for documentation
50 fCaloClustersPtr = new TClonesArray("AliESDCaloCluster", 0);
51}
52
53AliHLTPHOSESDMaker::~AliHLTPHOSESDMaker()
54{
55 //See header file for documentation
56 if(fCaloClustersPtr)
57 {
25b7f84c 58 //fCaloClustersPtr->Delete();
59 //fCaloClustersPtr = 0;
5f96dd31 60 }
61}
62
63Int_t
64AliHLTPHOSESDMaker::FillESDCaloClusters()
65{
66 //See header file for documentation
67
e304ea31 68// AliESDCaloCluster *caloCluster = 0;
7fc04b67 69// AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
5f96dd31 70
25b7f84c 71 for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
5f96dd31 72 {
e304ea31 73
74// caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->At(i + fNCaloClusters);
75// caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
76// caloCluster->SetID(caloClusterStruct->fID);
77// caloCluster->SetClusterType(caloClusterStruct->fClusterType);
78// caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
79// caloCluster->SetE(caloClusterStruct->fEnergy);
80// caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
81// caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
82// caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
83// caloCluster->SetM20(caloClusterStruct->fM20);
84// caloCluster->SetM02(caloClusterStruct->fM02);
85// // PT caloCluster->SetM11(caloClusterStruct->fM11);
86// caloCluster->SetNExMax(caloClusterStruct->fNExMax);
87// caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
88// caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
89// caloCluster->SetNCells(caloClusterStruct->fNCells);
90// caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
91// caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
92// fNCaloClusters++;
5f96dd31 93 }
94
95 return 0;
96}
97
98Int_t
99AliHLTPHOSESDMaker::FillESDEvent()
100{
101 //See header file for documentation
102
e304ea31 103// AliESDCaloCluster *caloCluster = 0;
7fc04b67 104// AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
25b7f84c 105 for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
5f96dd31 106 {
e304ea31 107// // caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
108// caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i);
109// caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
110
111// caloCluster->SetID(caloClusterStruct->fID);
112// caloCluster->SetClusterType(caloClusterStruct->fClusterType);
113// caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
114// caloCluster->SetE(caloClusterStruct->fEnergy);
115// caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
116// caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
117// caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
118// caloCluster->SetM20(caloClusterStruct->fM20);
119// caloCluster->SetM02(caloClusterStruct->fM02);
120// // caloCluster->SetM11(caloClusterStruct->fM11);
121// caloCluster->SetNExMax(caloClusterStruct->fNExMax);
122// caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
123// caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
124// caloCluster->SetNCells(caloClusterStruct->fNCells);
125// caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
126// caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
127// fESDEventPtr->AddCaloCluster(caloCluster);
128// fNCaloClusters++;
5f96dd31 129 }
130
131 return 0;
132}
25b7f84c 133Int_t
134AliHLTPHOSESDMaker::FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr)
135{
136 //See header file for documentation
137
e304ea31 138// AliESDCaloCluster *caloCluster = 0;
7fc04b67 139// AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
25b7f84c 140
94594220 141 //cout << "ESD: # of clusters: " << caloClusterContainerPtr->fNCaloClusters << endl;
142 for(UInt_t i = 0; i < caloClusterContainerPtr->fNCaloClusters; i++)
25b7f84c 143 {
e304ea31 144 // caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
145// caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
146// caloClusterStruct = &(caloClusterContainerPtr->fCaloClusterArray[i]);
147// caloCluster->SetID(caloClusterStruct->fID);
148// caloCluster->SetClusterType(caloClusterStruct->fClusterType);
149// // caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
150// caloCluster->SetPosition((Float_t*)caloClusterStruct->fGlobalPos);
151// caloCluster->SetE(caloClusterStruct->fEnergy);
152// // cout << "\t\t ESD: Cluster energy: " << caloClusterStruct->fEnergy << endl;
153// // cout << "\t\t ESD: Position: x = " << caloClusterStruct->fGlobalPos[0] << " - y = " << caloClusterStruct->fGlobalPos[1] << " - z = " << caloClusterStruct->fGlobalPos[2] << endl;
154// caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
155// caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
156// caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
157// caloCluster->SetM20(caloClusterStruct->fM20);
158// caloCluster->SetM02(caloClusterStruct->fM02);
159// caloCluster->SetNExMax(caloClusterStruct->fNExMax);
160// caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
161// caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
162// caloCluster->SetNCells(caloClusterStruct->fNCells);
163// caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
164// caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
165// fESDEventPtr->AddCaloCluster(caloCluster);
94594220 166
e304ea31 167// fNCaloClusters++;
25b7f84c 168 }
169
170 return 0;
171}
5f96dd31 172
173void
174AliHLTPHOSESDMaker::ResetESD()
175{
176 fNCaloClusters = 0;
25b7f84c 177 // fCaloClustersPtr->Delete();
5f96dd31 178}
179