Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:24

0001 #ifndef RecoLocalCalo_HcalRecAlgos_AbsHBHEPhase1Algo_h_
0002 #define RecoLocalCalo_HcalRecAlgos_AbsHBHEPhase1Algo_h_
0003 
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
0006 #include "DataFormats/HcalRecHit/interface/HBHEChannelInfo.h"
0007 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
0008 #include "CondFormats/HcalObjects/interface/HcalRecoParam.h"
0009 
0010 class AbsHcalAlgoData;
0011 
0012 //
0013 // It is assumed that the HBHE Phase 1 algorithms will be developed
0014 // utilizing pairs of classes: a DB class with relevant calibration
0015 // constants and configuration parameters, derived from AbsHcalAlgoData,
0016 // and the algo class, derived from AbsHBHEPhase1Algo, utilizing that DB class.
0017 //
0018 // We can expect that the same calibration constants might be utilized
0019 // by different reco algorithms.
0020 //
0021 // In principle, of course, the configuration objects do not have to be
0022 // actually stored in the database. It is expected that, at the early
0023 // stages of our understanding of energy reconstruction with QIE11
0024 // ASICs, these objects will be created from the module configuration
0025 // parameters.
0026 //
0027 class AbsHBHEPhase1Algo {
0028 public:
0029   inline virtual ~AbsHBHEPhase1Algo() {}
0030 
0031   inline virtual void beginRun(const edm::Run&, const edm::EventSetup&) {}
0032   inline virtual void endRun() {}
0033 
0034   // Does this class expect to receive its configuration from the database?
0035   virtual bool isConfigurable() const = 0;
0036 
0037   // If using DB, expect that the configuration will be updated
0038   // once per run. We will not manage the pointer here. "true"
0039   // should be returned on success (typically, automatic cast
0040   // from the pointer checked by the appropriate dynamic cast).
0041   inline virtual bool configure(const AbsHcalAlgoData*) { return false; }
0042 
0043   // Convention: if we do not want to use the given channel at
0044   // all (i.e., it is to be discarded), the returned HBHERecHit
0045   // should have its id (of type HcalDetId) set to 0.
0046   //
0047   // Note that "params" pointer is allowed to be null.
0048   //
0049   virtual HBHERecHit reconstruct(const HBHEChannelInfo& info,
0050                                  const HcalRecoParam* params,
0051                                  const HcalCalibrations& calibs,
0052                                  bool isRealData) = 0;
0053 };
0054 
0055 #endif  // RecoLocalCalo_HcalRecAlgos_AbsHBHEPhase1Algo_h_