CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrackingNtuple::DetIdCommon Class Reference

Public Member Functions

void book (const std::string &prefix, TTree *tree)
 
void clear ()
 
 DetIdCommon ()
 
unsigned int operator[] (size_t i) const
 
void push_back (const TrackerTopology &tTopo, const DetId &id)
 
void resize (size_t size)
 
void set (size_t index, const TrackerTopology &tTopo, const DetId &id)
 

Private Attributes

std::vector< unsigned int > detId
 
std::vector< unsigned short > layer
 
std::vector< unsigned short > module
 
std::vector< unsigned short > side
 
std::vector< unsigned short > subdet
 

Detailed Description

Definition at line 689 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdCommon()

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 691 of file TrackingNtuple.cc.

691 {};

Member Function Documentation

◆ book()

void TrackingNtuple::DetIdCommon::book ( const std::string &  prefix,
TTree *  tree 
)
inline

Definition at line 695 of file TrackingNtuple.cc.

695  {
696  BOOK(detId);
697  BOOK(subdet);
698  BOOK(layer);
699  BOOK(side);
700  BOOK(module);
701  }

References BOOK, detId, layer, module, side, and subdet.

◆ clear()

void TrackingNtuple::DetIdCommon::clear ( void  )
inline

Definition at line 739 of file TrackingNtuple.cc.

739  {
740  detId.clear();
741  subdet.clear();
742  layer.clear();
743  side.clear();
744  module.clear();
745  }

References detId, layer, module, side, and subdet.

◆ operator[]()

unsigned int TrackingNtuple::DetIdCommon::operator[] ( size_t  i) const
inline

Definition at line 693 of file TrackingNtuple.cc.

693 { return detId[i]; }

References detId, and mps_fire::i.

◆ push_back()

void TrackingNtuple::DetIdCommon::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 703 of file TrackingNtuple.cc.

703  {
704  detId.push_back(id.rawId());
705  subdet.push_back(id.subdetId());
706  layer.push_back(tTopo.layer(id));
707  module.push_back(tTopo.module(id));
708 
709  unsigned short s = 0;
710  switch (id.subdetId()) {
712  s = tTopo.tibSide(id);
713  break;
715  s = tTopo.tobSide(id);
716  break;
717  default:
718  s = tTopo.side(id);
719  }
720  side.push_back(s);
721  }

References detId, TrackerTopology::layer(), layer, TrackerTopology::module(), module, alignCSCRings::s, TrackerTopology::side(), side, subdet, StripSubdetector::TIB, TrackerTopology::tibSide(), StripSubdetector::TOB, and TrackerTopology::tobSide().

◆ resize()

void TrackingNtuple::DetIdCommon::resize ( size_t  size)
inline

Definition at line 723 of file TrackingNtuple.cc.

723  {
724  detId.resize(size);
725  subdet.resize(size);
726  layer.resize(size);
727  side.resize(size);
728  module.resize(size);
729  }

References detId, layer, module, side, findQualityFiles::size, and subdet.

◆ set()

void TrackingNtuple::DetIdCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 731 of file TrackingNtuple.cc.

731  {
732  detId[index] = id.rawId();
733  subdet[index] = id.subdetId();
734  layer[index] = tTopo.layer(id);
735  side[index] = tTopo.side(id);
736  module[index] = tTopo.module(id);
737  }

References detId, TrackerTopology::layer(), layer, TrackerTopology::module(), module, TrackerTopology::side(), side, and subdet.

Member Data Documentation

◆ detId

std::vector<unsigned int> TrackingNtuple::DetIdCommon::detId
private

Definition at line 748 of file TrackingNtuple.cc.

Referenced by book(), clear(), operator[](), push_back(), resize(), and set().

◆ layer

std::vector<unsigned short> TrackingNtuple::DetIdCommon::layer
private

◆ module

std::vector<unsigned short> TrackingNtuple::DetIdCommon::module
private

Definition at line 752 of file TrackingNtuple.cc.

Referenced by book(), clear(), push_back(), resize(), and set().

◆ side

std::vector<unsigned short> TrackingNtuple::DetIdCommon::side
private

Definition at line 751 of file TrackingNtuple.cc.

Referenced by book(), clear(), push_back(), resize(), and set().

◆ subdet

std::vector<unsigned short> TrackingNtuple::DetIdCommon::subdet
private

Definition at line 749 of file TrackingNtuple.cc.

Referenced by book(), clear(), push_back(), resize(), and set().

TrackingNtuple::DetIdCommon::module
std::vector< unsigned short > module
Definition: TrackingNtuple.cc:752
TrackerTopology::side
unsigned int side(const DetId &id) const
Definition: TrackerTopology.cc:28
mps_fire.i
i
Definition: mps_fire.py:428
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
TrackerTopology::module
unsigned int module(const DetId &id) const
Definition: TrackerTopology.cc:66
TrackerTopology::tibSide
unsigned int tibSide(const DetId &id) const
Definition: TrackerTopology.h:186
TrackingNtuple::DetIdCommon::detId
std::vector< unsigned int > detId
Definition: TrackingNtuple.cc:748
alignCSCRings.s
s
Definition: alignCSCRings.py:92
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
BOOK
#define BOOK(name)
Definition: TrackingNtuple.cc:688
TrackingNtuple::DetIdCommon::subdet
std::vector< unsigned short > subdet
Definition: TrackingNtuple.cc:749
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
TrackingNtuple::DetIdCommon::layer
std::vector< unsigned short > layer
Definition: TrackingNtuple.cc:750
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
TrackingNtuple::DetIdCommon::side
std::vector< unsigned short > side
Definition: TrackingNtuple.cc:751
TrackerTopology::tobSide
unsigned int tobSide(const DetId &id) const
Definition: TrackerTopology.h:180
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443