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

Constructor & Destructor Documentation

◆ DetIdOTCommon()

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 808 of file TrackingNtuple.cc.

808 {}

Member Function Documentation

◆ book()

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

Definition at line 810 of file TrackingNtuple.cc.

References BOOK, order, ring, and rod.

810  {
811  BOOK(order);
812  BOOK(ring);
813  BOOK(rod);
814  }
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 836 of file TrackingNtuple.cc.

References order, ring, and rod.

836  {
837  order.clear();
838  ring.clear();
839  rod.clear();
840  }
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 850 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().

850  {
851  switch (id.subdetId()) {
853  return Parsed{tTopo.tibOrder(id), 0, 0};
855  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
857  return Parsed{0, 0, tTopo.tobRod(id)};
859  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
860  default:
861  return Parsed{};
862  };
863  }
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 816 of file TrackingNtuple.cc.

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

816  {
817  const auto parsed = parse(tTopo, id);
818  order.push_back(parsed.order);
819  ring.push_back(parsed.ring);
820  rod.push_back(parsed.rod);
821  }
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 823 of file TrackingNtuple.cc.

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

823  {
824  order.resize(size);
825  ring.resize(size);
826  rod.resize(size);
827  }
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 829 of file TrackingNtuple.cc.

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

829  {
830  const auto parsed = parse(tTopo, id);
831  order[index] = parsed.order;
832  ring[index] = parsed.ring;
833  rod[index] = parsed.rod;
834  }
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 865 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 867 of file TrackingNtuple.cc.

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