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->SetPad(spacePoint.fX); // pad
64 offCluster->SetRow((Int_t)spacePoint.fPadRow); // row
65 offCluster->SetTimeBin(spacePoint.fZ); // time bin
66 offCluster->SetQ(spacePoint.fCharge); // charge
67 offCluster->SetMax(spacePoint.fQMax); // max Q (amplitude)
68 //offCluster->SetDetector(0); // detector/slice
69 //offCluster->SetType(0); // default from constructor
70 //offCluster->IsUsed(0); // default from constructor
71 //offCluster->SetInfo(NULL); // default from constructor
77 AliHLTTPCSpacePointData AliHLTTPCOfflineCluster::ConvertOfflineToHLT(AliTPCclusterMI *offCluster){
80 AliHLTTPCSpacePointData spacePoint = { 0.,0.,0.,0,0,0.,0.,0,0,kFALSE,0 };
82 spacePoint.fX = offCluster->GetPad();
83 spacePoint.fPadRow = offCluster->GetRow();
84 spacePoint.fZ = offCluster->GetTimeBin();
85 spacePoint.fCharge = (UInt_t)offCluster->GetQ();
86 spacePoint.fQMax = (UInt_t)offCluster->GetMax();