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

Constructor & Destructor Documentation

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 554 of file TrackingNtuple.cc.

554 {};

Member Function Documentation

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

Definition at line 560 of file TrackingNtuple.cc.

References BOOK.

560  {
561  BOOK(detId);
562  BOOK(subdet);
563  BOOK(layer);
564  BOOK(side);
565  BOOK(module);
566  }
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 604 of file TrackingNtuple.cc.

604  {
605  detId.clear();
606  subdet.clear();
607  layer.clear();
608  side.clear();
609  module.clear();
610  }
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 556 of file TrackingNtuple.cc.

References mps_fire::i.

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

Definition at line 568 of file TrackingNtuple.cc.

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

568  {
569  detId .push_back(id.rawId() );
570  subdet.push_back(id.subdetId() );
571  layer .push_back(tTopo.layer(id) );
572  module.push_back(tTopo.module(id));
573 
574  unsigned short s = 0;
575  switch(id.subdetId()) {
577  s = tTopo.tibSide(id);
578  break;
580  s = tTopo.tobSide(id);
581  break;
582  default:
583  s = tTopo.side(id);
584  }
585  side.push_back(s);
586  }
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 588 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().

588  {
589  detId.resize(size);
590  subdet.resize(size);
591  layer.resize(size);
592  side.resize(size);
593  module.resize(size);
594  }
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 596 of file TrackingNtuple.cc.

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

596  {
597  detId [index] = id.rawId();
598  subdet[index] = id.subdetId();
599  layer [index] = tTopo.layer(id);
600  side [index] = tTopo.side(id);
601  module[index] = tTopo.module(id);
602  }
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 613 of file TrackingNtuple.cc.

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

Definition at line 617 of file TrackingNtuple.cc.

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

Definition at line 616 of file TrackingNtuple.cc.

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

Definition at line 614 of file TrackingNtuple.cc.