CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hph::Setup Class Reference

#include <HitPatternHelper.h>

Public Member Functions

double chosenRofZ () const
 
int digiCot (double cot, int binEta) const
 
int digiZT (double z0, double cot, int binEta) const
 
int etaRegion (double z0, double cot, bool useNewKF) const
 
std::vector< double > etaRegions () const
 
bool hphDebug () const
 
const std::vector< int > & layerEncoding (int binEta, int binZT, int binCot) const
 
const std::map< int, const tt::SensorModule * > & layerEncodingMap (int binEta, int binZT, int binCot) const
 
std::map< int, std::map< int, std::vector< int > > > layermap () const
 
int nKalmanLayers () const
 
 Setup (const edm::ParameterSet &iConfig, const tt::Setup &setupTT, const trackerTFP::DataFormats &dataFormats, const trackerTFP::LayerEncoding &layerEncoding)
 
bool useNewKF () const
 
 ~Setup ()
 

Private Attributes

double chosenRofZ_
 
double chosenRofZNewKF_
 
const trackerTFP::DataFormats dataFormats_
 
const trackerTFP::DataFormat dfcot_
 
const trackerTFP::DataFormat dfzT_
 
std::vector< double > etaRegions_
 
std::vector< double > etaRegionsNewKF_
 
bool hphDebug_
 
edm::ParameterSet iConfig_
 
const trackerTFP::LayerEncoding layerEncoding_
 
std::map< int, std::map< int, std::vector< int > > > layermap_
 
int nEtaRegions_
 
int nKalmanLayers_
 
edm::ParameterSet oldKFPSet_
 
const tt::Setup setupTT_
 
bool useNewKF_
 

Detailed Description

Definition at line 45 of file HitPatternHelper.h.

Constructor & Destructor Documentation

◆ Setup()

hph::Setup::Setup ( const edm::ParameterSet iConfig,
const tt::Setup setupTT,
const trackerTFP::DataFormats dataFormats,
const trackerTFP::LayerEncoding layerEncoding 
)

Definition at line 16 of file HitPatternHelper.cc.

References tmtt::TrackerModule::calcLayerIdReduced(), chosenRofZ_, chosenRofZNewKF_, etaRegions_, etaRegionsNewKF_, edm::ParameterSet::getParameter(), mps_fire::i, dqmiolumiharvest::j, PostProcessor_cff::layerIds, tmtt::KFbase::layerMap_, layermap_, nEtaRegions_, nKalmanLayers_, oldKFPSet_, and useNewKF_.

20  : iConfig_(iConfig),
21  oldKFPSet_(iConfig.getParameter<edm::ParameterSet>("oldKFPSet")),
22  setupTT_(setupTT),
23  dataFormats_(dataFormats),
27  hphDebug_(iConfig.getParameter<bool>("hphDebug")),
28  useNewKF_(iConfig.getParameter<bool>("useNewKF")),
31  layermap_(),
34  if (useNewKF_) {
37  } else {
38  chosenRofZ_ = oldKFPSet_.getParameter<double>("ChosenRofZ");
39  etaRegions_ = oldKFPSet_.getParameter<std::vector<double>>("EtaRegions");
40  }
41  static constexpr auto layerIds = {1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15}; //layer ID 11~15 correspond to D1~D5
42  // Converting tmtt::KFbase::layerMap_ to a format that is acceptatble by HitPatternHelper
43  for (int i = 0; i < nEtaRegions_; i++) {
44  for (int j : layerIds) {
45  int layer;
46  if (j < 7) {
48  } else {
50  }
51  if (layer < nKalmanLayers_) {
52  layermap_[i][layer].push_back(j);
53  }
54  }
55  }
56  }
static constexpr std::pair< unsigned, unsigned > layerMap_[nEta_/2][nGPlayer_+1]
Definition: KFbase.h:61
edm::ParameterSet iConfig_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double chosenRofZ() const
Definition: Setup.h:413
double chosenRofZ_
double boundarieEta(int eta) const
Definition: Setup.h:417
static const unsigned int nEta_
Definition: KFbase.h:52
const trackerTFP::DataFormat dfcot_
double chosenRofZNewKF_
const trackerTFP::LayerEncoding layerEncoding_
const trackerTFP::DataFormat dfzT_
edm::ParameterSet oldKFPSet_
static const unsigned int nKFlayer_
Definition: KFbase.h:51
std::vector< double > etaRegionsNewKF_
const trackerTFP::DataFormats dataFormats_
static unsigned int calcLayerIdReduced(unsigned int layerId)
const tt::Setup setupTT_
std::vector< double > etaRegions_
const std::vector< int > & layerEncoding(int binEta, int binZT, int binCot) const
std::map< int, std::map< int, std::vector< int > > > layermap_
const DataFormat & format(Variable v, Process p) const
Definition: DataFormats.h:506

◆ ~Setup()

hph::Setup::~Setup ( )
inline

Definition at line 51 of file HitPatternHelper.h.

51 {}

Member Function Documentation

◆ chosenRofZ()

double hph::Setup::chosenRofZ ( ) const
inline

Definition at line 55 of file HitPatternHelper.h.

References chosenRofZ_.

Referenced by etaRegion().

55 { return chosenRofZ_; }
double chosenRofZ_

◆ digiCot()

int hph::Setup::digiCot ( double  cot,
int  binEta 
) const

Definition at line 261 of file HitPatternHelper.cc.

References dfcot_, trackerTFP::DataFormat::digi(), trackerTFP::DataFormat::integer(), tt::Setup::sectorCot(), setupTT_, and trackerTFP::DataFormat::toUnsigned().

261  {
262  double cotLocal = dfcot_.digi(cot - setupTT_.sectorCot(binEta));
263  return dfcot_.toUnsigned(dfcot_.integer(cotLocal));
264  }
const trackerTFP::DataFormat dfcot_
int integer(double d) const
Definition: DataFormats.h:96
const tt::Setup setupTT_
int toUnsigned(int i) const
Definition: DataFormats.h:102
double digi(double d) const
Definition: DataFormats.h:98
double sectorCot(int eta) const
Definition: Setup.h:428

◆ digiZT()

int hph::Setup::digiZT ( double  z0,
double  cot,
int  binEta 
) const

Definition at line 266 of file HitPatternHelper.cc.

References tt::Setup::chosenRofZ(), dfzT_, trackerTFP::DataFormat::digi(), trackerTFP::DataFormat::integer(), tt::Setup::sectorCot(), setupTT_, and trackerTFP::DataFormat::toUnsigned().

266  {
267  double zT = z0 + setupTT_.chosenRofZ() * cot;
268  double zTLocal = dfzT_.digi(zT - setupTT_.sectorCot(binEta) * setupTT_.chosenRofZ());
269  return dfzT_.toUnsigned(dfzT_.integer(zTLocal));
270  }
double chosenRofZ() const
Definition: Setup.h:413
const trackerTFP::DataFormat dfzT_
int integer(double d) const
Definition: DataFormats.h:96
const tt::Setup setupTT_
int toUnsigned(int i) const
Definition: DataFormats.h:102
double digi(double d) const
Definition: DataFormats.h:98
double sectorCot(int eta) const
Definition: Setup.h:428

◆ etaRegion()

int hph::Setup::etaRegion ( double  z0,
double  cot,
bool  useNewKF 
) const

Definition at line 238 of file HitPatternHelper.cc.

References chosenRofZ(), chosenRofZ_, chosenRofZNewKF_, ALCARECOTkAlBeamHalo_cff::etaMax, etaRegions(), etaRegions_, etaRegionsNewKF_, JetChargeProducer_cfi::exp, createfilelist::int, funct::tan(), and useNewKF().

238  {
239  //Calculating eta sector based on cot and z0
240  double chosenRofZ;
241  std::vector<double> etaRegions;
242  if (useNewKF) {
245  } else {
248  }
249  double kfzRef = z0 + chosenRofZ * cot;
250  int kf_eta_reg = 0;
251  for (int iEtaSec = 1; iEtaSec < ((int)etaRegions.size() - 1); iEtaSec++) { // Doesn't apply eta < 2.4 cut.
252  double etaMax = etaRegions[iEtaSec];
253  double zRefMax = chosenRofZ / tan(2. * atan(exp(-etaMax)));
254  if (kfzRef < zRefMax)
255  break;
256  kf_eta_reg = iEtaSec;
257  }
258  return kf_eta_reg;
259  }
double chosenRofZ_
bool useNewKF() const
double chosenRofZ() const
double chosenRofZNewKF_
std::vector< double > etaRegionsNewKF_
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< double > etaRegions() const
std::vector< double > etaRegions_

◆ etaRegions()

std::vector<double> hph::Setup::etaRegions ( ) const
inline

Definition at line 56 of file HitPatternHelper.h.

References etaRegions_.

Referenced by etaRegion().

56 { return etaRegions_; }
std::vector< double > etaRegions_

◆ hphDebug()

bool hph::Setup::hphDebug ( ) const
inline

Definition at line 53 of file HitPatternHelper.h.

References hphDebug_.

53 { return hphDebug_; }

◆ layerEncoding()

const std::vector<int>& hph::Setup::layerEncoding ( int  binEta,
int  binZT,
int  binCot 
) const
inline

Definition at line 62 of file HitPatternHelper.h.

References trackerTFP::LayerEncoding::layerEncoding(), and layerEncoding_.

62  {
63  return layerEncoding_.layerEncoding(binEta, binZT, binCot);
64  }
const std::vector< int > & layerEncoding(int binEta, int binZT, int binCot) const
Definition: LayerEncoding.h:25
const trackerTFP::LayerEncoding layerEncoding_

◆ layerEncodingMap()

const std::map<int, const tt::SensorModule*>& hph::Setup::layerEncodingMap ( int  binEta,
int  binZT,
int  binCot 
) const
inline

Definition at line 65 of file HitPatternHelper.h.

References layerEncoding_, and trackerTFP::LayerEncoding::layerEncodingMap().

65  {
66  return layerEncoding_.layerEncodingMap(binEta, binZT, binCot);
67  }
const trackerTFP::LayerEncoding layerEncoding_
const std::map< int, const tt::SensorModule * > & layerEncodingMap(int binEta, int binZT, int binCot) const
Definition: LayerEncoding.h:28

◆ layermap()

std::map<int, std::map<int, std::vector<int> > > hph::Setup::layermap ( ) const
inline

Definition at line 57 of file HitPatternHelper.h.

References layermap_.

57 { return layermap_; }
std::map< int, std::map< int, std::vector< int > > > layermap_

◆ nKalmanLayers()

int hph::Setup::nKalmanLayers ( ) const
inline

Definition at line 58 of file HitPatternHelper.h.

References nKalmanLayers_.

58 { return nKalmanLayers_; }

◆ useNewKF()

bool hph::Setup::useNewKF ( ) const
inline

Definition at line 54 of file HitPatternHelper.h.

References useNewKF_.

Referenced by etaRegion().

54 { return useNewKF_; }

Member Data Documentation

◆ chosenRofZ_

double hph::Setup::chosenRofZ_
private

Definition at line 81 of file HitPatternHelper.h.

Referenced by chosenRofZ(), etaRegion(), and Setup().

◆ chosenRofZNewKF_

double hph::Setup::chosenRofZNewKF_
private

Definition at line 79 of file HitPatternHelper.h.

Referenced by etaRegion(), and Setup().

◆ dataFormats_

const trackerTFP::DataFormats hph::Setup::dataFormats_
private

Definition at line 73 of file HitPatternHelper.h.

◆ dfcot_

const trackerTFP::DataFormat hph::Setup::dfcot_
private

Definition at line 74 of file HitPatternHelper.h.

Referenced by digiCot().

◆ dfzT_

const trackerTFP::DataFormat hph::Setup::dfzT_
private

Definition at line 75 of file HitPatternHelper.h.

Referenced by digiZT().

◆ etaRegions_

std::vector<double> hph::Setup::etaRegions_
private

Definition at line 82 of file HitPatternHelper.h.

Referenced by etaRegion(), etaRegions(), and Setup().

◆ etaRegionsNewKF_

std::vector<double> hph::Setup::etaRegionsNewKF_
private

Definition at line 80 of file HitPatternHelper.h.

Referenced by etaRegion(), and Setup().

◆ hphDebug_

bool hph::Setup::hphDebug_
private

Definition at line 77 of file HitPatternHelper.h.

Referenced by hphDebug().

◆ iConfig_

edm::ParameterSet hph::Setup::iConfig_
private

Definition at line 70 of file HitPatternHelper.h.

◆ layerEncoding_

const trackerTFP::LayerEncoding hph::Setup::layerEncoding_
private

Definition at line 76 of file HitPatternHelper.h.

Referenced by layerEncoding(), and layerEncodingMap().

◆ layermap_

std::map<int, std::map<int, std::vector<int> > > hph::Setup::layermap_
private

Definition at line 83 of file HitPatternHelper.h.

Referenced by layermap(), and Setup().

◆ nEtaRegions_

int hph::Setup::nEtaRegions_
private

Definition at line 84 of file HitPatternHelper.h.

Referenced by Setup().

◆ nKalmanLayers_

int hph::Setup::nKalmanLayers_
private

Definition at line 85 of file HitPatternHelper.h.

Referenced by nKalmanLayers(), and Setup().

◆ oldKFPSet_

edm::ParameterSet hph::Setup::oldKFPSet_
private

Definition at line 71 of file HitPatternHelper.h.

Referenced by Setup().

◆ setupTT_

const tt::Setup hph::Setup::setupTT_
private

Definition at line 72 of file HitPatternHelper.h.

Referenced by digiCot(), and digiZT().

◆ useNewKF_

bool hph::Setup::useNewKF_
private

Definition at line 78 of file HitPatternHelper.h.

Referenced by Setup(), and useNewKF().