FairRoot/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
42  {return fRho<rhs.fRho;};
43  bool operator> (const PndTrackCandHit& rhs) const
44  {return fRho>rhs.fRho;};
45  bool operator<= (const PndTrackCandHit& rhs) const
46  {return fRho<=rhs.fRho;};
47  bool operator>= (const PndTrackCandHit& rhs) const
48  {return fRho>=rhs.fRho;};
49  bool operator== (const PndTrackCandHit& hit) const {
50  return ( FairLink::operator==((FairLink)hit) && fRho == hit.fRho);
51  }
52  bool operator!= (const PndTrackCandHit& hit) const {
53  return (!(FairLink::operator==(hit)));
54  }
55  Int_t GetHitId()const {return GetIndex();}
56  Int_t GetDetId()const {return GetType();}
57  Double_t GetRho()const {return fRho;}
58 
59  void Print() const;
60 
61 #ifndef __CINT__ // for BOOST serialization
62  template<class Archive>
63  void serialize(Archive & ar, const unsigned int version)
64  {
65  ar & boost::serialization::base_object<FairLink>(*this);
66  ar & fRho;
67  }
68 #endif // for BOOST serialization
69 
70  private :
72 
74 };
75 
76 
77 
78 #endif
79 
80 //--------------------------------------------------------------
81 // $Log$
82 //--------------------------------------------------------------
void Print() const
void serialize(Archive &ar, const unsigned int version)
bool operator!=(const PndTrackCandHit &hit) const
PndTrackCandHit(Int_t detId, Int_t hitId, Double_t rho)
Double_t fRho
sorting parameter
bool operator==(const PndTrackCandHit &hit) const
virtual ~PndTrackCandHit()
Double_t
Double_t GetRho() const
ClassDef(PndTrackCandHit, 2)
bool operator>=(const PndTrackCandHit &rhs) const
bool operator<(const PndTrackCandHit &rhs) const
bool operator>(const PndTrackCandHit &rhs) const
bool operator<=(const PndTrackCandHit &rhs) const
PndSdsMCPoint * hit
Definition: anasim.C:70
PndTrackCandHit(FairLink &link, Double_t &rho)
Int_t GetHitId() const
Int_t GetDetId() const