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::DetIdStripOnly Class Reference

Classes

struct  Parsed
 

Public Member Functions

void book (const std::string &prefix, TTree *tree)
 
void clear ()
 
 DetIdStripOnly ()
 
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 > isGlued
 
std::vector< unsigned short > isRPhi
 
std::vector< unsigned short > isStereo
 
std::vector< unsigned short > petalNumber
 
std::vector< unsigned short > string
 

Detailed Description

Definition at line 846 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

TrackingNtuple::DetIdStripOnly::DetIdStripOnly ( )
inline

Definition at line 848 of file TrackingNtuple.cc.

848 {}

Member Function Documentation

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

Definition at line 850 of file TrackingNtuple.cc.

References BOOK, isGlued, isRPhi, isStereo, and petalNumber.

850  {
851  BOOK(string);
852  BOOK(petalNumber);
853  BOOK(isStereo);
854  BOOK(isRPhi);
855  BOOK(isGlued);
856  }
#define BOOK(name)
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::clear ( void  )
inline

Definition at line 884 of file TrackingNtuple.cc.

References isGlued, isRPhi, isStereo, and petalNumber.

884  {
885  string.clear();
886  isStereo.clear();
887  isRPhi.clear();
888  isGlued.clear();
889  petalNumber.clear();
890  }
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber
Parsed TrackingNtuple::DetIdStripOnly::parse ( const TrackerTopology tTopo,
const DetId id 
) const
inlineprivate

Definition at line 900 of file TrackingNtuple.cc.

References StripSubdetector::TEC, TrackerTopology::tecIsDoubleSide(), TrackerTopology::tecPetalNumber(), StripSubdetector::TIB, TrackerTopology::tibIsDoubleSide(), TrackerTopology::tibString(), StripSubdetector::TID, TrackerTopology::tidIsDoubleSide(), StripSubdetector::TOB, and TrackerTopology::tobIsDoubleSide().

Referenced by push_back(), and set().

900  {
901  switch (id.subdetId()) {
903  return Parsed{tTopo.tibString(id), 0, tTopo.tibIsDoubleSide(id)};
905  return Parsed{0, 0, tTopo.tidIsDoubleSide(id)};
907  return Parsed{0, 0, tTopo.tobIsDoubleSide(id)};
909  return Parsed{0, tTopo.tecPetalNumber(id), tTopo.tecIsDoubleSide(id)};
910  default:
911  return Parsed{};
912  }
913  }
static constexpr auto TEC
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibString(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
bool tidIsDoubleSide(const DetId &id) const
unsigned int tecPetalNumber(const DetId &id) const
static constexpr auto TID
void TrackingNtuple::DetIdStripOnly::push_back ( const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 858 of file TrackingNtuple.cc.

References isGlued, TrackerTopology::isRPhi(), isRPhi, TrackerTopology::isStereo(), isStereo, parse(), and petalNumber.

858  {
859  const auto parsed = parse(tTopo, id);
860  string.push_back(parsed.string);
861  petalNumber.push_back(parsed.petalNumber);
862  isStereo.push_back(tTopo.isStereo(id));
863  isRPhi.push_back(tTopo.isRPhi(id));
864  isGlued.push_back(parsed.glued);
865  }
bool isStereo(const DetId &id) const
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
bool isRPhi(const DetId &id) const
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::resize ( size_t  size)
inline

Definition at line 867 of file TrackingNtuple.cc.

References isGlued, isRPhi, isStereo, and petalNumber.

867  {
868  string.resize(size);
869  petalNumber.resize(size);
870  isStereo.resize(size);
871  isRPhi.resize(size);
872  isGlued.resize(size);
873  }
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
tuple size
Write out results.
std::vector< unsigned short > petalNumber
void TrackingNtuple::DetIdStripOnly::set ( size_t  index,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 875 of file TrackingNtuple.cc.

References isGlued, TrackerTopology::isRPhi(), isRPhi, TrackerTopology::isStereo(), isStereo, parse(), and petalNumber.

875  {
876  const auto parsed = parse(tTopo, id);
877  string[index] = parsed.string;
878  petalNumber[index] = parsed.petalNumber;
879  isStereo[index] = tTopo.isStereo(id);
880  isRPhi[index] = tTopo.isRPhi(id);
881  isGlued[index] = parsed.glued;
882  }
bool isStereo(const DetId &id) const
Parsed parse(const TrackerTopology &tTopo, const DetId &id) const
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
bool isRPhi(const DetId &id) const
std::vector< unsigned short > petalNumber

Member Data Documentation

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isGlued
private

Definition at line 919 of file TrackingNtuple.cc.

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

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isRPhi
private

Definition at line 918 of file TrackingNtuple.cc.

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

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::isStereo
private

Definition at line 917 of file TrackingNtuple.cc.

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

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::petalNumber
private

Definition at line 916 of file TrackingNtuple.cc.

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

std::vector<unsigned short> TrackingNtuple::DetIdStripOnly::string
private

Definition at line 915 of file TrackingNtuple.cc.