Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-26 00:01:55

0001 #ifndef _ALCAECALRECHITREDUCER_H
0002 #define _ALCAECALRECHITREDUCER_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    AlCaECALRecHitReducer
0007 // Class:      AlCaECALRecHitReducer
0008 //
0009 /**\class AlCaECALRecHitReducer AlCaECALRecHitReducer.cc Calibration/EcalAlCaRecoProducers/src/AlCaECALRecHitReducer.cc
0010 
0011  Description: Example of a producer of AlCa electrons
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 
0016 */
0017 //
0018 // Original Author:  Lorenzo AGOSTINO
0019 //         Created:  Mon Jul 17 18:07:01 CEST 2006
0020 // $Id: AlCaECALRecHitReducer.h,v 1.13 2010/02/11 00:10:34 wmtan Exp $
0021 //
0022 //
0023 
0024 // system include files
0025 #include <memory>
0026 
0027 // user include files
0028 #include "FWCore/Framework/interface/Frameworkfwd.h"
0029 #include "FWCore/Framework/interface/global/EDProducer.h"
0030 
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/Utilities/interface/InputTag.h"
0033 #include "FWCore/Utilities/interface/ESGetToken.h"
0034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0035 
0036 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0037 #include "DataFormats/DetId/interface/DetId.h"
0038 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0039 #include "Geometry/Records/interface/CaloTopologyRecord.h"
0040 
0041 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0042 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
0043 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0044 //!
0045 //! class declaration
0046 //!
0047 
0048 class AlCaECALRecHitReducer : public edm::global::EDProducer<> {
0049 public:
0050   //! ctor
0051   explicit AlCaECALRecHitReducer(const edm::ParameterSet&);
0052   ~AlCaECALRecHitReducer() override;
0053 
0054   //! producer
0055   void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0056 
0057 private:
0058   // ----------member data ---------------------------
0059 
0060   edm::EDGetTokenT<EcalRecHitCollection> ebRecHitsToken_;
0061   edm::EDGetTokenT<EcalRecHitCollection> eeRecHitsToken_;
0062   edm::EDGetTokenT<EcalRecHitCollection> esRecHitsToken_;
0063   edm::EDGetTokenT<reco::GsfElectronCollection> electronToken_;
0064   std::vector<edm::EDGetTokenT<edm::View<reco::RecoCandidate> > > eleViewTokens_;
0065 
0066   edm::EDGetTokenT<reco::PhotonCollection> photonToken_;
0067   edm::EDGetTokenT<reco::SuperClusterCollection> EESuperClusterToken_;
0068   edm::ESGetToken<CaloTopology, CaloTopologyRecord> caloTopologyToken_;
0069   std::string alcaBarrelHitsCollection_;
0070   std::string alcaEndcapHitsCollection_;
0071   std::string alcaPreshowerHitsCollection_;
0072   int etaSize_;
0073   int phiSize_;
0074   //float weight_;
0075   //  int esNstrips_;
0076   //int esNcolumns_;
0077 
0078   //  bool selectByEleNum_;
0079   //  int minEleNumber_;
0080   //  double minElePt_;
0081   double minEta_highEtaSC_;
0082   std::string alcaCaloClusterCollection_;
0083 
0084   void AddMiniRecHitCollection(const reco::SuperCluster& sc,
0085                                std::set<DetId>& reducedRecHitMap,
0086                                const CaloTopology* caloTopology) const;
0087 };
0088 
0089 #endif