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

Constructor & Destructor Documentation

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 638 of file TrackingNtuple.cc.

638 {}

Member Function Documentation

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

Definition at line 640 of file TrackingNtuple.cc.

References BOOK, and relativeConstraints::ring.

640  {
641  BOOK(order);
642  BOOK(ring);
643  BOOK(rod);
644  }
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 666 of file TrackingNtuple.cc.

References relativeConstraints::ring.

666  {
667  order.clear();
668  ring.clear();
669  rod.clear();
670  }
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 680 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().

680  {
681  switch(id.subdetId()) {
683  return Parsed{tTopo.tibOrder(id), 0, 0};
685  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
687  return Parsed{0, 0, tTopo.tobRod(id)};
689  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
690  default:
691  return Parsed{};
692  };
693  }
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 646 of file TrackingNtuple.cc.

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

646  {
647  const auto parsed = parse(tTopo, id);
648  order .push_back(parsed.order );
649  ring .push_back(parsed.ring );
650  rod .push_back(parsed.rod );
651  }
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 659 of file TrackingNtuple.cc.

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

659  {
660  const auto parsed = parse(tTopo, id);
661  order [index] = parsed.order ;
662  ring [index] = parsed.ring ;
663  rod [index] = parsed.rod ;
664  }
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 695 of file TrackingNtuple.cc.

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

Definition at line 696 of file TrackingNtuple.cc.

Referenced by geometryXMLparser.CSCAlignable::index().

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

Definition at line 697 of file TrackingNtuple.cc.