]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCSpacePointContainer.h
create 2D projections of space points, adding interface method to retrieve phi of...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCSpacePointContainer.h
CommitLineData
7e7b2c34 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTTPCSPACEPOINTCONTAINER_H
4#define ALIHLTTPCSPACEPOINTCONTAINER_H
5//* This file is property of and copyright by the ALICE HLT Project *
6//* ALICE Experiment at CERN, All rights reserved. *
7//* See cxx source for full Copyright notice *
8
9/// @file AliHLTTPCSpacePointContainer.h
10/// @author Matthias Richter
11/// @date 2011-04-29
12/// @brief Helper class for handling of HLT TPC space point data blocks
13///
14
15#include "AliHLTSpacePointContainer.h"
16#include "AliHLTTPCClusterDataFormat.h"
17#include "AliHLTTPCSpacePointData.h"
18#include <map>
19using namespace std;
20
21/**
22 * @class AliHLTTPCSpacePointContainer
23 * Handler class for HLT TPCS space point data blocks.
24 *
25 * @ingroup alihlt_tpc
26 */
27class AliHLTTPCSpacePointContainer : public AliHLTSpacePointContainer
28{
29 public:
30 /// standard constructor
31 AliHLTTPCSpacePointContainer();
32 /// copy constructor
33 AliHLTTPCSpacePointContainer(const AliHLTTPCSpacePointContainer& c);
34 /// assignment operator
35 AliHLTTPCSpacePointContainer& operator=(const AliHLTTPCSpacePointContainer& c);
36 /// destructor
37 ~AliHLTTPCSpacePointContainer();
38
39 virtual int GetClusterIDs(vector<AliHLTUInt32_t>& tgt) const;
40 virtual float GetX(AliHLTUInt32_t clusterID) const;
41 virtual float GetXWidth(AliHLTUInt32_t clusterID) const;
42 virtual float GetY(AliHLTUInt32_t clusterID) const;
43 virtual float GetYWidth(AliHLTUInt32_t clusterID) const;
44 virtual float GetZ(AliHLTUInt32_t clusterID) const;
45 virtual float GetZWidth(AliHLTUInt32_t clusterID) const;
46 virtual float GetCharge(AliHLTUInt32_t clusterID) const;
47
48 /// add input block to the collection
49 virtual int AddInputBlock(const AliHLTComponentBlockData* pDesc);
50
51 /// clear the object and reset pointer references
52 virtual void Clear(Option_t * option ="");
53
54 /// print information
55 virtual void Print(ostream& out, Option_t *option="") const;
56
57 /// create a collection of clusters for a specific track
58 virtual AliHLTSpacePointContainer* SelectByTrack(int trackId, bool bAlloc=false) const;
59
60 /// create a collection of clusters for a specific MC track
61 virtual AliHLTSpacePointContainer* SelectByMC(int mcId, bool bAlloc=false) const;
62
63 /// create a collection of all used clusters
64 virtual AliHLTSpacePointContainer* UsedClusters(bool bAlloc=false) const;
65
66 /// create a collection of all unused clusters
67 virtual AliHLTSpacePointContainer* UnusedClusters(bool bAlloc=false) const;
68
69 virtual int MarkUsed(const AliHLTUInt32_t* clusterIDs, int arraySize);
70 virtual int SetTrackID(int trackID, const AliHLTUInt32_t* clusterIDs, int arraySize);
71 virtual int SetMCID(int clusterID, const AliHLTUInt32_t* clusterIDs, int arraySize);
72
73 class AliHLTTPCSpacePointProperties {
74 public:
75 AliHLTTPCSpacePointProperties();
76 AliHLTTPCSpacePointProperties(const AliHLTTPCSpacePointData* pCluster);
77 AliHLTTPCSpacePointProperties(const AliHLTTPCSpacePointProperties& src);
78 AliHLTTPCSpacePointProperties& operator=(const AliHLTTPCSpacePointProperties& src);
79
80 ~AliHLTTPCSpacePointProperties() {}
81
82 const AliHLTTPCSpacePointData* Data() const {return fCluster;}
83 bool IsUsed() const {return fUsed;}
84 void MarkUsed(bool used=true) {fUsed=used;}
85 int GetTrackId() const {return fTrackId;}
86 void SetTrackId(int trackId) {fTrackId=trackId;}
87 int GetMCId() const {return fMCId;}
88 void SetMCId(int mcId) {fMCId=mcId;}
89
90 void Print(ostream& out, Option_t *option="") const;
91
92 private:
93 const AliHLTTPCSpacePointData* fCluster; //! transient
94 bool fUsed; //! transient
95 int fTrackId; //! track id from reconstruction
96 int fMCId; //! MC id
97 };
98
99 protected:
100
101 private:
102 /// map of clusters
103 std::map<AliHLTUInt32_t, AliHLTTPCSpacePointProperties> fClusters; //!
104
105 ClassDef(AliHLTTPCSpacePointContainer, 0)
106};
107
108ostream& operator<<(ostream &out, const AliHLTTPCSpacePointContainer::AliHLTTPCSpacePointProperties& p);
109
110#endif