Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:28

0001 #ifndef RecoParticleFlow_PFProducer_PFBlockElementSCEqual
0002 #define RecoParticleFlow_PFProducer_PFBlockElementSCEqual
0003 
0004 #include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperCluster.h"
0005 #include "DataFormats/ParticleFlowReco/interface/PFBlockElement.h"
0006 
0007 class PFBlockElementSCEqual {
0008 public:
0009   PFBlockElementSCEqual(reco::SuperClusterRef scRef) : ref_(scRef) { ; }
0010   inline bool operator()(const std::unique_ptr<reco::PFBlockElement>& el) {
0011     return (el->type() == reco::PFBlockElement::SC &&
0012             (static_cast<const reco::PFBlockElementSuperCluster*>(el.get()))->superClusterRef() == ref_);
0013   }
0014   inline bool operator()(const reco::PFBlockElement* el) {
0015     return (el->type() == reco::PFBlockElement::SC &&
0016             (static_cast<const reco::PFBlockElementSuperCluster*>(el))->superClusterRef() == ref_);
0017   }
0018 
0019 private:
0020   reco::SuperClusterRef ref_;
0021 };
0022 
0023 #endif