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

Constructor & Destructor Documentation

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 650 of file TrackingNtuple.cc.

650 {}

Member Function Documentation

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

Definition at line 652 of file TrackingNtuple.cc.

References BOOK, and relativeConstraints::ring.

652  {
653  BOOK(order);
654  BOOK(ring);
655  BOOK(rod);
656  }
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 678 of file TrackingNtuple.cc.

References relativeConstraints::ring.

678  {
679  order.clear();
680  ring.clear();
681  rod.clear();
682  }
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 692 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().

692  {
693  switch(id.subdetId()) {
695  return Parsed{tTopo.tibOrder(id), 0, 0};
697  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
699  return Parsed{0, 0, tTopo.tobRod(id)};
701  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
702  default:
703  return Parsed{};
704  };
705  }
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecOrder(const DetId &id) const
unsigned int tidOrder(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tibOrder(const DetId &id) const
void TrackingNtuple::DetIdOTCommon::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 658 of file TrackingNtuple.cc.

References dumpparser::parse(), and relativeConstraints::ring.

658  {
659  const auto parsed = parse(tTopo, id);
660  order .push_back(parsed.order );
661  ring .push_back(parsed.ring );
662  rod .push_back(parsed.rod );
663  }
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
void TrackingNtuple::DetIdOTCommon::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 671 of file TrackingNtuple.cc.

References diffTreeTool::index, dumpparser::parse(), and relativeConstraints::ring.

671  {
672  const auto parsed = parse(tTopo, id);
673  order [index] = parsed.order ;
674  ring [index] = parsed.ring ;
675  rod [index] = parsed.rod ;
676  }
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 707 of file TrackingNtuple.cc.

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

Definition at line 708 of file TrackingNtuple.cc.

Referenced by geometryXMLparser.CSCAlignable::index().

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

Definition at line 709 of file TrackingNtuple.cc.