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

Constructor & Destructor Documentation

TrackingNtuple::DetIdOTCommon::DetIdOTCommon ( )
inline

Definition at line 787 of file TrackingNtuple.cc.

787 {}

Member Function Documentation

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

Definition at line 789 of file TrackingNtuple.cc.

References BOOK, and relativeConstraints::ring.

789  {
790  BOOK(order);
791  BOOK(ring);
792  BOOK(rod);
793  }
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 815 of file TrackingNtuple.cc.

References relativeConstraints::ring.

815  {
816  order.clear();
817  ring.clear();
818  rod.clear();
819  }
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 829 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().

829  {
830  switch(id.subdetId()) {
832  return Parsed{tTopo.tibOrder(id), 0, 0};
834  return Parsed{tTopo.tidOrder(id), tTopo.tidRing(id), 0};
836  return Parsed{0, 0, tTopo.tobRod(id)};
838  return Parsed{tTopo.tecOrder(id), tTopo.tecRing(id), 0};
839  default:
840  return Parsed{};
841  };
842  }
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 795 of file TrackingNtuple.cc.

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

795  {
796  const auto parsed = parse(tTopo, id);
797  order .push_back(parsed.order );
798  ring .push_back(parsed.ring );
799  rod .push_back(parsed.rod );
800  }
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 808 of file TrackingNtuple.cc.

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

808  {
809  const auto parsed = parse(tTopo, id);
810  order [index] = parsed.order ;
811  ring [index] = parsed.ring ;
812  rod [index] = parsed.rod ;
813  }
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 844 of file TrackingNtuple.cc.

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

Definition at line 845 of file TrackingNtuple.cc.

Referenced by geometryXMLparser.CSCAlignable::index().

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

Definition at line 846 of file TrackingNtuple.cc.