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

Constructor & Destructor Documentation

◆ DetIdOTCommon()

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 786 of file TrackingNtuple.cc.

786 {}

Member Function Documentation

◆ book()

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

Definition at line 788 of file TrackingNtuple.cc.

788  {
789  BOOK(order);
790  BOOK(ring);
791  BOOK(rod);
792  }

References BOOK, order, ring, and rod.

◆ clear()

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

Definition at line 814 of file TrackingNtuple.cc.

814  {
815  order.clear();
816  ring.clear();
817  rod.clear();
818  }

References order, ring, and rod.

◆ parse()

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

Definition at line 828 of file TrackingNtuple.cc.

828  {
829  switch (id.subdetId()) {
831  return Parsed{tTopo.tibOrder(id), 0, 0};
833  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
835  return Parsed{0, 0, tTopo.tobRod(id)};
837  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
838  default:
839  return Parsed{};
840  };
841  }

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

794  {
795  const auto parsed = parse(tTopo, id);
796  order.push_back(parsed.order);
797  ring.push_back(parsed.ring);
798  rod.push_back(parsed.rod);
799  }

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

◆ resize()

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

Definition at line 801 of file TrackingNtuple.cc.

801  {
802  order.resize(size);
803  ring.resize(size);
804  rod.resize(size);
805  }

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

807  {
808  const auto parsed = parse(tTopo, id);
809  order[index] = parsed.order;
810  ring[index] = parsed.ring;
811  rod[index] = parsed.rod;
812  }

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

Member Data Documentation

◆ order

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

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

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

TrackingNtuple::DetIdOTCommon::ring
std::vector< unsigned short > ring
Definition: TrackingNtuple.cc:844
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:843
TrackingNtuple::DetIdOTCommon::rod
std::vector< unsigned short > rod
Definition: TrackingNtuple.cc:845
BOOK
#define BOOK(name)
Definition: TrackingNtuple.cc:688
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:828
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