test
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  TRACKandHO= 0x401,
42  HCALandHO= 0x410
43  };
44 
48  type_(NONE),
49  test_(reco::PFBlock::LINKTEST_RECHIT),
50  dist_(0),
51  element1_( 0 ),
52  element2_( 0 ) {}
53 
57  double dist,
58  unsigned elem1,
59  unsigned elem2)
60  :
61  type_(type),
62  test_(test),
63  dist_(dist),
64  element1_(elem1),
65  element2_(elem2) {}
66 
67 
69  unsigned neighbour(unsigned elem) const {
70  if( elem == element1_ ) return element2_;
71  else if(elem == element2_ ) return element1_;
72  else return elem;
73  }
74 
76  Type type() const {return type_;}
77 
80  reco::PFBlock::LinkTest test() const {return test_;}
81 
83  double dist() const {return dist_;}
84 
86  unsigned element1() const {return element1_;}
87 
89  unsigned element2() const {return element2_;}
90 
91 
93  friend std::ostream& operator<<(std::ostream& out, const PFBlockLink& l);
94 
95  private:
98 
101 
103  double dist_;
104 
106  unsigned element1_;
107 
109  unsigned element2_;
110 
111 };
112 
113 #endif
type
Definition: HCALResponse.h:21