CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
TrackingNtuple::DetIdStripOnly Class Reference

Classes

struct  Parsed
 

Public Member Functions

void book (const std::string &prefix, TTree *tree)
 
void clear ()
 
 DetIdStripOnly ()
 
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 Member Functions

Parsed parse (const TrackerTopology &tTopo, const DetId &id) const
 

Private Attributes

std::vector< unsigned short > isGlued
 
std::vector< unsigned short > isRPhi
 
std::vector< unsigned short > isStereo
 
std::vector< unsigned short > petalNumber
 
std::vector< unsigned short > string
 

Detailed Description

Definition at line 700 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

TrackingNtuple::DetIdStripOnly::DetIdStripOnly ( )
inline

Definition at line 702 of file TrackingNtuple.cc.

702 {}

Member Function Documentation

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

Definition at line 704 of file TrackingNtuple.cc.

References BOOK.

704  {
705  BOOK(string);
706  BOOK(petalNumber);
707  BOOK(isStereo);
708  BOOK(isRPhi);
709  BOOK(isGlued);
710  }
#define BOOK(name)
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::clear ( void  )
inline

Definition at line 738 of file TrackingNtuple.cc.

738  {
739  string.clear();
740  isStereo.clear();
741  isRPhi.clear();
742  isGlued.clear();
743  petalNumber.clear();
744  }
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber
Parsed TrackingNtuple::DetIdStripOnly::parse ( const TrackerTopology tTopo,
const DetId id 
) const
inlineprivate

Definition at line 754 of file TrackingNtuple.cc.

References StripSubdetector::TEC, TrackerTopology::tecIsDoubleSide(), TrackerTopology::tecPetalNumber(), StripSubdetector::TIB, TrackerTopology::tibIsDoubleSide(), TrackerTopology::tibString(), StripSubdetector::TID, TrackerTopology::tidIsDoubleSide(), StripSubdetector::TOB, and TrackerTopology::tobIsDoubleSide().

754  {
755  switch(id.subdetId()) {
757  return Parsed{tTopo.tibString(id), 0, tTopo.tibIsDoubleSide(id)};
759  return Parsed{0, 0, tTopo.tidIsDoubleSide(id)};
761  return Parsed{0, 0, tTopo.tobIsDoubleSide(id)};
763  return Parsed{0, tTopo.tecPetalNumber(id), tTopo.tecIsDoubleSide(id)};
764  default:
765  return Parsed{};
766  }
767  }
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibString(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tecPetalNumber(const DetId &id) const
void TrackingNtuple::DetIdStripOnly::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 712 of file TrackingNtuple.cc.

References TrackerTopology::isRPhi(), TrackerTopology::isStereo(), and dumpparser::parse().

712  {
713  const auto parsed = parse(tTopo, id);
714  string .push_back(parsed.string );
715  petalNumber.push_back(parsed.petalNumber);
716  isStereo .push_back(tTopo.isStereo(id));
717  isRPhi .push_back(tTopo.isRPhi(id));
718  isGlued .push_back(parsed.glued);
719  }
bool isStereo(const DetId &id) const
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
bool isRPhi(const DetId &id) const
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::resize ( size_t  size)
inline

Definition at line 721 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().

721  {
722  string .resize(size);
723  petalNumber.resize(size);
724  isStereo .resize(size);
725  isRPhi .resize(size);
726  isGlued .resize(size);
727  }
size
Write out results.
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 729 of file TrackingNtuple.cc.

References diffTreeTool::index, and dumpparser::parse().

729  {
730  const auto parsed = parse(tTopo, id);
731  string [index] = parsed.string ;
732  petalNumber[index] = parsed.petalNumber;
733  isStereo [index] = tTopo.isStereo(id);
734  isRPhi [index] = tTopo.isRPhi(id);
735  isGlued [index] = parsed.glued;
736  }
bool isStereo(const DetId &id) const
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
bool isRPhi(const DetId &id) const
std::vector< unsigned short > petalNumber

Member Data Documentation

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isGlued
private

Definition at line 773 of file TrackingNtuple.cc.

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isRPhi
private

Definition at line 772 of file TrackingNtuple.cc.

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isStereo
private

Definition at line 771 of file TrackingNtuple.cc.

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::petalNumber
private

Definition at line 770 of file TrackingNtuple.cc.

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::string
private

Definition at line 769 of file TrackingNtuple.cc.