Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:02:11

0001 #ifndef RecoTBCalo_EcalTBRecProducers_EcalTBWeightUncalibRecHitProducer_HH
0002 #define RecoTBCalo_EcalTBRecProducers_EcalTBWeightUncalibRecHitProducer_HH
0003 
0004 #include "FWCore/Framework/interface/stream/EDProducer.h"
0005 #include "FWCore/Utilities/interface/InputTag.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "FWCore/Framework/interface/EventSetup.h"
0009 
0010 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecWeightsAlgo.h"
0011 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0012 #include "DataFormats/EcalDigi/interface/EBDataFrame.h"
0013 #include "DataFormats/EcalDigi/interface/EEDataFrame.h"
0014 #include "TBDataFormats/EcalTBObjects/interface/EcalTBTDCRecInfo.h"
0015 #include "CondFormats/EcalObjects/interface/EcalPedestals.h"
0016 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h"
0017 #include "CondFormats/EcalObjects/interface/EcalWeightXtalGroups.h"
0018 #include "CondFormats/DataRecord/interface/EcalWeightXtalGroupsRcd.h"
0019 #include "CondFormats/EcalObjects/interface/EcalWeight.h"
0020 #include "CondFormats/EcalObjects/interface/EcalTBWeights.h"
0021 #include "CondFormats/DataRecord/interface/EcalTBWeightsRcd.h"
0022 #include "CondFormats/EcalObjects/interface/EcalGainRatios.h"
0023 #include "CondFormats/DataRecord/interface/EcalGainRatiosRcd.h"
0024 #include "SimCalorimetry/EcalSimAlgos/interface/EBShape.h"
0025 #include "SimCalorimetry/EcalSimAlgos/interface/EEShape.h"
0026 
0027 // forward declaration
0028 class EcalTBWeightUncalibRecHitProducer : public edm::stream::EDProducer<> {
0029 public:
0030   typedef std::vector<double> EcalRecoAmplitudes;
0031   explicit EcalTBWeightUncalibRecHitProducer(const edm::ParameterSet& ps);
0032   ~EcalTBWeightUncalibRecHitProducer() override;
0033   void produce(edm::Event& evt, const edm::EventSetup& es) override;
0034 
0035 private:
0036   const edm::InputTag ebDigiCollection_;
0037   const edm::InputTag eeDigiCollection_;
0038   const edm::InputTag tdcRecInfoCollection_;
0039 
0040   const std::string ebHitCollection_;  // secondary name to be given to collection of hit
0041   const std::string eeHitCollection_;  // secondary name to be given to collection of hit
0042 
0043   const edm::EDGetTokenT<EBDigiCollection> ebDigiToken_;
0044   const edm::EDGetTokenT<EEDigiCollection> eeDigiToken_;
0045   const edm::EDGetTokenT<EcalTBTDCRecInfo> tbTDCRecInfoToken_;
0046   const edm::ESGetToken<EcalWeightXtalGroups, EcalWeightXtalGroupsRcd> weightXtalGroupsToken_;
0047   const edm::ESGetToken<EcalGainRatios, EcalGainRatiosRcd> gainRatiosToken_;
0048   const edm::ESGetToken<EcalTBWeights, EcalTBWeightsRcd> tbWeightsToken_;
0049   const edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> pedestalsToken_;
0050 
0051   EcalUncalibRecHitRecWeightsAlgo<EBDataFrame> ebAlgo_;
0052   EcalUncalibRecHitRecWeightsAlgo<EEDataFrame> eeAlgo_;
0053 
0054   const EEShape testbeamEEShape;
0055   const EBShape testbeamEBShape;
0056 
0057   /*     HepMatrix makeMatrixFromVectors(const std::vector< std::vector<EcalWeight> >& vecvec); */
0058   /*     HepMatrix makeDummySymMatrix(int size); */
0059 
0060   const int nbTimeBin_;
0061 
0062   //use 2004 convention for the TDC
0063   const bool use2004OffsetConvention_;
0064 };
0065 #endif