Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-22 02:24:05

0001 #ifndef RecoParticleFlow_PFClusterProducer_PFClusterAnalyzer_
0002 #define RecoParticleFlow_PFClusterProducer_PFClusterAnalyzer_
0003 
0004 // system include files
0005 #include <memory>
0006 #include <string>
0007 #include <iostream>
0008 
0009 // user include files
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/MakerMacros.h"
0016 
0017 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
0018 
0019 /**\class PFClusterAnalyzer 
0020 \brief test analyzer for PFClusters
0021 */
0022 
0023 class PFClusterAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0024 public:
0025   explicit PFClusterAnalyzer(const edm::ParameterSet&);
0026 
0027   ~PFClusterAnalyzer() override = default;
0028 
0029   void analyze(const edm::Event&, const edm::EventSetup&) override;
0030 
0031   void beginRun(const edm::Run& r, const edm::EventSetup& c) override;
0032   void endRun(const edm::Run& r, const edm::EventSetup& c) override {}
0033 
0034 private:
0035   void fetchCandidateCollection(edm::Handle<reco::PFClusterCollection>& c,
0036                                 const edm::EDGetTokenT<reco::PFClusterCollection>& token,
0037                                 const edm::Event& iSetup) const;
0038 
0039   /*   void printElementsInBlocks(const reco::PFCluster& cluster, */
0040   /*                 std::ostream& out=std::cout) const; */
0041 
0042   /// PFClusters in which we'll look for pile up particles
0043   const edm::EDGetTokenT<reco::PFClusterCollection> inputTokenPFClusters_;
0044 
0045   /// verbose ?
0046   const bool verbose_;
0047 
0048   /// print the blocks associated to a given candidate ?
0049   const bool printBlocks_;
0050 };
0051 
0052 #endif