3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Kalliopi Kanaki<Kalliopi.Kanaki@ift.uib.no> *
8 //* for The ALICE HLT Project. *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /** @file AliHLTTPCOfflineCluster.cxx
20 @author Kalliopi Kanaki
22 @brief Cluster converter from offline to HLT format and back
25 #include "AliHLTTPCOfflineCluster.h"
26 #include "AliHLTTPCTransform.h"
27 #include "TObjArray.h"
34 ClassImp(AliHLTTPCOfflineCluster)
36 AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster()
41 AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliHLTTPCSpacePointData& /*hltCluster*/){
45 AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliTPCclusterMI& /*offCluster*/){
49 AliHLTTPCOfflineCluster& AliHLTTPCOfflineCluster::operator=(const AliTPCclusterMI& /*offCluster*/){
53 AliHLTTPCOfflineCluster::~AliHLTTPCOfflineCluster(){
59 AliTPCclusterMI* AliHLTTPCOfflineCluster::ConvertHLTToOffline(AliHLTTPCSpacePointData spacePoint){
61 AliTPCclusterMI *offCluster = new AliTPCclusterMI();
63 offCluster->SetRow((Int_t)spacePoint.fPadRow); // padrow
64 offCluster->SetX(spacePoint.fX); // X coordinate in slice system
65 offCluster->SetY(spacePoint.fY); // Y coordinate in slice system
66 offCluster->SetZ(spacePoint.fZ); // Z coordinate in slice system
67 offCluster->SetQ(spacePoint.fCharge); // charge
68 offCluster->SetMax(spacePoint.fQMax); // max Q (amplitude)
69 offCluster->SetSigmaY2(spacePoint.fSigmaY2); // error in Y direction
70 offCluster->SetSigmaZ2(spacePoint.fSigmaZ2); // error in Z direction
71 //offCluster->SetDetector(0); // detector/slice
72 //offCluster->SetType(0); // default from constructor
73 //offCluster->IsUsed(0); // default from constructor
74 //offCluster->SetInfo(NULL); // default from constructor
80 AliHLTTPCSpacePointData AliHLTTPCOfflineCluster::ConvertOfflineToHLT(AliTPCclusterMI *offCluster){
83 AliHLTTPCSpacePointData spacePoint;
85 spacePoint.fPadRow = offCluster->GetRow();
86 spacePoint.fX = offCluster->GetX(); // these are in the detector system
87 spacePoint.fY = offCluster->GetY(); // the HLT clusters have to be transformed to the slice system
88 spacePoint.fZ = offCluster->GetZ(); // for the X, Y, Z to be consistent with our definitions
89 spacePoint.fCharge = (UInt_t)offCluster->GetQ();
90 spacePoint.fQMax = (UInt_t)offCluster->GetMax();
91 spacePoint.fSigmaY2 = offCluster->GetSigmaY2();
92 spacePoint.fSigmaZ2 = offCluster->GetSigmaZ2();