test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HcalTestHitGenerator Class Reference

#include <HcalTestHitGenerator.h>

Inheritance diagram for HcalTestHitGenerator:
CaloVNoiseHitGenerator

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
 

Detailed Description

Definition at line 8 of file HcalTestHitGenerator.h.

Constructor & Destructor Documentation

HcalTestHitGenerator::HcalTestHitGenerator ( const edm::ParameterSet ps)
explicit

Definition at line 6 of file HcalTestHitGenerator.cc.

7 : theBarrelSampling(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<double> >("samplingFactors")),
8  theEndcapSampling(ps.getParameter<edm::ParameterSet>("he").getParameter<std::vector<double> >("samplingFactors"))
9 {
10 }
T getParameter(std::string const &) const
std::vector< double > theEndcapSampling
std::vector< double > theBarrelSampling
virtual HcalTestHitGenerator::~HcalTestHitGenerator ( )
inlinevirtual

Definition at line 12 of file HcalTestHitGenerator.h.

12 {}

Member Function Documentation

void HcalTestHitGenerator::getNoiseHits ( std::vector< PCaloHit > &  noiseHits)
virtual

Implements CaloVNoiseHitGenerator.

Definition at line 13 of file HcalTestHitGenerator.cc.

References alignCSCRings::e, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, DetId::rawId(), theBarrelSampling, and theEndcapSampling.

14 {
15  // just say about a foot a nanosecond, pluis 10 for showers
16  double e = 10.;
17  double hbTof = 17.;
18  double heTof = 23.;
19  double hfTof = 43.;
20  double hoTof = 22.;
21  for(int i = 1; i <= 16; ++i)
22  {
23  HcalDetId detId(HcalBarrel, i, 1, 1);
24  noiseHits.emplace_back(detId.rawId(), e/theBarrelSampling[i-1], hbTof, 0., 0);
25  }
26 
27  // ring 16 is special
28  HcalDetId detId(HcalEndcap, 16, 1, 3);
29  noiseHits.emplace_back(detId.rawId(), e/theEndcapSampling[0], heTof, 0., 0);
30 
31  for(int i = 17; i <= 29; ++i)
32  {
33  HcalDetId detId(HcalEndcap, i, 1, 1);
34  noiseHits.emplace_back(detId.rawId(), e/theEndcapSampling[i-16], heTof, 0., 0);
35  }
36 
37  HcalDetId outerDetId(HcalOuter, 1, 1, 4);
38  noiseHits.emplace_back(outerDetId.rawId(), 0.45, hoTof, 0., 0);
39 
40  HcalDetId forwardDetId1(HcalForward, 30, 1, 1);
41  noiseHits.emplace_back(forwardDetId1.rawId(), 35., hfTof, 0., 0);
42 
43  HcalDetId forwardDetId2(HcalForward, 30, 1, 2);
44  noiseHits.emplace_back(forwardDetId2.rawId(), 48., hfTof, 0., 0);
45 
46  //HcalZDCDetId zdcDetId(HcalZDCDetId::Section(2),true,1);
47  //noiseHits.emplace_back(zdcDetId.rawId(), 50.0, 0.);
48 
49 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > theEndcapSampling
std::vector< double > theBarrelSampling

Member Data Documentation

std::vector<double> HcalTestHitGenerator::theBarrelSampling
private

Definition at line 15 of file HcalTestHitGenerator.h.

Referenced by getNoiseHits().

std::vector<double> HcalTestHitGenerator::theEndcapSampling
private

Definition at line 16 of file HcalTestHitGenerator.h.

Referenced by getNoiseHits().