CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 687 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 689 of file TrackingNtuple.cc.

689 {};

Member Function Documentation

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

Definition at line 693 of file TrackingNtuple.cc.

References BOOK, layer, module, and side.

693  {
694  BOOK(detId);
695  BOOK(subdet);
696  BOOK(layer);
697  BOOK(side);
698  BOOK(module);
699  }
std::vector< unsigned short > layer
#define BOOK(name)
std::vector< unsigned short > module
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
void TrackingNtuple::DetIdCommon::clear ( void  )
inline

Definition at line 737 of file TrackingNtuple.cc.

References layer, module, and side.

737  {
738  detId.clear();
739  subdet.clear();
740  layer.clear();
741  side.clear();
742  module.clear();
743  }
std::vector< unsigned short > layer
std::vector< unsigned short > module
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
unsigned int TrackingNtuple::DetIdCommon::operator[] ( size_t  i) const
inline

Definition at line 691 of file TrackingNtuple.cc.

References mps_fire::i.

691 { return detId[i]; }
std::vector< unsigned int > detId
void TrackingNtuple::DetIdCommon::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 701 of file TrackingNtuple.cc.

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

701  {
702  detId.push_back(id.rawId());
703  subdet.push_back(id.subdetId());
704  layer.push_back(tTopo.layer(id));
705  module.push_back(tTopo.module(id));
706 
707  unsigned short s = 0;
708  switch (id.subdetId()) {
710  s = tTopo.tibSide(id);
711  break;
713  s = tTopo.tobSide(id);
714  break;
715  default:
716  s = tTopo.side(id);
717  }
718  side.push_back(s);
719  }
std::vector< unsigned short > layer
unsigned int side(const DetId &id) const
std::vector< unsigned short > module
unsigned int module(const DetId &id) const
unsigned int tibSide(const DetId &id) const
unsigned int tobSide(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
std::vector< unsigned int > detId
unsigned int layer(const DetId &id) const
std::vector< unsigned short > side
std::vector< unsigned short > subdet
void TrackingNtuple::DetIdCommon::resize ( size_t  size)
inline

Definition at line 721 of file TrackingNtuple.cc.

References layer, module, and side.

721  {
722  detId.resize(size);
723  subdet.resize(size);
724  layer.resize(size);
725  side.resize(size);
726  module.resize(size);
727  }
std::vector< unsigned short > layer
std::vector< unsigned short > module
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
tuple size
Write out results.
void TrackingNtuple::DetIdCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 729 of file TrackingNtuple.cc.

References TrackerTopology::layer(), layer, TrackerTopology::module(), module, DetId::rawId(), TrackerTopology::side(), and side.

729  {
730  detId[index] = id.rawId();
731  subdet[index] = id.subdetId();
732  layer[index] = tTopo.layer(id);
733  side[index] = tTopo.side(id);
734  module[index] = tTopo.module(id);
735  }
std::vector< unsigned short > layer
unsigned int side(const DetId &id) const
std::vector< unsigned short > module
unsigned int module(const DetId &id) const
std::vector< unsigned int > detId
unsigned int layer(const DetId &id) const
std::vector< unsigned short > side
std::vector< unsigned short > subdet

Member Data Documentation

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

Definition at line 746 of file TrackingNtuple.cc.

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

Definition at line 750 of file TrackingNtuple.cc.

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

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

Definition at line 749 of file TrackingNtuple.cc.

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

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

Definition at line 747 of file TrackingNtuple.cc.