CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFBlockLink.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFAlgo_PFBlockLink_h
2 #define RecoParticleFlow_PFAlgo_PFBlockLink_h
3 
4 #include <vector>
6 
11 class PFBlockLink {
12 
13  public:
14 
16  enum Type {
17  NONE=0,
23  PS2andECAL = 0xC,
24  TRACKandPS1 = 0x3,
25  TRACKandPS2 = 0x5,
26  PS1andPS2 = 0x6,
28  ECALandGSF = 0x28,
29  HCALandGSF = 0x30,
30  TRACKandGSF = 0x21,
31  GSFandBREM =0x60,
32  GSFandGSF = 0x20,
33  ECALandBREM = 0x48,
34  HCALandBREM = 0x50,
35  PS1andGSF = 0x22,
36  PS2andGSF = 0x24,
37  PS1andBREM = 0x42,
38  PS2andBREM = 0x44,
39  HFEMandHFHAD = 0x180,
40  SCandECAL = 0x208
41  };
42 
46  type_(NONE),
47  test_(reco::PFBlock::LINKTEST_RECHIT),
48  dist_(0),
49  element1_( 0 ),
50  element2_( 0 ) {}
51 
55  double dist,
56  unsigned elem1,
57  unsigned elem2)
58  :
59  type_(type),
60  test_(test),
61  dist_(dist),
62  element1_(elem1),
63  element2_(elem2) {}
64 
65 
67  unsigned neighbour(unsigned elem) const {
68  if( elem == element1_ ) return element2_;
69  else if(elem == element2_ ) return element1_;
70  else return elem;
71  }
72 
74  Type type() const {return type_;}
75 
78  reco::PFBlock::LinkTest test() const {return test_;}
79 
81  double dist() const {return dist_;}
82 
84  unsigned element1() const {return element1_;}
85 
87  unsigned element2() const {return element2_;}
88 
89 
91  friend std::ostream& operator<<(std::ostream& out, const PFBlockLink& l);
92 
93  private:
96 
99 
101  double dist_;
102 
104  unsigned element1_;
105 
107  unsigned element2_;
108 
109 };
110 
111 #endif
type
Definition: HCALResponse.h:22
tuple out
Definition: dbtoconf.py:99