Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalCalo_HcalRecAlgos_AbsHFPhase1Algo_h_
0002 #define RecoLocalCalo_HcalRecAlgos_AbsHFPhase1Algo_h_
0003 
0004 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0005 #include "DataFormats/HcalRecHit/interface/HFPreRecHit.h"
0006 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
0007 
0008 class AbsHcalAlgoData;
0009 
0010 //
0011 // It is assumed that the HF Phase 1 algorithms will be developed
0012 // utilizing pairs of classes: a DB class with relevant calibration
0013 // constants and configuration parameters, derived from AbsHcalAlgoData,
0014 // and the algo class, derived from AbsHFPhase1Algo, utilizing that DB class.
0015 //
0016 // We can expect that the same calibration constants might be utilized
0017 // by different reco algorithms.
0018 //
0019 // In principle, of course, the configuration objects do not have to be
0020 // actually stored in the database. It is expected that, at the early
0021 // stages of our understanding of energy reconstruction with dual-anode
0022 // PMTs, these objects will be created from the module configuration
0023 // parameters.
0024 //
0025 class AbsHFPhase1Algo {
0026 public:
0027   inline virtual ~AbsHFPhase1Algo() {}
0028 
0029   // Does this class expect to receive its configuration from the database?
0030   virtual bool isConfigurable() const = 0;
0031 
0032   // If using DB, expect that the configuration will be updated
0033   // once per run. We will not manage the pointer here. "true"
0034   // should be returned on success (typically, automatic cast
0035   // from the pointer checked by the appropriate dynamic cast).
0036   inline virtual bool configure(const AbsHcalAlgoData*) { return false; }
0037 
0038   // Convention: if we do not want to use the given HFPreRecHit
0039   // at all (i.e., it is to be discarded), the returned HFRecHit
0040   // should have its id (of type HcalDetId) set to 0.
0041   virtual HFRecHit reconstruct(const HFPreRecHit& prehit,
0042                                const HcalCalibrations& calibs,
0043                                const bool flaggedBadInDB[2],
0044                                bool expectSingleAnodePMT) = 0;
0045 };
0046 
0047 #endif  // RecoLocalCalo_HcalRecAlgos_AbsHFPhase1Algo_h_