41 class HepRandomEngine;
102 theCastorResponse(new
CaloHitResponse(theParameterMap, theCastorIntegratedShape)),
103 theAmplifier(nullptr),
104 theCoderFactory(nullptr),
105 theElectronicsSim(nullptr),
106 theHitCorrection(nullptr),
107 theCastorDigitizer(nullptr),
131 throw cms::Exception(
"Configuration") <<
"CastorDigiProducer requires the RandomNumberGeneratorService\n"
132 "which is not present in the configuration file. You must add the "
134 "in the configuration file or remove the modules that require it.";
161 edm::LogInfo(
"CastorDigiProducer") <<
"checking the geometry...";
206 edm::LogInfo(
"CastorDigiProducer") <<
"HCAL/Castor digis : " << castorResult->size();
215 for (edm::PCaloHitContainer::const_iterator hitItr = hits.begin(); hitItr != hits.end(); ++hitItr) {
216 DetId detId = hitItr->id();
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
int bunchCrossing() const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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
std::vector< PCaloHit > PCaloHitContainer
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
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
void checkGeometry(const edm::EventSetup &eventSetup)
constexpr uint32_t rawId() const
get the raw id
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.
CLHEP::HepRandomEngine * randomEngine_
CastorElectronicsSim * theElectronicsSim
bool getData(T &iHolder) const
CastorHitFilter theCastorHitFilter
void setHitFilter(const CaloVHitFilter *filter)
Creates electronics signals from hits.
CaloHitResponse * theCastorResponse
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< PCaloHit > theCastorHits
void fillFakeHits()
some hits in each subdetector, just for testing purposes
static const int SubdetectorId
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void accumulateCaloHits(std::vector< PCaloHit > const &, int bunchCrossing)
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Log< level::Info, false > LogInfo
CastorDigiProducer(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &iC)
T const * product() const
CastorHitCorrection * theHitCorrection
T getParameter(std::string const &) const
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
bool check(const edm::EventSetup &iSetup)
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
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
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
CastorCoderFactory * theCoderFactory
edm::SortedCollection< CastorDataFrame > CastorDigiCollection
void setDbService(const CastorDbService *service)
the Producer will probably update this every event
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher
edm::InputTag theHitsProducerTag
void setDbService(const CastorDbService *service)
CaloVShape * theCastorIntegratedShape
void setDetIds(const std::vector< DetId > &detIds)
constexpr Detector det() const
get the detector field from this detid