AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliParticleMap.h
Go to the documentation of this file.
1 
14 #ifndef ALIPARTICLEMAP_H
15 #define ALIPARTICLEMAP_H
16 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
17  * See cxx source for full Copyright notice */
18 
19 #include <cstdlib>
20 #include <vector>
21 #include <map>
22 
23 class AliVParticle;
24 class AliVTrack;
25 
40 namespace HighPtTracks {
41 
50 public:
55  fParticles()
56  {}
57 
62 
67  void AddParticle(AliVTrack *track) { fParticles.push_back(track); }
68 
74  AliVTrack *GetParticle(int itrack) const { return fParticles[itrack]; }
75 
80  int GetNumberOfParticles() const { return fParticles.size(); }
81 
82 private:
83 
84  std::vector<AliVTrack *> fParticles;
85 };
86 
95 public:
100  fTrueParticle(NULL),
101  fRecParticles()
102  {}
103 
112  {}
113 
121  if(this != &ref){
124  }
125  return *this;
126  }
127 
132 
137  AliVParticle *GetMCTrueParticle() const { return fTrueParticle; }
138 
143  const AliParticleList &GetRecTracks() const { return fRecParticles; }
144 
149  void SetMCTrueParticle(AliVParticle *const part) { fTrueParticle = part; }
150 
155  void SetRecParticles(const AliParticleList &tracks) { fRecParticles = tracks; }
156 
157 private:
158 
159  AliVParticle *fTrueParticle;
161 };
162 
171 public:
176  fParticles()
177  {}
178  ~AliParticleMap();
179 
180  void AddParticle(AliVTrack *track);
181  AliParticleList *GetParticles(int label) const;
182 
188  int GetNumberOfParticles() const { return fParticles.size(); }
189 
190  void Print() const;
191 
192 private:
193  std::map<int, AliParticleList *> fParticles;
194 };
195 
196 } /* namespace HighPtTracks */
197 
198 #endif /* ALIPARTICLEMAP_H */
void AddParticle(AliVTrack *track)
void AddParticle(AliVTrack *track)
std::map< int, AliParticleList * > fParticles
connection of particles to labels
const AliParticleList & GetRecTracks() const
AliParticleList * GetParticles(int label) const
AliVParticle * fTrueParticle
True selected particle.
Container of reconstructed particles.
AliReconstructedParticlePair & operator=(const AliReconstructedParticlePair &ref)
void SetMCTrueParticle(AliVParticle *const part)
Pair of a Monte-Carlo true particle and the associated reconstructed information. ...
std::vector< AliVTrack * > fParticles
Vector of reconstructed particles.
AliReconstructedParticlePair(const AliReconstructedParticlePair &ref)
void SetRecParticles(const AliParticleList &tracks)
AliVTrack * GetParticle(int itrack) const
AliParticleList fRecParticles
List of all matched particles according to the Monte-Carlo label.
Map of reconstructed particles which share the same Monte-Carlo label.