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

Constructor & Destructor Documentation

TrackingNtuple::DetIdCommon::DetIdCommon ( )
inline

Definition at line 690 of file TrackingNtuple.cc.

690 {};

Member Function Documentation

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

Definition at line 696 of file TrackingNtuple.cc.

References BOOK.

696  {
697  BOOK(detId);
698  BOOK(subdet);
699  BOOK(layer);
700  BOOK(side);
701  BOOK(module);
702  }
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 740 of file TrackingNtuple.cc.

740  {
741  detId.clear();
742  subdet.clear();
743  layer.clear();
744  side.clear();
745  module.clear();
746  }
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 692 of file TrackingNtuple.cc.

References mps_fire::i.

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

Definition at line 704 of file TrackingNtuple.cc.

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

704  {
705  detId .push_back(id.rawId() );
706  subdet.push_back(id.subdetId() );
707  layer .push_back(tTopo.layer(id) );
708  module.push_back(tTopo.module(id));
709 
710  unsigned short s = 0;
711  switch(id.subdetId()) {
713  s = tTopo.tibSide(id);
714  break;
716  s = tTopo.tobSide(id);
717  break;
718  default:
719  s = tTopo.side(id);
720  }
721  side.push_back(s);
722  }
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 724 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().

724  {
725  detId.resize(size);
726  subdet.resize(size);
727  layer.resize(size);
728  side.resize(size);
729  module.resize(size);
730  }
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 732 of file TrackingNtuple.cc.

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

732  {
733  detId [index] = id.rawId();
734  subdet[index] = id.subdetId();
735  layer [index] = tTopo.layer(id);
736  side [index] = tTopo.side(id);
737  module[index] = tTopo.module(id);
738  }
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 749 of file TrackingNtuple.cc.

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

Definition at line 753 of file TrackingNtuple.cc.

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

Definition at line 752 of file TrackingNtuple.cc.

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

Definition at line 750 of file TrackingNtuple.cc.