Go to the documentation of this file.00001 #ifndef FastSimulation__EcalBarrelRecHitsMaker__h
00002 #define FastSimulation__EcalBarrelRecHitsMaker__h
00003
00004 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00005 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00006 #include "DataFormats/EcalDetId/interface/EcalTrigTowerDetId.h"
00007 #include "FWCore/Utilities/interface/InputTag.h"
00008
00009
00010 class RandomEngine;
00011 class EcalTrigTowerConstituentsMap;
00012 class GaussianTail;
00013
00014 namespace edm {
00015 class ParameterSet;
00016 class Event;
00017 class EventSetup;
00018 }
00019
00020 class EcalBarrelRecHitsMaker
00021 {
00022 public:
00023 EcalBarrelRecHitsMaker(edm::ParameterSet const & p, const RandomEngine* );
00024 ~EcalBarrelRecHitsMaker();
00025
00026 void loadEcalBarrelRecHits(edm::Event &iEvent, EBRecHitCollection & ecalHits,EBDigiCollection & ecaldigis);
00027 void init(const edm::EventSetup &es,bool dodigis,bool doMiscalib);
00028
00029 private:
00030 void clean();
00031 void loadPCaloHits(const edm::Event & iEvent);
00032 void geVtoGainAdc(float e,unsigned& gain,unsigned &adc) const;
00033 void noisifyTriggerTowers();
00034 bool noisifyTriggerTower(unsigned tthi);
00035 void randomNoisifier();
00036 bool isHighInterest(int tthi);
00037
00038
00039 private:
00040 bool doDigis_;
00041 bool doMisCalib_;
00042 double refactor_;
00043 double refactor_mean_;
00044
00045 double threshold_;
00046 double noise_;
00047 double calibfactor_;
00048 double EBHotFraction_ ;
00049 const RandomEngine* random_;
00050 const GaussianTail* myGaussianTailGenerator_;
00051
00052 bool noisified_;
00053 edm::InputTag inputCol_;
00054
00055 std::vector<float> theCalorimeterHits_;
00056
00057 std::vector<int> theFiredCells_;
00058
00059 std::vector<int> applyZSCells_;
00060
00061 std::vector<float> theCalibConstants_;
00062
00063
00064 std::vector<uint32_t> barrelRawId_;
00065 float adcToGeV_;
00066 float geVToAdc1_,geVToAdc2_,geVToAdc3_;
00067 unsigned minAdc_;
00068 unsigned maxAdc_;
00069 float t1_,t2_,sat_;
00070
00071 const EcalTrigTowerConstituentsMap* eTTmap_;
00072
00073 std::vector<EcalTrigTowerDetId> theTTDetIds_;
00074
00075 std::vector<float> TTTEnergy_;
00076
00077 std::vector<unsigned> theFiredTTs_;
00078
00079 std::vector<bool> treatedTTs_;
00080
00081 std::vector<std::vector<int> > neighboringTTs_;
00082
00083 std::vector<std::vector<int> > crystalsinTT_;
00084
00085 std::vector<int> theTTofHighInterest_;
00086
00087 std::vector<int> TTHighInterest_;
00088
00089
00090
00091 std::vector<double> highNoiseParameters_ ;
00092 bool doCustomHighNoise_;
00093
00094
00095 float SRThreshold_;
00096 int SREtaSize_;
00097 int SRPhiSize_;
00098
00099 std::vector<float> sinTheta_;
00100
00101 std::vector<float> noisesigma_;
00102 double meanNoiseSigmaEt_ ;
00103
00104 double noiseADC_;
00105
00106 const std::vector<float> * ICMC_;
00107
00108 };
00109
00110 #endif