CMS 3D CMS Logo

SiStripApvSimulationParameters.h
Go to the documentation of this file.
1 #ifndef SiStripApvSimulationParameters_h
2 #define SiStripApvSimulationParameters_h
3 
5 
6 #include <vector>
9 
10 namespace CLHEP {
11  class HepRandomEngine;
12 }
13 
18 public:
19  using layerid = unsigned int;
21 
23  : m_nTIB(nTIB), m_nTOB(nTOB), m_nTID(nTID), m_nTEC(nTEC) {
24  m_barrelParam.resize(m_nTIB + m_nTOB);
26  m_endcapParam.resize(m_nTID + m_nTEC);
28  }
31 
32  void calculateIntegrals(); // make sure integrals have been calculated
33 
34  bool putTIB(layerid layer, const LayerParameters& params) { return putTIB(layer, LayerParameters(params)); }
35  bool putTIB(layerid layer, LayerParameters&& params);
36 
37  bool putTOB(layerid layer, const LayerParameters& params) { return putTOB(layer, LayerParameters(params)); }
38  bool putTOB(layerid layer, LayerParameters&& params);
39 
42 
45 
46  const LayerParameters& getTIB(layerid layer) const { return m_barrelParam[layer - 1]; }
47  const LayerParameters& getTOB(layerid layer) const { return m_barrelParam[m_nTIB + layer - 1]; }
48  const LayerParameters& getTID(layerid wheel) const { return m_endcapParam[wheel - 1]; }
49  const LayerParameters& getTEC(layerid wheel) const { return m_endcapParam[m_nTID + wheel - 1]; }
50 
51  float sampleTIB(layerid layer, float z, float pu, CLHEP::HepRandomEngine* engine) const {
52  return sampleBarrel(layer - 1, z, pu, engine);
53  }
54  float sampleTOB(layerid layer, float z, float pu, CLHEP::HepRandomEngine* engine) const {
55  return sampleBarrel(m_nTIB + layer - 1, z, pu, engine);
56  };
57  float sampleTID(layerid wheel, float r, float pu, CLHEP::HepRandomEngine* engine) const {
58  return sampleEndcap(wheel - 1, r, pu, engine);
59  }
60  float sampleTEC(layerid wheel, float r, float pu, CLHEP::HepRandomEngine* engine) const {
61  return sampleEndcap(m_nTID + wheel - 1, r, pu, engine);
62  }
63 
64 private:
66  std::vector<PhysicsTools::Calibration::HistogramF3D> m_barrelParam;
67  std::vector<PhysicsTools::Calibration::HistogramF2D> m_barrelParam_xInt;
68  std::vector<PhysicsTools::Calibration::HistogramF3D> m_endcapParam;
69  std::vector<PhysicsTools::Calibration::HistogramF2D> m_endcapParam_xInt;
70 
71  float sampleBarrel(layerid layerIdx, float z, float pu, CLHEP::HepRandomEngine* engine) const;
72  float sampleEndcap(layerid wheelIdx, float r, float pu, CLHEP::HepRandomEngine* engine) const;
73 
75 };
76 
77 #endif
SiStripApvSimulationParameters::m_endcapParam_xInt
std::vector< PhysicsTools::Calibration::HistogramF2D > m_endcapParam_xInt
Definition: SiStripApvSimulationParameters.h:69
SiStripApvSimulationParameters::m_nTOB
layerid m_nTOB
Definition: SiStripApvSimulationParameters.h:65
SiStripApvSimulationParameters::getTOB
const LayerParameters & getTOB(layerid layer) const
Definition: SiStripApvSimulationParameters.h:47
SiStripApvSimulationParameters::m_nTEC
layerid m_nTEC
Definition: SiStripApvSimulationParameters.h:65
SiStripApvSimulationParameters::LayerParameters
PhysicsTools::Calibration::HistogramF3D LayerParameters
Definition: SiStripApvSimulationParameters.h:20
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
SiStripApvSimulationParameters::SiStripApvSimulationParameters
SiStripApvSimulationParameters()
Definition: SiStripApvSimulationParameters.h:29
Histogram3D.h
SiStripApvSimulationParameters::m_nTIB
layerid m_nTIB
Definition: SiStripApvSimulationParameters.h:65
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiStripApvSimulationParameters::sampleTID
float sampleTID(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:57
SiStripApvSimulationParameters::m_barrelParam
std::vector< PhysicsTools::Calibration::HistogramF3D > m_barrelParam
Definition: SiStripApvSimulationParameters.h:66
SiStripApvSimulationParameters::putTEC
bool putTEC(layerid wheel, const LayerParameters &params)
Definition: SiStripApvSimulationParameters.h:43
DDAxes::z
SiStripApvSimulationParameters::sampleTIB
float sampleTIB(layerid layer, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:51
CLHEP
Definition: CocoaGlobals.h:27
SiStripApvSimulationParameters::getTEC
const LayerParameters & getTEC(layerid wheel) const
Definition: SiStripApvSimulationParameters.h:49
SiStripApvSimulationParameters::~SiStripApvSimulationParameters
~SiStripApvSimulationParameters()
Definition: SiStripApvSimulationParameters.h:30
SiStripApvSimulationParameters::putTIB
bool putTIB(layerid layer, const LayerParameters &params)
Definition: SiStripApvSimulationParameters.h:34
SiStripApvSimulationParameters::SiStripApvSimulationParameters
SiStripApvSimulationParameters(layerid nTIB, layerid nTOB, layerid nTID, layerid nTEC)
Definition: SiStripApvSimulationParameters.h:22
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
createfilelist.int
int
Definition: createfilelist.py:10
SiStripApvSimulationParameters::m_endcapParam
std::vector< PhysicsTools::Calibration::HistogramF3D > m_endcapParam
Definition: SiStripApvSimulationParameters.h:68
Serializable.h
SiStripApvSimulationParameters::putTOB
bool putTOB(layerid layer, const LayerParameters &params)
Definition: SiStripApvSimulationParameters.h:37
SiStripApvSimulationParameters::putTID
bool putTID(layerid wheel, const LayerParameters &params)
Definition: SiStripApvSimulationParameters.h:40
SiStripApvSimulationParameters::getTID
const LayerParameters & getTID(layerid wheel) const
Definition: SiStripApvSimulationParameters.h:48
alignCSCRings.r
r
Definition: alignCSCRings.py:93
SiStripApvSimulationParameters::layerid
unsigned int layerid
Definition: SiStripApvSimulationParameters.h:19
SiStripApvSimulationParameters::sampleBarrel
float sampleBarrel(layerid layerIdx, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.cc:104
SiStripApvSimulationParameters::calculateIntegrals
void calculateIntegrals()
Definition: SiStripApvSimulationParameters.cc:41
Histogram2D.h
SiStripApvSimulationParameters::sampleEndcap
float sampleEndcap(layerid wheelIdx, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.cc:132
PhysicsTools::Calibration::Histogram3D
Definition: Histogram3D.h:24
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
SiStripApvSimulationParameters::getTIB
const LayerParameters & getTIB(layerid layer) const
Definition: SiStripApvSimulationParameters.h:46
SiStripApvSimulationParameters::sampleTEC
float sampleTEC(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:60
SiStripApvSimulationParameters::sampleTOB
float sampleTOB(layerid layer, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:54
SiStripApvSimulationParameters::m_nTID
layerid m_nTID
Definition: SiStripApvSimulationParameters.h:65
SiStripApvSimulationParameters
Definition: SiStripApvSimulationParameters.h:17
PhysicsTools::Calibration::HistogramF3D
Histogram3D< float > HistogramF3D
Definition: Histogram3D.h:183
SiStripApvSimulationParameters::m_barrelParam_xInt
std::vector< PhysicsTools::Calibration::HistogramF2D > m_barrelParam_xInt
Definition: SiStripApvSimulationParameters.h:67