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

Constructor & Destructor Documentation

◆ DetIdStripOnly()

TrackingNtuple::DetIdStripOnly::DetIdStripOnly ( )
inline

Definition at line 876 of file TrackingNtuple.cc.

876 {}

Member Function Documentation

◆ book()

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

Definition at line 878 of file TrackingNtuple.cc.

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

878  {
879  BOOK(string);
880  BOOK(petalNumber);
881  BOOK(isStereo);
882  BOOK(isRPhi);
883  BOOK(isGlued);
884  }
#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 912 of file TrackingNtuple.cc.

References isGlued, isRPhi, isStereo, and petalNumber.

912  {
913  string.clear();
914  isStereo.clear();
915  isRPhi.clear();
916  isGlued.clear();
917  petalNumber.clear();
918  }
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 928 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().

928  {
929  switch (id.subdetId()) {
931  return Parsed{tTopo.tibString(id), 0, tTopo.tibIsDoubleSide(id)};
933  return Parsed{0, 0, tTopo.tidIsDoubleSide(id)};
935  return Parsed{0, 0, tTopo.tobIsDoubleSide(id)};
937  return Parsed{0, tTopo.tecPetalNumber(id), tTopo.tecIsDoubleSide(id)};
938  default:
939  return Parsed{};
940  }
941  }
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 886 of file TrackingNtuple.cc.

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

886  {
887  const auto parsed = parse(tTopo, id);
888  string.push_back(parsed.string);
889  petalNumber.push_back(parsed.petalNumber);
890  isStereo.push_back(tTopo.isStereo(id));
891  isRPhi.push_back(tTopo.isRPhi(id));
892  isGlued.push_back(parsed.glued);
893  }
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 895 of file TrackingNtuple.cc.

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

895  {
896  string.resize(size);
897  petalNumber.resize(size);
898  isStereo.resize(size);
899  isRPhi.resize(size);
900  isGlued.resize(size);
901  }
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 903 of file TrackingNtuple.cc.

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

903  {
904  const auto parsed = parse(tTopo, id);
905  string[index] = parsed.string;
906  petalNumber[index] = parsed.petalNumber;
907  isStereo[index] = tTopo.isStereo(id);
908  isRPhi[index] = tTopo.isRPhi(id);
909  isGlued[index] = parsed.glued;
910  }
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 947 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 946 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 945 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 944 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 943 of file TrackingNtuple.cc.