CMS 3D CMS Logo

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

#include <HitPatternHelper.h>

Public Member Functions

double chosenRofZ () const
 
double deltaTanL () const
 
std::vector< double > etaRegions () const
 
bool hphDebug () const
 
std::map< int, std::map< int, std::vector< int > > > layermap () const
 
int nKalmanLayers () const
 
std::vector< tt::SensorModulesensorModules () const
 
 Setup ()
 
 Setup (const edm::ParameterSet &iConfig, const tt::Setup &setupTT)
 
bool useNewKF () const
 
 ~Setup ()
 

Static Public Member Functions

static auto equalID (std::pair< int, bool > lhs, std::pair< int, bool > rhs)
 
static auto smallerID (std::pair< int, bool > lhs, std::pair< int, bool > rhs)
 

Private Attributes

edm::ParameterSet iConfig_
 
std::vector< std::pair< int, bool > > layerIds_
 
std::map< int, std::map< int, std::vector< int > > > layermap_
 
int nEtaRegions_
 
int nKalmanLayers_
 
const tt::Setup setupTT_
 

Detailed Description

Definition at line 43 of file HitPatternHelper.h.

Constructor & Destructor Documentation

◆ Setup() [1/2]

hph::Setup::Setup ( )
inline

Definition at line 45 of file HitPatternHelper.h.

45 {}

◆ Setup() [2/2]

hph::Setup::Setup ( const edm::ParameterSet iConfig,
const tt::Setup setupTT 
)

Definition at line 16 of file HitPatternHelper.cc.

References tmtt::TrackerModule::calcLayerIdReduced(), equalID(), first, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, layerIds_, tmtt::KFbase::layerMap_, layermap_, nEtaRegions_, nKalmanLayers_, edm::second(), tt::Setup::sensorModules(), setupTT_, smallerID(), jetsAK4_CHS_cff::sort, and tier0::unique().

17  : iConfig_(iConfig),
18  setupTT_(setupTT),
19  layerIds_(),
20  layermap_(),
23  for (const tt::SensorModule& sm : setupTT_.sensorModules()) {
24  layerIds_.push_back(std::make_pair(sm.layerId(), sm.barrel()));
25  }
26  sort(layerIds_.begin(), layerIds_.end(), smallerID);
27  layerIds_.erase(unique(layerIds_.begin(), layerIds_.end(), equalID), layerIds_.end()); //Keep only unique layerIds
28  // Converting tmtt::KFbase::layerMap_ to a format that is acceptatble by HitPatternHelper
29  for (int i = 0; i < nEtaRegions_; i++) {
30  for (int j = 0; j < (int)layerIds_.size(); j++) {
31  int layer;
32  if (layerIds_[j].second) {
34  } else {
36  }
37  if (layer < nKalmanLayers_) {
38  layermap_[i][layer].push_back(layerIds_[j].first);
39  }
40  }
41  }
42  }
static constexpr std::pair< unsigned, unsigned > layerMap_[nEta_/2][nGPlayer_+1]
Definition: KFbase.h:61
edm::ParameterSet iConfig_
static const unsigned int nEta_
Definition: KFbase.h:52
constexpr std::array< uint8_t, layerIndexSize > layer
U second(std::pair< T, U > const &p)
static const unsigned int nKFlayer_
Definition: KFbase.h:51
const std::vector< SensorModule > & sensorModules() const
Definition: Setup.h:126
def unique(seq, keepstr=True)
Definition: tier0.py:24
static unsigned int calcLayerIdReduced(unsigned int layerId)
static auto smallerID(std::pair< int, bool > lhs, std::pair< int, bool > rhs)
std::vector< std::pair< int, bool > > layerIds_
const tt::Setup setupTT_
static auto equalID(std::pair< int, bool > lhs, std::pair< int, bool > rhs)
std::map< int, std::map< int, std::vector< int > > > layermap_

◆ ~Setup()

hph::Setup::~Setup ( )
inline

Definition at line 47 of file HitPatternHelper.h.

47 {}

Member Function Documentation

◆ chosenRofZ()

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

Definition at line 52 of file HitPatternHelper.h.

References tt::Setup::chosenRofZ(), and setupTT_.

52 { return setupTT_.chosenRofZ(); }
double chosenRofZ() const
Definition: Setup.h:413
const tt::Setup setupTT_

◆ deltaTanL()

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

Definition at line 51 of file HitPatternHelper.h.

References edm::ParameterSet::getParameter(), and iConfig_.

51 { return iConfig_.getParameter<double>("deltaTanL"); }
edm::ParameterSet iConfig_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ equalID()

static auto hph::Setup::equalID ( std::pair< int, bool >  lhs,
std::pair< int, bool >  rhs 
)
inlinestatic

Definition at line 58 of file HitPatternHelper.h.

Referenced by Setup().

58 { return lhs.first == rhs.first; }

◆ etaRegions()

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

Definition at line 53 of file HitPatternHelper.h.

References tt::Setup::boundarieEta(), and setupTT_.

53 { return setupTT_.boundarieEta(); }
double boundarieEta(int eta) const
Definition: Setup.h:417
const tt::Setup setupTT_

◆ hphDebug()

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

Definition at line 49 of file HitPatternHelper.h.

References edm::ParameterSet::getParameter(), and iConfig_.

49 { return iConfig_.getParameter<bool>("hphDebug"); }
edm::ParameterSet iConfig_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ layermap()

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

Definition at line 55 of file HitPatternHelper.h.

References layermap_.

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

◆ nKalmanLayers()

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

Definition at line 56 of file HitPatternHelper.h.

References nKalmanLayers_.

56 { return nKalmanLayers_; }

◆ sensorModules()

std::vector<tt::SensorModule> hph::Setup::sensorModules ( ) const
inline

Definition at line 54 of file HitPatternHelper.h.

References tt::Setup::sensorModules(), and setupTT_.

Referenced by hph::HitPatternHelper::HitPatternHelper().

54 { return setupTT_.sensorModules(); }
const std::vector< SensorModule > & sensorModules() const
Definition: Setup.h:126
const tt::Setup setupTT_

◆ smallerID()

static auto hph::Setup::smallerID ( std::pair< int, bool >  lhs,
std::pair< int, bool >  rhs 
)
inlinestatic

Definition at line 57 of file HitPatternHelper.h.

Referenced by Setup().

57 { return lhs.first < rhs.first; }

◆ useNewKF()

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

Definition at line 50 of file HitPatternHelper.h.

References edm::ParameterSet::getParameter(), and iConfig_.

50 { return iConfig_.getParameter<bool>("useNewKF"); }
edm::ParameterSet iConfig_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Data Documentation

◆ iConfig_

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

Definition at line 61 of file HitPatternHelper.h.

Referenced by deltaTanL(), hphDebug(), and useNewKF().

◆ layerIds_

std::vector<std::pair<int, bool> > hph::Setup::layerIds_
private

Definition at line 64 of file HitPatternHelper.h.

Referenced by Setup().

◆ layermap_

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

Definition at line 66 of file HitPatternHelper.h.

Referenced by layermap(), and Setup().

◆ nEtaRegions_

int hph::Setup::nEtaRegions_
private

Definition at line 67 of file HitPatternHelper.h.

Referenced by Setup().

◆ nKalmanLayers_

int hph::Setup::nKalmanLayers_
private

Definition at line 68 of file HitPatternHelper.h.

Referenced by nKalmanLayers(), and Setup().

◆ setupTT_

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

Definition at line 62 of file HitPatternHelper.h.

Referenced by chosenRofZ(), etaRegions(), sensorModules(), and Setup().