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

Constructor & Destructor Documentation

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 541 of file TrackingNtuple.cc.

541 {};

Member Function Documentation

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

Definition at line 547 of file TrackingNtuple.cc.

References BOOK.

547  {
548  BOOK(detId);
549  BOOK(subdet);
550  BOOK(layer);
551  BOOK(side);
552  BOOK(module);
553  }
std::vector< unsigned short > layer
#define BOOK(name)
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
Definition: vlib.h:208
void TrackingNtuple::DetIdCommon::clear ( void  )
inline

Definition at line 591 of file TrackingNtuple.cc.

591  {
592  detId.clear();
593  subdet.clear();
594  layer.clear();
595  side.clear();
596  module.clear();
597  }
std::vector< unsigned short > layer
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
Definition: vlib.h:208
unsigned int TrackingNtuple::DetIdCommon::operator[] ( size_t  i) const
inline

Definition at line 543 of file TrackingNtuple.cc.

References mps_fire::i.

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

Definition at line 555 of file TrackingNtuple.cc.

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

555  {
556  detId .push_back(id.rawId() );
557  subdet.push_back(id.subdetId() );
558  layer .push_back(tTopo.layer(id) );
559  module.push_back(tTopo.module(id));
560 
561  unsigned short s = 0;
562  switch(id.subdetId()) {
564  s = tTopo.tibSide(id);
565  break;
567  s = tTopo.tobSide(id);
568  break;
569  default:
570  s = tTopo.side(id);
571  }
572  side.push_back(s);
573  }
std::vector< unsigned short > layer
unsigned int side(const DetId &id) const
unsigned int module(const DetId &id) const
unsigned int tibSide(const DetId &id) const
unsigned int tobSide(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
Definition: vlib.h:208
void TrackingNtuple::DetIdCommon::resize ( size_t  size)
inline

Definition at line 575 of file TrackingNtuple.cc.

Referenced by Vispa.Gui.TextDialog.TextDialog::__init__(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::__init__(), Vispa.Main.MainWindow.MainWindow::_loadIni(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

575  {
576  detId.resize(size);
577  subdet.resize(size);
578  layer.resize(size);
579  side.resize(size);
580  module.resize(size);
581  }
size
Write out results.
std::vector< unsigned short > layer
std::vector< unsigned int > detId
std::vector< unsigned short > side
std::vector< unsigned short > subdet
Definition: vlib.h:208
void TrackingNtuple::DetIdCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 583 of file TrackingNtuple.cc.

References diffTreeTool::index, module::module(), and DetId::rawId().

583  {
584  detId [index] = id.rawId();
585  subdet[index] = id.subdetId();
586  layer [index] = tTopo.layer(id);
587  side [index] = tTopo.side(id);
588  module[index] = tTopo.module(id);
589  }
std::vector< unsigned short > layer
unsigned int side(const DetId &id) const
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
Definition: vlib.h:208

Member Data Documentation

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

Definition at line 600 of file TrackingNtuple.cc.

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

Definition at line 604 of file TrackingNtuple.cc.

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

Definition at line 603 of file TrackingNtuple.cc.

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

Definition at line 601 of file TrackingNtuple.cc.