Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-26 00:02:51

0001 #ifndef __BASELINEPFSCREGRESSION_H__
0002 #define __BASELINEPFSCREGRESSION_H__
0003 
0004 #include "RecoEgamma/EgammaTools/interface/SCRegressionCalculator.h"
0005 
0006 #include "Geometry/Records/interface/CaloTopologyRecord.h"
0007 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0008 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0009 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0010 
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 
0014 #include "FWCore/Framework/interface/ConsumesCollector.h"
0015 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0016 
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0019 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0020 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0021 
0022 #include "FWCore/Utilities/interface/InputTag.h"
0023 #include "FWCore/Framework/interface/ConsumesCollector.h"
0024 
0025 #include <vector>
0026 
0027 class BaselinePFSCRegression {
0028 public:
0029   BaselinePFSCRegression() : topo_record(nullptr), geom_record(nullptr){};
0030   void update(const edm::EventSetup&);
0031   void set(const reco::SuperCluster&, std::vector<float>&) const;
0032   void setTokens(const edm::ParameterSet&, edm::ConsumesCollector&&);
0033   void setEvent(const edm::Event&);
0034 
0035 private:
0036   const CaloTopologyRecord* topo_record;
0037   const CaloGeometryRecord* geom_record;
0038   edm::ESHandle<CaloTopology> calotopo;
0039   edm::ESHandle<CaloGeometry> calogeom;
0040   edm::EDGetTokenT<EcalRecHitCollection> inputTagEBRecHits_;
0041   edm::EDGetTokenT<EcalRecHitCollection> inputTagEERecHits_;
0042   edm::EDGetTokenT<reco::VertexCollection> inputTagVertices_;
0043   reco::VertexCollection const* vertices = nullptr;
0044   EcalRecHitCollection const* rechitsEB = nullptr;
0045   EcalRecHitCollection const* rechitsEE = nullptr;
0046 };
0047 
0048 typedef SCRegressionCalculator<BaselinePFSCRegression> PFSCRegressionCalc;
0049 
0050 #endif