Go to the documentation of this file.00001 #ifndef RecoParticleFlow_PFAlgo_PFBlockLink_h
00002 #define RecoParticleFlow_PFAlgo_PFBlockLink_h
00003
00004 #include <vector>
00005 #include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
00006
00011 class PFBlockLink {
00012
00013 public:
00014
00016 enum Type {
00017 NONE=0,
00018 ECALandECAL=0x8,
00019 TRACKandECAL=0x9,
00020 TRACKandHCAL=0x11,
00021 ECALandHCAL=0x18,
00022 PS1andECAL=0xA,
00023 PS2andECAL = 0xC,
00024 TRACKandPS1 = 0x3,
00025 TRACKandPS2 = 0x5,
00026 PS1andPS2 = 0x6,
00027 TRACKandTRACK = 0x1,
00028 ECALandGSF = 0x28,
00029 HCALandGSF = 0x30,
00030 TRACKandGSF = 0x21,
00031 GSFandBREM =0x60,
00032 GSFandGSF = 0x20,
00033 ECALandBREM = 0x48,
00034 HCALandBREM = 0x50,
00035 PS1andGSF = 0x22,
00036 PS2andGSF = 0x24,
00037 PS1andBREM = 0x42,
00038 PS2andBREM = 0x44,
00039 HFEMandHFHAD = 0x180,
00040 SCandECAL = 0x208,
00041 TRACKandHO= 0x401,
00042 HCALandHO= 0x410
00043 };
00044
00047 PFBlockLink() :
00048 type_(NONE),
00049 test_(reco::PFBlock::LINKTEST_RECHIT),
00050 dist_(0),
00051 element1_( 0 ),
00052 element2_( 0 ) {}
00053
00055 PFBlockLink(Type type,
00056 reco::PFBlock::LinkTest test,
00057 double dist,
00058 unsigned elem1,
00059 unsigned elem2)
00060 :
00061 type_(type),
00062 test_(test),
00063 dist_(dist),
00064 element1_(elem1),
00065 element2_(elem2) {}
00066
00067
00069 unsigned neighbour(unsigned elem) const {
00070 if( elem == element1_ ) return element2_;
00071 else if(elem == element2_ ) return element1_;
00072 else return elem;
00073 }
00074
00076 Type type() const {return type_;}
00077
00080 reco::PFBlock::LinkTest test() const {return test_;}
00081
00083 double dist() const {return dist_;}
00084
00086 unsigned element1() const {return element1_;}
00087
00089 unsigned element2() const {return element2_;}
00090
00091
00093 friend std::ostream& operator<<(std::ostream& out, const PFBlockLink& l);
00094
00095 private:
00097 Type type_;
00098
00100 reco::PFBlock::LinkTest test_;
00101
00103 double dist_;
00104
00106 unsigned element1_;
00107
00109 unsigned element2_;
00110
00111 };
00112
00113 #endif