Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:39:38

0001 #ifndef __PFBlockElementCluster__
0002 #define __PFBlockElementCluster__
0003 
0004 #include <iostream>
0005 
0006 #include "DataFormats/ParticleFlowReco/interface/PFBlockElement.h"
0007 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
0008 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0009 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0010 
0011 namespace reco {
0012 
0013   /// \brief Cluster Element.
0014   ///
0015   /// this class contains a reference to a PFCluster
0016   class PFBlockElementCluster final : public PFBlockElement {
0017   public:
0018     PFBlockElementCluster() {}
0019 
0020     /// \brief constructor.
0021     /// type must be equal to PS1, PS2, ECAL, HCAL.
0022     /// \todo add a protection against the other types...
0023     PFBlockElementCluster(const PFClusterRef& ref, PFBlockElement::Type type)
0024         : PFBlockElement(type), clusterRef_(ref) {}
0025 
0026     PFBlockElement* clone() const override { return new PFBlockElementCluster(*this); }
0027 
0028     /// \return reference to the corresponding cluster
0029     const PFClusterRef& clusterRef() const override { return clusterRef_; }
0030     const SuperClusterRef& superClusterRef() const { return superClusterRef_; }
0031 
0032     void setSuperClusterRef(const SuperClusterRef& ref) { superClusterRef_ = ref; }
0033 
0034     void Dump(std::ostream& out = std::cout, const char* tab = " ") const override;
0035 
0036   private:
0037     /// reference to the corresponding cluster
0038     PFClusterRef clusterRef_;
0039     SuperClusterRef superClusterRef_;
0040   };
0041 }  // namespace reco
0042 
0043 #endif