Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackCandHit.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackCandHit.h
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18  */
23 #ifndef genfit_TrackCandHit_h
24 #define genfit_TrackCandHit_h
25 
26 #include <TObject.h>
27 
28 
29 namespace genfit {
30 
34 class TrackCandHit : public TObject {
35  public:
36 
37  // Constructors/Destructors ---------
38  TrackCandHit(int detId = -1,
39  int hitId = -1,
40  int planeId = -1,
41  double sortingParameter = 0.);
42 
43  virtual ~TrackCandHit() {;}
44 
45  virtual TrackCandHit* clone() const {return new TrackCandHit(*this);}
46 
47  // Accessors
48  int getDetId() const {return detId_;}
49  int getHitId() const {return hitId_;}
50  int getPlaneId() const {return planeId_;}
51  double getSortingParameter() const {return sortingParameter_;}
52 
53  // Modifiers
54  void setSortingParameter(double sortingParameter) {sortingParameter_ = sortingParameter;}
55 
56  virtual void Print(Option_t* option = "") const;
57 
58 
61  friend bool operator== (const TrackCandHit& lhs, const TrackCandHit& rhs);
62  friend bool operator!= (const TrackCandHit& lhs, const TrackCandHit& rhs) {
63  return !(lhs == rhs);
64  }
65 
68  friend bool operator< (const TrackCandHit& lhs, const TrackCandHit& rhs) {
69  return (lhs.sortingParameter_ < rhs.sortingParameter_);
70  }
71 
72  protected:
73 
75  TrackCandHit(const TrackCandHit& other) :
76  TObject(other), detId_(other.detId_), hitId_(other.hitId_), planeId_(other.planeId_), sortingParameter_(other.sortingParameter_) {;}
79 
80 
81  // Data Members ------------
82  int detId_; // detId id is -1 per default
83  int hitId_; // hitId id is -1 per default
84  int planeId_; // planeId id is -1 per default
85  double sortingParameter_; // sorting parameter
86 
87 
88  public:
89 
90  ClassDef(TrackCandHit,1)
91 
92 };
93 
94 } /* End of namespace genfit */
97 #endif // genfit_TrackCandHit_h