40 class HepRandomEngine;
99 theHitsProducerTag(ps.getParameter<
edm::
InputTag>(
"hitsProducer")),
104 theCastorResponse(new
CaloHitResponse(theParameterMap, theCastorIntegratedShape)),
105 theAmplifier(nullptr),
106 theCoderFactory(nullptr),
107 theElectronicsSim(nullptr),
108 theHitCorrection(nullptr),
109 theCastorDigitizer(nullptr),
130 throw cms::Exception(
"Configuration") <<
"CastorDigiProducer requires the RandomNumberGeneratorService\n" 131 "which is not present in the configuration file. You must add the " 133 "in the configuration file or remove the modules that require it.";
160 edm::LogInfo(
"CastorDigiProducer") <<
"checking the geometry...";
204 edm::LogInfo(
"CastorDigiProducer") <<
"HCAL/Castor digis : " << castorResult->size();
213 for (edm::PCaloHitContainer::const_iterator hitItr =
hits.begin(); hitItr !=
hits.end(); ++hitItr) {
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
CastorAmplifier * theAmplifier
CaloVShape * theCastorShape
T getParameter(std::string const &) const
std::vector< PCaloHit > PCaloHitContainer
void add(const std::vector< PCaloHit > &hits, int bunchCrossing, CLHEP::HepRandomEngine *engine)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
void fillChargeSums(MixCollection< PCaloHit > &hits)
~CastorDigiProducer() override
CaloTDigitizer< CastorDigitizerTraits > CastorDigitizer
T const * product() const
void checkGeometry(const edm::EventSetup &eventSetup)
void setDbService(const CastorDbService *service)
CastorSimParameterMap * theParameterMap
Electronic response of the preamp.
void sortHits(const edm::PCaloHitContainer &hits)
fills the vectors for each subdetector
Log< level::Error, false > LogError
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
const edm::InputTag theHitsProducerTag
CLHEP::HepRandomEngine * randomEngine_
CastorElectronicsSim * theElectronicsSim
CastorHitFilter theCastorHitFilter
void setHitFilter(const CaloVHitFilter *filter)
Creates electronics signals from hits.
CaloHitResponse * theCastorResponse
std::vector< PCaloHit > theCastorHits
void fillFakeHits()
some hits in each subdetector, just for testing purposes
static const int SubdetectorId
void accumulateCaloHits(std::vector< PCaloHit > const &, int bunchCrossing)
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
const edm::EDGetTokenT< std::vector< PCaloHit > > hitToken_
Log< level::Info, false > LogInfo
CastorDigiProducer(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &iC)
constexpr uint32_t rawId() const
get the raw id
CastorHitCorrection * theHitCorrection
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
bool check(const edm::EventSetup &iSetup)
const edm::ESGetToken< CastorDbService, CastorDbRecord > theConditionsToken
CastorDigitizer * theCastorDigitizer
#define DEFINE_DIGI_ACCUMULATOR(type)
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
If you want to correct hits, for attenuation or delay, set this.
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theGeometryToken
CastorCoderFactory * theCoderFactory
edm::SortedCollection< CastorDataFrame > CastorDigiCollection
void setDbService(const CastorDbService *service)
the Producer will probably update this every event
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher
void setDbService(const CastorDbService *service)
CaloVShape * theCastorIntegratedShape
void setDetIds(const std::vector< DetId > &detIds)