Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:52

0001 #ifndef ZDCHITRECONSTRUCTOR_H
0002 #define ZDCHITRECONSTRUCTOR_H 1
0003 
0004 #include <memory>
0005 
0006 #include "FWCore/Framework/interface/stream/EDProducer.h"
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "DataFormats/Common/interface/Handle.h"
0009 
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "FWCore/Utilities/interface/ESGetToken.h"
0013 
0014 #include "RecoLocalCalo/HcalRecAlgos/interface/ZdcSimpleRecAlgo.h"
0015 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalHFStatusBitFromRecHits.h"
0016 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalHFStatusBitFromDigis.h"
0017 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0018 #include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
0019 #include "CondFormats/HcalObjects/interface/HcalChannelStatus.h"
0020 #include "CondFormats/HcalObjects/interface/HcalLongRecoParams.h"
0021 #include "CondFormats/HcalObjects/interface/HcalLongRecoParam.h"
0022 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalTimingCorrector.h"
0023 #include "RecoLocalCalo/HcalRecAlgos/interface/HBHETimeProfileStatusBitSetter.h"
0024 #include "RecoLocalCalo/HcalRecAlgos/interface/HBHETimingShapedFlag.h"
0025 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalADCSaturationFlag.h"
0026 #include "RecoLocalCalo/HcalRecAlgos/interface/HFTimingTrustFlag.h"
0027 
0028 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0029 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0030 
0031 class HcalTopology;
0032 class HcalRecNumberingRecord;
0033 class HcalLongRecoParamsRcd;
0034 class HcalDbService;
0035 class HcalDbRecord;
0036 class HcalChannelQuality;
0037 class HcalChannelQualityRcd;
0038 class HcalSeverityLevelComputer;
0039 class HcalSeverityLevelComputerRcd;
0040 
0041 /** \class ZdcHitReconstructor
0042     
0043     \author E. Garcia - CSU
0044     ** Based on HcalSimpleReconstructor.h by J. Mans
0045     */
0046 class ZdcHitReconstructor : public edm::stream::EDProducer<> {
0047 public:
0048   explicit ZdcHitReconstructor(const edm::ParameterSet& ps);
0049   ~ZdcHitReconstructor() override;
0050   void beginRun(edm::Run const& r, edm::EventSetup const& es) final;
0051   void endRun(edm::Run const& r, edm::EventSetup const& es) final;
0052   void produce(edm::Event& e, const edm::EventSetup& c) final;
0053 
0054 private:
0055   ZdcSimpleRecAlgo reco_;
0056   HcalADCSaturationFlag* saturationFlagSetter_;
0057 
0058   DetId::Detector det_;
0059   int subdet_;
0060   HcalOtherSubdetector subdetOther_;
0061   edm::EDGetTokenT<ZDCDigiCollection> tok_input_hcal;
0062   edm::EDGetTokenT<ZDCDigiCollection> tok_input_castor;
0063 
0064   bool correctTiming_;        // turn on/off Ken Rossato's algorithm to fix timing
0065   bool setNoiseFlags_;        // turn on/off basic noise flags
0066   bool setHSCPFlags_;         // turn on/off HSCP noise flags
0067   bool setSaturationFlags_;   // turn on/off flag indicating ADC saturation
0068   bool setTimingTrustFlags_;  // turn on/off HF timing uncertainty flag
0069 
0070   bool dropZSmarkedPassed_;  // turn on/off dropping of zero suppression marked and passed digis
0071   std::vector<int> AuxTSvec_;
0072 
0073   // new lowGainEnergy variables
0074   int lowGainOffset_;
0075   double lowGainFrac_;
0076 
0077   std::unique_ptr<HcalLongRecoParams> longRecoParams_;  //noiseTS and signalTS from db
0078 
0079   // ES tokens
0080   edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> htopoToken_;
0081   edm::ESGetToken<HcalLongRecoParams, HcalLongRecoParamsRcd> paramsToken_;
0082   edm::ESGetToken<HcalDbService, HcalDbRecord> conditionsToken_;
0083   edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> qualToken_;
0084   edm::ESGetToken<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd> sevToken_;
0085 };
0086 
0087 #endif