Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoParticleFlow_PFClusterProducer_PFClusterComparator_
0002 #define RecoParticleFlow_PFClusterProducer_PFClusterComparator_
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 #include "FWCore/ServiceRegistry/interface/Service.h"
0023 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0024 #include "TH1F.h"
0025 
0026 class PFClusterComparator : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
0027 public:
0028   explicit PFClusterComparator(const edm::ParameterSet &);
0029 
0030   ~PFClusterComparator() override = default;
0031 
0032   void analyze(const edm::Event &, const edm::EventSetup &) override;
0033 
0034   void beginRun(const edm::Run &r, const edm::EventSetup &c) override {}
0035   void endRun(const edm::Run &r, const edm::EventSetup &c) override {}
0036 
0037 private:
0038   void fetchCandidateCollection(edm::Handle<reco::PFClusterCollection> &c,
0039                                 const edm::EDGetTokenT<reco::PFClusterCollection> &token,
0040                                 const edm::Event &iSetup) const;
0041 
0042   /*   void printElementsInBlocks(const reco::PFCluster& cluster, */
0043   /*                 std::ostream& out=std::cout) const; */
0044 
0045   /// PFClusters in which we'll look for pile up particles
0046   const edm::EDGetTokenT<reco::PFClusterCollection> inputTokenPFClusters_;
0047   const edm::EDGetTokenT<reco::PFClusterCollection> inputTokenPFClustersCompare_;
0048 
0049   /// verbose ?
0050   const bool verbose_;
0051 
0052   /// print the blocks associated to a given candidate ?
0053   const bool printBlocks_;
0054 
0055   TH1F *log10E_old, *log10E_new, *deltaEnergy;
0056   TH1F *posX_old, *posX_new, *deltaX;
0057   TH1F *posY_old, *posY_new, *deltaY;
0058   TH1F *posZ_old, *posZ_new, *deltaZ;
0059 };
0060 
0061 #endif