CMS 3D CMS Logo

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

Classes

struct  Parsed
 

Public Member Functions

void book (const std::string &prefix, TTree *tree)
 
void clear ()
 
 DetIdOTCommon ()
 
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 > order
 
std::vector< unsigned short > ring
 
std::vector< unsigned short > rod
 

Detailed Description

Definition at line 766 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdOTCommon()

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 768 of file TrackingNtuple.cc.

768 {}

Member Function Documentation

◆ book()

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

Definition at line 770 of file TrackingNtuple.cc.

770  {
771  BOOK(order);
772  BOOK(ring);
773  BOOK(rod);
774  }

References BOOK, order, ring, and rod.

◆ clear()

void TrackingNtuple::DetIdOTCommon::clear ( void  )
inline

Definition at line 796 of file TrackingNtuple.cc.

796  {
797  order.clear();
798  ring.clear();
799  rod.clear();
800  }

References order, ring, and rod.

◆ parse()

Parsed TrackingNtuple::DetIdOTCommon::parse ( const TrackerTopology tTopo,
const DetId id 
) const
inlineprivate

Definition at line 810 of file TrackingNtuple.cc.

810  {
811  switch (id.subdetId()) {
813  return Parsed{tTopo.tibOrder(id), 0, 0};
815  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
817  return Parsed{0, 0, tTopo.tobRod(id)};
819  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
820  default:
821  return Parsed{};
822  };
823  }

References StripSubdetector::TEC, TrackerTopology::tecOrder(), TrackerTopology::tecRing(), StripSubdetector::TIB, TrackerTopology::tibOrder(), StripSubdetector::TID, TrackerTopology::tidOrder(), TrackerTopology::tidRing(), StripSubdetector::TOB, and TrackerTopology::tobRod().

Referenced by push_back(), and set().

◆ push_back()

void TrackingNtuple::DetIdOTCommon::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 776 of file TrackingNtuple.cc.

776  {
777  const auto parsed = parse(tTopo, id);
778  order.push_back(parsed.order);
779  ring.push_back(parsed.ring);
780  rod.push_back(parsed.rod);
781  }

References order, parse(), ring, and rod.

◆ resize()

void TrackingNtuple::DetIdOTCommon::resize ( size_t  size)
inline

Definition at line 783 of file TrackingNtuple.cc.

783  {
784  order.resize(size);
785  ring.resize(size);
786  rod.resize(size);
787  }

References order, ring, rod, and findQualityFiles::size.

◆ set()

void TrackingNtuple::DetIdOTCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 789 of file TrackingNtuple.cc.

789  {
790  const auto parsed = parse(tTopo, id);
791  order[index] = parsed.order;
792  ring[index] = parsed.ring;
793  rod[index] = parsed.rod;
794  }

References order, parse(), ring, and rod.

Member Data Documentation

◆ order

std::vector<unsigned short> TrackingNtuple::DetIdOTCommon::order
private

Definition at line 825 of file TrackingNtuple.cc.

Referenced by book(), clear(), push_back(), resize(), and set().

◆ ring

std::vector<unsigned short> TrackingNtuple::DetIdOTCommon::ring
private

◆ rod

std::vector<unsigned short> TrackingNtuple::DetIdOTCommon::rod
private

Definition at line 827 of file TrackingNtuple.cc.

Referenced by book(), clear(), push_back(), resize(), and set().

TrackingNtuple::DetIdOTCommon::ring
std::vector< unsigned short > ring
Definition: TrackingNtuple.cc:826
TrackerTopology::tibOrder
unsigned int tibOrder(const DetId &id) const
Definition: TrackerTopology.h:209
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
TrackerTopology::tobRod
unsigned int tobRod(const DetId &id) const
Definition: TrackerTopology.h:195
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
TrackingNtuple::DetIdOTCommon::order
std::vector< unsigned short > order
Definition: TrackingNtuple.cc:825
TrackingNtuple::DetIdOTCommon::rod
std::vector< unsigned short > rod
Definition: TrackingNtuple.cc:827
BOOK
#define BOOK(name)
Definition: TrackingNtuple.cc:670
TrackerTopology::tidOrder
unsigned int tidOrder(const DetId &id) const
Definition: TrackerTopology.h:212
TrackingNtuple::DetIdOTCommon::parse
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
Definition: TrackingNtuple.cc:810
TrackerTopology::tecRing
unsigned int tecRing(const DetId &id) const
ring id
Definition: TrackerTopology.h:217
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
TrackerTopology::tecOrder
unsigned int tecOrder(const DetId &id) const
Definition: TrackerTopology.h:206
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443