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 TrackerGeometry &tracker, const TrackerTopology &tTopo, const DetId &id)
 
void resize (size_t size)
 
void set (size_t index, const TrackerGeometry &tracker, 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 int > moduleType
 
std::vector< unsigned short > side
 
std::vector< unsigned short > subdet
 

Detailed Description

Definition at line 709 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdCommon()

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 711 of file TrackingNtuple.cc.

711 {};

Member Function Documentation

◆ book()

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

Definition at line 715 of file TrackingNtuple.cc.

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

715  {
716  BOOK(detId);
717  BOOK(subdet);
718  BOOK(layer);
719  BOOK(side);
720  BOOK(module);
721  BOOK(moduleType);
722  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
#define BOOK(name)
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet

◆ clear()

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

Definition at line 763 of file TrackingNtuple.cc.

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

763  {
764  detId.clear();
765  subdet.clear();
766  layer.clear();
767  side.clear();
768  module.clear();
769  moduleType.clear();
770  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet

◆ operator[]()

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

Definition at line 713 of file TrackingNtuple.cc.

References detId, and mps_fire::i.

713 { return detId[i]; }
std::vector< unsigned int > detId

◆ push_back()

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

Definition at line 724 of file TrackingNtuple.cc.

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

724  {
725  detId.push_back(id.rawId());
726  subdet.push_back(id.subdetId());
727  layer.push_back(tTopo.layer(id));
728  module.push_back(tTopo.module(id));
729  moduleType.push_back(static_cast<int>(tracker.getDetectorType(id)));
730 
731  unsigned short s = 0;
732  switch (id.subdetId()) {
734  s = tTopo.tibSide(id);
735  break;
737  s = tTopo.tobSide(id);
738  break;
739  default:
740  s = tTopo.side(id);
741  }
742  side.push_back(s);
743  }
unsigned int tibSide(const DetId &id) const
unsigned int tobSide(const DetId &id) const
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
unsigned int side(const DetId &id) const
unsigned int layer(const DetId &id) const
unsigned int module(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet

◆ resize()

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

Definition at line 745 of file TrackingNtuple.cc.

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

745  {
746  detId.resize(size);
747  subdet.resize(size);
748  layer.resize(size);
749  side.resize(size);
750  module.resize(size);
751  moduleType.resize(size);
752  }
size
Write out results.
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet

◆ set()

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

Definition at line 754 of file TrackingNtuple.cc.

References detId, layer, moduleType, side, subdet, and PbPb_ZMuSkimMuonDPG_cff::tracker.

754  {
755  detId[index] = id.rawId();
756  subdet[index] = id.subdetId();
757  layer[index] = tTopo.layer(id);
758  side[index] = tTopo.side(id);
759  module[index] = tTopo.module(id);
760  moduleType[index] = static_cast<int>(tracker.getDetectorType(id));
761  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
unsigned int side(const DetId &id) const
unsigned int layer(const DetId &id) const
unsigned int module(const DetId &id) const
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet

Member Data Documentation

◆ detId

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

Definition at line 773 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 777 of file TrackingNtuple.cc.

◆ moduleType

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

Definition at line 778 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 776 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 774 of file TrackingNtuple.cc.

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