CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/SimCalorimetry/CastorSim/plugins/CastorDigiProducer.h

Go to the documentation of this file.
00001 #ifndef CastorDigiProducer_h
00002 #define CastorDigiProducer_h
00003 
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005 #include "FWCore/Framework/interface/Event.h"
00006 #include "FWCore/Framework/interface/EventSetup.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include "SimCalorimetry/CastorSim/src/CastorDigitizerTraits.h"
00009 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
00010 #include "SimCalorimetry/CaloSimAlgos/interface/CaloTDigitizer.h"
00011 #include "SimCalorimetry/CastorSim/src/CastorSimParameterMap.h"
00012 #include "SimCalorimetry/CastorSim/src/CastorShape.h"
00013 #include "SimCalorimetry/CastorSim/src/CastorElectronicsSim.h"
00014 #include "SimCalorimetry/CastorSim/src/CastorHitFilter.h"
00015 #include "SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h"
00016 #include "SimCalorimetry/CastorSim/src/CastorAmplifier.h"
00017 #include "SimCalorimetry/CastorSim/src/CastorCoderFactory.h"
00018 #include "SimCalorimetry/CastorSim/src/CastorHitCorrection.h"
00019 #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h"
00020 
00021 #include <vector>
00022 
00023 class PCaloHit;
00024 class PileUpEventPrincipal;
00025 
00026 class CastorDigiProducer : public DigiAccumulatorMixMod {
00027 public:
00028 
00029   explicit CastorDigiProducer(const edm::ParameterSet& ps, edm::EDProducer& mixMod);
00030   virtual ~CastorDigiProducer();
00031 
00032   virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c);
00033   virtual void accumulate(edm::Event const& e, edm::EventSetup const& c);
00034   virtual void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c);
00035   virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c);
00036 
00037 private:
00038   void accumulateCaloHits(std::vector<PCaloHit> const&, int bunchCrossing);
00039 
00041   void sortHits(const edm::PCaloHitContainer & hits);
00043   void fillFakeHits();
00046   void checkGeometry(const edm::EventSetup& eventSetup);
00047 
00049   typedef CaloTDigitizer<CastorDigitizerTraits> CastorDigitizer;
00050  
00051   CastorSimParameterMap * theParameterMap;
00052   CaloVShape * theCastorShape;
00053   CaloVShape * theCastorIntegratedShape;
00054 
00055   CaloHitResponse * theCastorResponse;
00056 
00057   CastorAmplifier * theAmplifier;
00058   CastorCoderFactory * theCoderFactory;
00059   CastorElectronicsSim * theElectronicsSim;
00060 
00061   CastorHitFilter theCastorHitFilter;
00062 
00063   CastorHitCorrection * theHitCorrection;
00064 
00065   CastorDigitizer* theCastorDigitizer;
00066 
00067   std::vector<PCaloHit> theCastorHits;
00068 
00069 };
00070 
00071 #endif
00072