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

Constructor & Destructor Documentation

◆ DetIdOTCommon()

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 764 of file TrackingNtuple.cc.

764 {}

Member Function Documentation

◆ book()

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

Definition at line 766 of file TrackingNtuple.cc.

766  {
767  BOOK(order);
768  BOOK(ring);
769  BOOK(rod);
770  }

References BOOK, order, ring, and rod.

◆ clear()

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

Definition at line 792 of file TrackingNtuple.cc.

792  {
793  order.clear();
794  ring.clear();
795  rod.clear();
796  }

References order, ring, and rod.

◆ parse()

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

Definition at line 806 of file TrackingNtuple.cc.

806  {
807  switch (id.subdetId()) {
809  return Parsed{tTopo.tibOrder(id), 0, 0};
811  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
813  return Parsed{0, 0, tTopo.tobRod(id)};
815  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
816  default:
817  return Parsed{};
818  };
819  }

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

772  {
773  const auto parsed = parse(tTopo, id);
774  order.push_back(parsed.order);
775  ring.push_back(parsed.ring);
776  rod.push_back(parsed.rod);
777  }

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

◆ resize()

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

Definition at line 779 of file TrackingNtuple.cc.

779  {
780  order.resize(size);
781  ring.resize(size);
782  rod.resize(size);
783  }

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

785  {
786  const auto parsed = parse(tTopo, id);
787  order[index] = parsed.order;
788  ring[index] = parsed.ring;
789  rod[index] = parsed.rod;
790  }

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

Member Data Documentation

◆ order

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

Definition at line 821 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 823 of file TrackingNtuple.cc.

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

TrackingNtuple::DetIdOTCommon::ring
std::vector< unsigned short > ring
Definition: TrackingNtuple.cc:822
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:821
TrackingNtuple::DetIdOTCommon::rod
std::vector< unsigned short > rod
Definition: TrackingNtuple.cc:823
BOOK
#define BOOK(name)
Definition: TrackingNtuple.cc:666
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:806
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