CMS 3D CMS Logo

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 TrackerGeometry &tracker, const TrackerTopology &tTopo, const DetId &id)
 
void resize (size_t size)
 
void set (size_t index, const TrackerGeometry &tracker, 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 870 of file TrackingNtuple.cc.

Constructor & Destructor Documentation

◆ DetIdStripOnly()

TrackingNtuple::DetIdStripOnly::DetIdStripOnly ( )
inline

Definition at line 872 of file TrackingNtuple.cc.

872 {}

Member Function Documentation

◆ book()

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

Definition at line 874 of file TrackingNtuple.cc.

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

874  {
875  BOOK(string);
876  BOOK(petalNumber);
877  BOOK(isStereo);
878  BOOK(isRPhi);
879  BOOK(isGlued);
880  }
#define BOOK(name)
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber

◆ clear()

void TrackingNtuple::DetIdStripOnly::clear ( void  )
inline

Definition at line 908 of file TrackingNtuple.cc.

References isGlued, isRPhi, isStereo, and petalNumber.

908  {
909  string.clear();
910  isStereo.clear();
911  isRPhi.clear();
912  isGlued.clear();
913  petalNumber.clear();
914  }
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber

◆ parse()

Parsed TrackingNtuple::DetIdStripOnly::parse ( const TrackerTopology tTopo,
const DetId id 
) const
inlineprivate

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

924  {
925  switch (id.subdetId()) {
927  return Parsed{tTopo.tibString(id), 0, tTopo.tibIsDoubleSide(id)};
929  return Parsed{0, 0, tTopo.tidIsDoubleSide(id)};
931  return Parsed{0, 0, tTopo.tobIsDoubleSide(id)};
933  return Parsed{0, tTopo.tecPetalNumber(id), tTopo.tecIsDoubleSide(id)};
934  default:
935  return Parsed{};
936  }
937  }
unsigned int tecPetalNumber(const DetId &id) const
static constexpr auto TEC
bool tibIsDoubleSide(const DetId &id) const
bool tecIsDoubleSide(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tibString(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
static constexpr auto TID

◆ push_back()

void TrackingNtuple::DetIdStripOnly::push_back ( const TrackerGeometry tracker,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 882 of file TrackingNtuple.cc.

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

882  {
883  const auto parsed = parse(tTopo, id);
884  string.push_back(parsed.string);
885  petalNumber.push_back(parsed.petalNumber);
886  isStereo.push_back(tTopo.isStereo(id));
887  isRPhi.push_back(tTopo.isRPhi(id));
888  isGlued.push_back(parsed.glued);
889  }
bool isStereo(const DetId &id) const
bool isRPhi(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
std::vector< unsigned short > petalNumber

◆ resize()

void TrackingNtuple::DetIdStripOnly::resize ( size_t  size)
inline

Definition at line 891 of file TrackingNtuple.cc.

References isGlued, isRPhi, isStereo, petalNumber, and findQualityFiles::size.

891  {
892  string.resize(size);
893  petalNumber.resize(size);
894  isStereo.resize(size);
895  isRPhi.resize(size);
896  isGlued.resize(size);
897  }
size
Write out results.
std::vector< unsigned short > isStereo
std::vector< unsigned short > isGlued
std::vector< unsigned short > isRPhi
std::vector< unsigned short > petalNumber

◆ set()

void TrackingNtuple::DetIdStripOnly::set ( size_t  index,
const TrackerGeometry tracker,
const TrackerTopology tTopo,
const DetId id 
)
inline

Definition at line 899 of file TrackingNtuple.cc.

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

899  {
900  const auto parsed = parse(tTopo, id);
901  string[index] = parsed.string;
902  petalNumber[index] = parsed.petalNumber;
903  isStereo[index] = tTopo.isStereo(id);
904  isRPhi[index] = tTopo.isRPhi(id);
905  isGlued[index] = parsed.glued;
906  }
bool isStereo(const DetId &id) const
bool isRPhi(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
std::vector< unsigned short > petalNumber

Member Data Documentation

◆ isGlued

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

Definition at line 943 of file TrackingNtuple.cc.

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

◆ isRPhi

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

Definition at line 942 of file TrackingNtuple.cc.

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

◆ isStereo

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

Definition at line 941 of file TrackingNtuple.cc.

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

◆ petalNumber

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

Definition at line 940 of file TrackingNtuple.cc.

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

◆ string

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

Definition at line 939 of file TrackingNtuple.cc.