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 TrackerGeometry &tracker, const TrackerTopology &tTopo, const DetId &id)
 
void resize (size_t size)
 
void set (size_t index, const TrackerGeometry &tracker, 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 810 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdOTCommon()

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 812 of file TrackingNtuple.cc.

812 {}

Member Function Documentation

◆ book()

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

Definition at line 814 of file TrackingNtuple.cc.

References BOOK, order, ring, and rod.

814  {
815  BOOK(order);
816  BOOK(ring);
817  BOOK(rod);
818  }
std::vector< unsigned short > order
#define BOOK(name)
std::vector< unsigned short > ring
std::vector< unsigned short > rod

◆ clear()

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

Definition at line 840 of file TrackingNtuple.cc.

References order, ring, and rod.

840  {
841  order.clear();
842  ring.clear();
843  rod.clear();
844  }
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod

◆ parse()

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

Definition at line 854 of file TrackingNtuple.cc.

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().

854  {
855  switch (id.subdetId()) {
857  return Parsed{tTopo.tibOrder(id), 0, 0};
859  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
861  return Parsed{0, 0, tTopo.tobRod(id)};
863  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
864  default:
865  return Parsed{};
866  };
867  }
static constexpr auto TEC
unsigned int tibOrder(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidOrder(const DetId &id) const
unsigned int tecOrder(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
unsigned int tobRod(const DetId &id) const
unsigned int tidRing(const DetId &id) const
static constexpr auto TID

◆ push_back()

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

Definition at line 820 of file TrackingNtuple.cc.

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

820  {
821  const auto parsed = parse(tTopo, id);
822  order.push_back(parsed.order);
823  ring.push_back(parsed.ring);
824  rod.push_back(parsed.rod);
825  }
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const

◆ resize()

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

Definition at line 827 of file TrackingNtuple.cc.

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

827  {
828  order.resize(size);
829  ring.resize(size);
830  rod.resize(size);
831  }
size
Write out results.
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod

◆ set()

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

Definition at line 833 of file TrackingNtuple.cc.

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

833  {
834  const auto parsed = parse(tTopo, id);
835  order[index] = parsed.order;
836  ring[index] = parsed.ring;
837  rod[index] = parsed.rod;
838  }
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const

Member Data Documentation

◆ order

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

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

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