Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-25 23:59:56

0001 #ifndef _HLTEcalPhiSymFilter_H
0002 #define _HLTEcalPhiSymFilter_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    HLTEcalPhiSymFilter
0007 // Class:      HLTEcalPhiSymFilter
0008 //
0009 /**\class HLTEcalPhiSymFilter HLTEcalPhiSymFilter.cc Calibration/EcalAlCaRecoProducers/src/HLTEcalPhiSymFilter.cc
0010 
0011 * Description: Producer for EcalRecHits to be used for phi-symmetry ECAL 
0012 * calibration . Discard events in which no suitable rechit is available.
0013 * Rechits are accepted if their energy is above a threshold, eCut_barl_ 
0014 * for the barrel and  eCut_endc_. However, if the status of the channel is 
0015 * marked bad at some level, given by statusThreshold_, then a higher 
0016 * threshold (e.g. eCut_barl_high_) is applied. If  parameter useRecoFlag_  
0017 * is true, statusThreshold_ acts on EcalRecHit::recoFlag(), while if it is 
0018 * false, it acts on the ChannelStatus record from the database.
0019 
0020 */
0021 
0022 //
0023 // Original Author:  David Futyan
0024 // HLT Port       :  Stefano Argiro
0025 //
0026 //
0027 
0028 // system include files
0029 #include <memory>
0030 
0031 // user include files
0032 #include "FWCore/Framework/interface/Frameworkfwd.h"
0033 #include "FWCore/Framework/interface/Event.h"
0034 #include "FWCore/Framework/interface/global/EDFilter.h"
0035 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0036 #include "FWCore/Utilities/interface/InputTag.h"
0037 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
0038 #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h"
0039 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0040 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0041 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0042 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0043 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0044 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0045 
0046 namespace edm {
0047   class ConfigurationDescriptions;
0048 }
0049 
0050 //
0051 // class decleration
0052 //
0053 
0054 class HLTEcalPhiSymFilter : public edm::global::EDFilter<> {
0055 public:
0056   HLTEcalPhiSymFilter(const edm::ParameterSet&);
0057   ~HLTEcalPhiSymFilter() override;
0058 
0059   bool filter(edm::StreamID, edm::Event& event, const edm::EventSetup& setup) const final;
0060   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0061 
0062 private:
0063   edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> const ecalChannelStatusRcdToken_;
0064   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> const caloGeometryRecordToken_;
0065 
0066   const edm::EDGetTokenT<EBDigiCollection> barrelDigisToken_;
0067   const edm::EDGetTokenT<EEDigiCollection> endcapDigisToken_;
0068   const edm::EDGetTokenT<EcalUncalibratedRecHitCollection> barrelUncalibHitsToken_;
0069   const edm::EDGetTokenT<EcalUncalibratedRecHitCollection> endcapUncalibHitsToken_;
0070   const edm::EDGetTokenT<EBRecHitCollection> barrelHitsToken_;
0071   const edm::EDGetTokenT<EERecHitCollection> endcapHitsToken_;
0072   const std::string phiSymBarrelDigis_;
0073   const std::string phiSymEndcapDigis_;
0074   const std::vector<double> ampCut_barlP_;
0075   const std::vector<double> ampCut_barlM_;
0076   const std::vector<double> ampCut_endcP_;
0077   const std::vector<double> ampCut_endcM_;
0078   const uint32_t statusThreshold_;  ///< accept channels with up to this status
0079   const bool useRecoFlag_;          ///< use recoflag instead of DB for bad channels
0080 };
0081 
0082 #endif