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

Constructor & Destructor Documentation

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 553 of file TrackingNtuple.cc.

553 {};

Member Function Documentation

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

Definition at line 559 of file TrackingNtuple.cc.

References BOOK.

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

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

References mps_fire::i.

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

Definition at line 567 of file TrackingNtuple.cc.

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

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

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

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

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

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

Definition at line 616 of file TrackingNtuple.cc.

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

Definition at line 615 of file TrackingNtuple.cc.

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

Definition at line 613 of file TrackingNtuple.cc.