CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetRecoTypes.h
Go to the documentation of this file.
1 #ifndef JetAlgorithms_JetRecoTypes_h
2 #define JetAlgorithms_JetRecoTypes_h
3 
4 // Types used in Jet Reconstruction
5 // F.Ratnikov, UMd
6 // $Id: JetRecoTypes.h,v 1.1 2009/08/24 14:35:59 srappocc Exp $
7 
9 class ProtoJet;
10 
11 namespace JetReco {
13  public:
16  : mCandidate (0), mIndex(0) {}
17  IndexedCandidate (const value_type* fCandidate, unsigned fIndex)
18  : mCandidate (fCandidate), mIndex (fIndex) {}
19  inline unsigned index () const {return mIndex;}
20  inline const value_type& operator*() const {return *mCandidate;}
21  inline const value_type* operator->() const {return mCandidate;}
22  inline const bool operator==(const IndexedCandidate& other) const {return mCandidate == other.mCandidate;}
23  inline const bool operator!=(const IndexedCandidate& other) const {return !operator==(other);}
24  inline const value_type* get() const {return mCandidate;}
25  inline bool operator! () const {return !mCandidate;}
26  private:
28  unsigned mIndex;
29  };
30 
31  //CorrectedIntexedCandidate for use with corrected CaloTower to Vertex
33  public:
36  : mCandidate (0), oCandidate(0), mIndex(0) {}
37  CorrectedIndexedCandidate (const value_type *cCandidate,const value_type* fCandidate, unsigned fIndex)
38  : mCandidate (cCandidate), oCandidate(fCandidate), mIndex (fIndex) {}
39  CorrectedIndexedCandidate (const value_type* fCandidate, unsigned fIndex)
40  : mCandidate (fCandidate), mIndex (fIndex) {}
41  inline unsigned index () const {return mIndex;}
42  inline const value_type& operator*() const {return *mCandidate;}
43  inline const value_type* operator->() const {return mCandidate;}
44  inline const bool operator==(const CorrectedIndexedCandidate& other) const {return mCandidate == other.mCandidate;}
45  inline const bool operator!=(const CorrectedIndexedCandidate& other) const {return !operator==(other);}
46  inline const value_type* get() const {return mCandidate;}
47  inline const value_type* getOriginal() const {return oCandidate;}
48  inline void setBase(const value_type* a){mCandidate=a;}
49  inline void setOriginal(const value_type* a){oCandidate=a;}
50  inline void setIndex(unsigned nIndex){mIndex=nIndex;}
51  inline bool operator! () const {return !mCandidate;}
52  private:
53  const value_type* mCandidate; //version used in algorithms
54  const value_type* oCandidate; //original, use for constituents
55  unsigned mIndex;
56  };
57 
58 
59 
61  //typedef IndexedCandidate InputItem;
62  typedef std::vector<InputItem> InputCollection;
63  typedef std::vector <ProtoJet> OutputCollection;
65 }
66 #endif
std::vector< ProtoJet > OutputCollection
Definition: JetRecoTypes.h:63
const value_type * operator->() const
Definition: JetRecoTypes.h:21
CorrectedIndexedCandidate(const value_type *cCandidate, const value_type *fCandidate, unsigned fIndex)
Definition: JetRecoTypes.h:37
std::vector< InputItem > InputCollection
Definition: JetRecoTypes.h:62
const value_type & operator*() const
Definition: JetRecoTypes.h:42
Transient Jet class used by the reconstruction algorithms.
Definition: ProtoJet.h:25
reco::Candidate value_type
Definition: JetRecoTypes.h:14
void setBase(const value_type *a)
Definition: JetRecoTypes.h:48
const value_type & operator*() const
Definition: JetRecoTypes.h:20
unsigned index() const
Definition: JetRecoTypes.h:19
const value_type * mCandidate
Definition: JetRecoTypes.h:27
const value_type * operator->() const
Definition: JetRecoTypes.h:43
IndexedCandidate(const value_type *fCandidate, unsigned fIndex)
Definition: JetRecoTypes.h:17
void setIndex(unsigned nIndex)
Definition: JetRecoTypes.h:50
const bool operator==(const IndexedCandidate &other) const
Definition: JetRecoTypes.h:22
const value_type * getOriginal() const
Definition: JetRecoTypes.h:47
double a
Definition: hdecay.h:121
reco::CandidateBaseRefVector JetConstituents
Definition: JetRecoTypes.h:64
CorrectedIndexedCandidate InputItem
Definition: JetRecoTypes.h:60
void setOriginal(const value_type *a)
Definition: JetRecoTypes.h:49
const bool operator==(const CorrectedIndexedCandidate &other) const
Definition: JetRecoTypes.h:44
const bool operator!=(const IndexedCandidate &other) const
Definition: JetRecoTypes.h:23
CorrectedIndexedCandidate(const value_type *fCandidate, unsigned fIndex)
Definition: JetRecoTypes.h:39
const bool operator!=(const CorrectedIndexedCandidate &other) const
Definition: JetRecoTypes.h:45