CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 782 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 784 of file TrackingNtuple.cc.

784 {}

Member Function Documentation

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

Definition at line 786 of file TrackingNtuple.cc.

References BOOK, order, ring, and rod.

786  {
787  BOOK(order);
788  BOOK(ring);
789  BOOK(rod);
790  }
std::vector< unsigned short > order
#define BOOK(name)
std::vector< unsigned short > ring
std::vector< unsigned short > rod
void TrackingNtuple::DetIdOTCommon::clear ( void  )
inline

Definition at line 812 of file TrackingNtuple.cc.

References order, ring, and rod.

812  {
813  order.clear();
814  ring.clear();
815  rod.clear();
816  }
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod
Parsed TrackingNtuple::DetIdOTCommon::parse ( const TrackerTopology tTopo,
const DetId id 
) const
inlineprivate

Definition at line 826 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().

826  {
827  switch (id.subdetId()) {
829  return Parsed{tTopo.tibOrder(id), 0, 0};
831  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
833  return Parsed{0, 0, tTopo.tobRod(id)};
835  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
836  default:
837  return Parsed{};
838  };
839  }
static constexpr auto TEC
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
static constexpr auto TOB
static constexpr auto TIB
unsigned int tecOrder(const DetId &id) const
unsigned int tidOrder(const DetId &id) const
unsigned int tobRod(const DetId &id) const
static constexpr auto TID
unsigned int tibOrder(const DetId &id) const
void TrackingNtuple::DetIdOTCommon::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 792 of file TrackingNtuple.cc.

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

792  {
793  const auto parsed = parse(tTopo, id);
794  order.push_back(parsed.order);
795  ring.push_back(parsed.ring);
796  rod.push_back(parsed.rod);
797  }
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod
void TrackingNtuple::DetIdOTCommon::resize ( size_t  size)
inline

Definition at line 799 of file TrackingNtuple.cc.

References order, ring, and rod.

799  {
800  order.resize(size);
801  ring.resize(size);
802  rod.resize(size);
803  }
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod
tuple size
Write out results.
void TrackingNtuple::DetIdOTCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 805 of file TrackingNtuple.cc.

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

805  {
806  const auto parsed = parse(tTopo, id);
807  order[index] = parsed.order;
808  ring[index] = parsed.ring;
809  rod[index] = parsed.rod;
810  }
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > order
std::vector< unsigned short > ring
std::vector< unsigned short > rod

Member Data Documentation

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

Definition at line 841 of file TrackingNtuple.cc.

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

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

Definition at line 843 of file TrackingNtuple.cc.

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