PandaRoot
PndTrackCandHit.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // Implementation of class PndTrackCand
7 // see PndTrackCand.hh for details
8 //
9 // Environment:
10 // Software developed for the PANDA Detector at FAIR.
11 //
12 // Author List:
13 // Tobias Stockmanns (IKP - Juelich) during the Panda Meeting 03/09
14 //
15 //
16 //-----------------------------------------------------------
17 
18 #ifndef PNDTRACKCANDHIT_HH
19 #define PNDTRACKCANDHIT_HH
20 
21 // Root Class Headers ----------------
22 #include "TObject.h"
23 
24 #include "FairLink.h"
25 
26 #include <iostream>
27 #include <vector>
28 #include <map>
29 
30 #ifndef __CINT__
31 #include <boost/serialization/access.hpp>
32 #include <boost/serialization/base_object.hpp>
33 #endif //__CINT__
34 
35 class PndTrackCandHit : public FairLink {
36  public:
37  PndTrackCandHit() : FairLink(), fRho(0) {}
38  PndTrackCandHit(Int_t detId, Int_t hitId, Double_t rho) : FairLink(detId, hitId), fRho(rho) {}
39  PndTrackCandHit(FairLink &link, Double_t &rho) : FairLink(link), fRho(rho){};
40  virtual ~PndTrackCandHit() {}
41  bool operator<(const PndTrackCandHit &rhs) const { return fRho < rhs.fRho; };
42  bool operator>(const PndTrackCandHit &rhs) const { return fRho > rhs.fRho; };
43  bool operator<=(const PndTrackCandHit &rhs) const { return fRho <= rhs.fRho; };
44  bool operator>=(const PndTrackCandHit &rhs) const { return fRho >= rhs.fRho; };
45  bool operator==(const PndTrackCandHit &hit) const { return (FairLink::operator==((FairLink)hit) && fRho == hit.fRho); }
46  bool operator!=(const PndTrackCandHit &hit) const { return (!(FairLink::operator==(hit))); }
47  Int_t GetHitId() const { return GetIndex(); }
48  Int_t GetDetId() const { return GetType(); }
49  Double_t GetRho() const { return fRho; }
50 
51  void Print() const;
52 
53 #ifndef __CINT__ // for BOOST serialization
54  template <class Archive>
55  void serialize(Archive &ar, const unsigned int version)
56  {
57  ar &boost::serialization::base_object<FairLink>(*this);
58  ar &fRho;
59  }
60 #endif // for BOOST serialization
61 
62  private:
63  Double_t fRho;
64 
65  ClassDef(PndTrackCandHit, 2);
66 };
67 
68 #endif
69 
70 //--------------------------------------------------------------
71 // $Log$
72 //--------------------------------------------------------------
void serialize(Archive &ar, const unsigned int version)
PndTrackCandHit(Int_t detId, Int_t hitId, Double_t rho)
bool operator<=(const PndTrackCandHit &rhs) const
Int_t GetHitId() const
bool operator<(const PndTrackCandHit &rhs) const
Double_t GetRho() const
virtual ~PndTrackCandHit()
bool operator>=(const PndTrackCandHit &rhs) const
void Print() const
bool operator>(const PndTrackCandHit &rhs) const
bool operator!=(const PndTrackCandHit &hit) const
Int_t GetDetId() const
PndTrackCandHit(FairLink &link, Double_t &rho)
bool operator==(const PndTrackCandHit &hit) const