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 705 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdCommon()

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 707 of file TrackingNtuple.cc.

707 {};

Member Function Documentation

◆ book()

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

Definition at line 711 of file TrackingNtuple.cc.

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

711  {
712  BOOK(detId);
713  BOOK(subdet);
714  BOOK(layer);
715  BOOK(side);
716  BOOK(module);
717  BOOK(moduleType);
718  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
#define BOOK(name)
std::vector< unsigned short > module
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 759 of file TrackingNtuple.cc.

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

759  {
760  detId.clear();
761  subdet.clear();
762  layer.clear();
763  side.clear();
764  module.clear();
765  moduleType.clear();
766  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned short > module
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 709 of file TrackingNtuple.cc.

References detId, and mps_fire::i.

709 { 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 720 of file TrackingNtuple.cc.

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

720  {
721  detId.push_back(id.rawId());
722  subdet.push_back(id.subdetId());
723  layer.push_back(tTopo.layer(id));
724  module.push_back(tTopo.module(id));
725  moduleType.push_back(static_cast<int>(tracker.getDetectorType(id)));
726 
727  unsigned short s = 0;
728  switch (id.subdetId()) {
730  s = tTopo.tibSide(id);
731  break;
733  s = tTopo.tobSide(id);
734  break;
735  default:
736  s = tTopo.side(id);
737  }
738  side.push_back(s);
739  }
unsigned int tibSide(const DetId &id) const
unsigned int tobSide(const DetId &id) const
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned short > module
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 741 of file TrackingNtuple.cc.

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

741  {
742  detId.resize(size);
743  subdet.resize(size);
744  layer.resize(size);
745  side.resize(size);
746  module.resize(size);
747  moduleType.resize(size);
748  }
size
Write out results.
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned short > module
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 750 of file TrackingNtuple.cc.

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

750  {
751  detId[index] = id.rawId();
752  subdet[index] = id.subdetId();
753  layer[index] = tTopo.layer(id);
754  side[index] = tTopo.side(id);
755  module[index] = tTopo.module(id);
756  moduleType[index] = static_cast<int>(tracker.getDetectorType(id));
757  }
std::vector< unsigned short > layer
std::vector< unsigned int > moduleType
std::vector< unsigned short > module
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 769 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 773 of file TrackingNtuple.cc.

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

◆ moduleType

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

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

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