File indexing completed on 2024-09-10 02:59:03
0001 #ifndef CaloSimAlgos_CaloSimParameters_h
0002 #define CaloSimAlgos_CaloSimParameters_h
0003
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include <iosfwd>
0007
0008
0009
0010
0011
0012
0013
0014 class CaloSimParameters {
0015 public:
0016
0017 CaloSimParameters(double simHitToPhotoelectrons,
0018 double photoelectronsToAnalog,
0019 double samplingFactor,
0020 double timePhase,
0021 int readoutFrameSize,
0022 int binOfMaximum,
0023 bool doPhotostatistics,
0024 bool syncPhase = true);
0025
0026 CaloSimParameters(const edm::ParameterSet &p, bool skipPe2Fc = false);
0027
0028 virtual ~CaloSimParameters() {}
0029
0030
0031
0032
0033
0034 double simHitToPhotoelectrons() const { return simHitToPhotoelectrons_; }
0035 virtual double simHitToPhotoelectrons(const DetId &) const { return simHitToPhotoelectrons_; }
0036
0037
0038 double photoelectronsToAnalog() const { return photoelectronsToAnalog_; }
0039 virtual double photoelectronsToAnalog(const DetId &detId) const { return photoelectronsToAnalog_; }
0040
0041
0042 double timePhase() const { return timePhase_; }
0043
0044
0045 int readoutFrameSize() const { return readoutFrameSize_; }
0046
0047 int binOfMaximum() const { return binOfMaximum_; }
0048
0049
0050 void setReadoutFrameSize(int frameSize) { readoutFrameSize_ = frameSize; }
0051 void setBinOfMaximum(int binOfMax) { binOfMaximum_ = binOfMax; }
0052
0053
0054 bool doPhotostatistics() const { return doPhotostatistics_; }
0055
0056
0057
0058 bool syncPhase() const { return syncPhase_; }
0059
0060 private:
0061 double simHitToPhotoelectrons_;
0062 double photoelectronsToAnalog_;
0063 double timePhase_;
0064 int readoutFrameSize_;
0065 int binOfMaximum_;
0066 bool doPhotostatistics_;
0067 bool syncPhase_;
0068 };
0069
0070 std::ostream &operator<<(std::ostream &os, const CaloSimParameters &p);
0071
0072 #endif