00001 #ifndef FastSimulation__EcalPreshowerRecHitsMaker__h
00002 #define FastSimulation__EcalPreshowerRecHitsMaker__h
00003
00004 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00005 #include "FastSimulation/Utilities/interface/GaussianTail.h"
00006 #include "FWCore/ParameterSet/interface/InputTag.h"
00007 #include <map>
00008 #include <vector>
00009
00010
00011
00012 class CaloGeometry;
00013 class RandomEngine;
00014
00015 namespace edm {
00016 class ParameterSet;
00017 class Event;
00018 class EventSetup;
00019 }
00020
00021 class EcalPreshowerRecHitsMaker
00022 {
00023 public:
00024
00025 EcalPreshowerRecHitsMaker(edm::ParameterSet const & p,
00026 const RandomEngine* random);
00027
00028 ~EcalPreshowerRecHitsMaker();
00029
00030 void loadEcalPreshowerRecHits(edm::Event &iEvent, ESRecHitCollection& esRecHits);
00031 void init(const edm::EventSetup &es);
00032
00033
00034
00035 private:
00036
00037 void loadPCaloHits(const edm::Event & iEvent);
00038
00039 void clean();
00040
00041 unsigned createVectorsOfCells(const edm::EventSetup &es);
00042 void noisifySubdet(std::map<uint32_t, std::pair<float,bool> >& theMap, const std::vector<uint32_t>& thecells, unsigned ncells);
00043 void noisifySignal(std::map<uint32_t,std::pair<float,bool> >& theMap);
00044 void noisify();
00045 void Fill(uint32_t id,float energy, std::map<uint32_t,std::pair<float,bool> >& myHits,bool signal=true);
00046
00047 private:
00048 edm::InputTag inputCol_;
00049 double threshold_;
00050 double noise_;
00051 double preshowerHotFraction_;
00052 bool initialized_;
00053 unsigned ncells_;
00054 std::map<uint32_t,std::pair<float,bool> > ecalsRecHits_;
00055 std::vector<uint32_t> escells_;
00056 const RandomEngine* random_;
00057 const GaussianTail* myGaussianTailGenerator_;
00058 };
00059
00060 #endif