#include <QuadrupletSeedMerger.h>
Public Types | |
enum | Side { Minus = 1, Plus = 2, Undefined, SideError } |
Public Member Functions | |
unsigned | getLayerNumber (void) const |
std::string | getName (void) const |
Side | getSide (void) const |
PixelSubdetector::SubDetector | getSubdet (void) const |
bool | isContainsDetector (const DetId &, const TrackerTopology *tTopo) const |
SeedMergerPixelLayer (const std::string &) | |
Private Member Functions | |
bool | isValidName (const std::string &) |
Private Attributes | |
bool | isValid_ |
unsigned | layer_ |
std::string | name_ |
SeedMergerPixelLayer::Side | side_ |
PixelSubdetector::SubDetector | subdet_ |
helper class for extracting info from layer bare names
Definition at line 49 of file QuadrupletSeedMerger.h.
SeedMergerPixelLayer::SeedMergerPixelLayer | ( | const std::string & | name | ) |
Definition at line 699 of file QuadrupletSeedMerger.cc.
References dtNoiseDBValidation_cfg::cerr, isValid_, isValidName(), layer_, Minus, mergeVDriftHistosByStation::name, name_, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, Plus, side_, SideError, subdet_, and Undefined.
{ if( ! isValidName( name ) ) { std::cerr << " [SeedMergerPixelLayer::SeedMergerPixelLayer] ** ERROR: illegal name: \"" << name << "\"." << std::endl; isValid_ = false; return; } // bare name, can be done here name_ = name; // (output format -> see DataFormats/SiPixelDetId/interface/PixelSubdetector.h) if( std::string::npos != name_.find( "BPix" ) ) { subdet_ = PixelSubdetector::PixelBarrel; side_ = Undefined;} else if( std::string::npos != name_.find( "FPix" ) ) { subdet_ = PixelSubdetector::PixelEndcap; if( std::string::npos != name_.find( "pos", 6 ) ) side_ = Plus; else if( std::string::npos != name_.find( "neg", 6 ) ) side_ = Minus; else { std::cerr << " [PixelLayerNameParser::side] ** ERROR: something's wrong here.." << std::endl; side_ = SideError; } } else { std::cerr << " [PixelLayerNameParser::subdetector] ** ERROR: something's wrong here.." << std::endl; } // layer layer_ = atoi( name_.substr( 4, 1 ).c_str() ); }
unsigned SeedMergerPixelLayer::getLayerNumber | ( | void | ) | const [inline] |
Definition at line 55 of file QuadrupletSeedMerger.h.
References layer_.
Referenced by isContainsDetector().
{ return layer_; }
std::string SeedMergerPixelLayer::getName | ( | void | ) | const [inline] |
Side SeedMergerPixelLayer::getSide | ( | void | ) | const [inline] |
Definition at line 56 of file QuadrupletSeedMerger.h.
References side_.
Referenced by isContainsDetector().
{ return side_;}
PixelSubdetector::SubDetector SeedMergerPixelLayer::getSubdet | ( | void | ) | const [inline] |
Definition at line 57 of file QuadrupletSeedMerger.h.
References subdet_.
Referenced by isContainsDetector().
{ return subdet_; }
bool SeedMergerPixelLayer::isContainsDetector | ( | const DetId & | detId, |
const TrackerTopology * | tTopo | ||
) | const |
check if the layer or disk described by this object is the one carrying the detector: detId
Definition at line 762 of file QuadrupletSeedMerger.cc.
References getLayerNumber(), getSide(), getSubdet(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), and DetId::subdetId().
Referenced by QuadrupletSeedMerger::isMergeableHitsInTriplets(), and QuadrupletSeedMerger::isTripletsShareHitsOnLayers().
{ PixelSubdetector::SubDetector subdet = getSubdet(); // same subdet? if( detId.subdetId() == subdet ) { // same barrel layer? if( PixelSubdetector::PixelBarrel == subdet ) { if (tTopo->pxbLayer(detId) == getLayerNumber()) { return true; } } // same endcap disk? else if( PixelSubdetector::PixelEndcap == subdet ) { if (tTopo->pxfDisk(detId) == getLayerNumber()) { if (tTopo->pxfSide(detId) == (unsigned)getSide()) { return true; } } } } return false; }
bool SeedMergerPixelLayer::isValidName | ( | const std::string & | name | ) | [private] |
check if we have a name string as expected
Definition at line 736 of file QuadrupletSeedMerger.cc.
References dtNoiseDBValidation_cfg::cerr.
Referenced by SeedMergerPixelLayer().
{ const int layer = atoi( name.substr( 4, 1 ).c_str() ); if( std::string::npos != name.find( "BPix" ) ) { if( layer > 0 && layer < 5 ) return true; } else if( std::string::npos != name.find( "FPix" ) ) { if( layer > 0 && layer < 4 ) { if( std::string::npos != name.find( "pos", 6 ) || std::string::npos != name.find( "neg", 6 ) ) return true; } } std::cerr << " [SeedMergerPixelLayer::isValidName] ** WARNING: invalid name: \"" << name << "\"." << std::endl; return false; }
bool SeedMergerPixelLayer::isValid_ [private] |
Definition at line 63 of file QuadrupletSeedMerger.h.
Referenced by SeedMergerPixelLayer().
unsigned SeedMergerPixelLayer::layer_ [private] |
Definition at line 66 of file QuadrupletSeedMerger.h.
Referenced by getLayerNumber(), and SeedMergerPixelLayer().
std::string SeedMergerPixelLayer::name_ [private] |
Definition at line 64 of file QuadrupletSeedMerger.h.
Referenced by getName(), and SeedMergerPixelLayer().
Definition at line 67 of file QuadrupletSeedMerger.h.
Referenced by getSide(), and SeedMergerPixelLayer().
Definition at line 65 of file QuadrupletSeedMerger.h.
Referenced by getSubdet(), and SeedMergerPixelLayer().