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 };
00041
00044 PFBlockLink() :
00045 type_(NONE),
00046 test_(reco::PFBlock::LINKTEST_RECHIT),
00047 dist_(0),
00048 element1_( 0 ),
00049 element2_( 0 ) {}
00050
00052 PFBlockLink(Type type,
00053 reco::PFBlock::LinkTest test,
00054 double dist,
00055 unsigned elem1,
00056 unsigned elem2)
00057 :
00058 type_(type),
00059 test_(test),
00060 dist_(dist),
00061 element1_(elem1),
00062 element2_(elem2) {}
00063
00064
00066 unsigned neighbour(unsigned elem) const {
00067 if( elem == element1_ ) return element2_;
00068 else if(elem == element2_ ) return element1_;
00069 else return elem;
00070 }
00071
00073 Type type() const {return type_;}
00074
00077 reco::PFBlock::LinkTest test() const {return test_;}
00078
00080 double dist() const {return dist_;}
00081
00083 unsigned element1() const {return element1_;}
00084
00086 unsigned element2() const {return element2_;}
00087
00088
00090 friend std::ostream& operator<<(std::ostream& out, const PFBlockLink& l);
00091
00092 private:
00094 Type type_;
00095
00097 reco::PFBlock::LinkTest test_;
00098
00100 double dist_;
00101
00103 unsigned element1_;
00104
00106 unsigned element2_;
00107
00108 };
00109
00110 #endif