#include <SimCalorimetry/HcalSimProducers/src/HcalTestHitGenerator.h>
Public Member Functions | |
virtual void | getNoiseHits (std::vector< PCaloHit > &noiseHits) |
HcalTestHitGenerator (const edm::ParameterSet &ps) | |
virtual | ~HcalTestHitGenerator () |
Private Attributes | |
std::vector< double > | theBarrelSampling |
std::vector< double > | theEndcapSampling |
Definition at line 8 of file HcalTestHitGenerator.h.
HcalTestHitGenerator::HcalTestHitGenerator | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 6 of file HcalTestHitGenerator.cc.
00007 : theBarrelSampling(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<double> >("samplingFactors")), 00008 theEndcapSampling(ps.getParameter<edm::ParameterSet>("he").getParameter<std::vector<double> >("samplingFactors")) 00009 { 00010 }
virtual HcalTestHitGenerator::~HcalTestHitGenerator | ( | ) | [inline, virtual] |
Implements CaloVNoiseHitGenerator.
Definition at line 13 of file HcalTestHitGenerator.cc.
References detId, e, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, DetId::rawId(), theBarrelSampling, and theEndcapSampling.
00014 { 00015 00016 double e = 10.; 00017 00018 for(int i = 1; i <= 16; ++i) 00019 { 00020 HcalDetId detId(HcalBarrel, i, 1, 1); 00021 PCaloHit hit(detId.rawId(), e/theBarrelSampling[i-1], 0., 0., 0); 00022 noiseHits.push_back(hit); 00023 } 00024 00025 // ring 16 is special 00026 HcalDetId detId(HcalEndcap, 16, 1, 3); 00027 PCaloHit hit(detId.rawId(), e/theEndcapSampling[0], 0., 0., 0); 00028 noiseHits.push_back(hit); 00029 00030 for(int i = 17; i <= 29; ++i) 00031 { 00032 HcalDetId detId(HcalEndcap, i, 1, 1); 00033 PCaloHit hit(detId.rawId(), e/theEndcapSampling[i-16], 0., 0., 0); 00034 noiseHits.push_back(hit); 00035 } 00036 00037 HcalDetId outerDetId(HcalOuter, 1, 1, 4); 00038 PCaloHit outerHit(outerDetId.rawId(), 0.45, 0., 0., 0); 00039 00040 HcalDetId forwardDetId1(HcalForward, 30, 1, 1); 00041 PCaloHit forwardHit1(forwardDetId1.rawId(), 35., 0., 0., 0); 00042 00043 HcalDetId forwardDetId2(HcalForward, 30, 1, 2); 00044 PCaloHit forwardHit2(forwardDetId2.rawId(), 48., 0., 0., 0); 00045 00046 HcalZDCDetId zdcDetId(HcalZDCDetId::Section(2),true,1); 00047 PCaloHit zdcHit(zdcDetId.rawId(), 50.0, 0.); 00048 00049 noiseHits.push_back(outerHit); 00050 noiseHits.push_back(forwardHit1); 00051 noiseHits.push_back(forwardHit2); 00052 //noiseHits.push_back(zdcHit); 00053 00054 }
std::vector<double> HcalTestHitGenerator::theBarrelSampling [private] |
std::vector<double> HcalTestHitGenerator::theEndcapSampling [private] |