CMS 3D CMS Logo

PFBlockLink.h

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     TRACKandECAL=0x9,
00019     TRACKandHCAL=0x11,
00020     ECALandHCAL=0x18,
00021     PS1andECAL=0xA,
00022     PS2andECAL = 0xC,
00023     TRACKandPS1 = 0x3,
00024     TRACKandPS2 = 0x5,
00025     PS1andPS2 = 0x6,
00026     TRACKandTRACK = 0x1,
00027     ECALandGSF = 0x28,
00028     HCALandGSF = 0x30,
00029     TRACKandGSF = 0x21,
00030     GSFandBREM =0x60,
00031     ECALandBREM = 0x48,
00032     HCALandBREM = 0x50,
00033     PS1andGSF = 0x22,
00034     PS2andGSF = 0x24,
00035     PS1andBREM = 0x42,
00036     PS2andBREM = 0x44
00037   };
00038   
00041   PFBlockLink() : 
00042     type_(NONE), 
00043     test_(reco::PFBlock::LINKTEST_CHI2),
00044     chi2_(0), 
00045     dist_(0),
00046     element1_( 0 ), 
00047     element2_( 0 ) {}  
00048   
00050   PFBlockLink(Type type, 
00051               reco::PFBlock::LinkTest test,
00052               double chi2, double dist,
00053               unsigned elem1, unsigned elem2) 
00054     :  
00055     type_(type), test_(test), chi2_(chi2), dist_(dist),
00056     element1_(elem1), element2_(elem2) {}
00057   
00058   
00060   unsigned neighbour(unsigned elem) const {
00061     if( elem == element1_ ) return element2_;
00062     else if(elem == element2_ ) return element1_;
00063     else return elem;
00064   }
00065 
00067   Type type() const {return type_;}  
00068 
00071   reco::PFBlock::LinkTest test() const {return test_;}  
00072   
00074   double chi2() const {return chi2_;}  
00075 
00077   double dist() const {return dist_;}
00078   
00080   unsigned element1() const {return element1_;}
00081   
00083   unsigned element2() const {return element2_;}
00084   
00085   
00087   friend std::ostream& operator<<(std::ostream& out, const PFBlockLink& l); 
00088   
00089  private:
00091   Type    type_;
00092   
00094   reco::PFBlock::LinkTest test_;
00095 
00097   double  chi2_;
00098 
00100   double dist_;
00101   
00103   unsigned  element1_;
00104 
00106   unsigned  element2_;
00107   
00108 };  
00109 
00110 #endif

Generated on Tue Jun 9 17:44:39 2009 for CMSSW by  doxygen 1.5.4