ATLAS Offline Software
Loading...
Searching...
No Matches
bands Class Reference
Collaboration diagram for bands:

Public Member Functions

 bands ()
 bands (const bands &b)=default
bands & operator= (const bands &b)=default
 bands (const std::vector< double > &limits, const std::vector< std::string > &labels)
void range (const std::string &chain, TH1F *h)
void range (size_t i, TH1F *h)

Private Attributes

std::vector< double > m_limits
std::vector< std::string > m_labels

Detailed Description

Definition at line 430 of file comparitor.cxx.

Constructor & Destructor Documentation

◆ bands() [1/3]

bands::bands ( )
inline

Definition at line 434 of file comparitor.cxx.

434{ }

◆ bands() [2/3]

bands::bands ( const bands & b)
default

◆ bands() [3/3]

bands::bands ( const std::vector< double > & limits,
const std::vector< std::string > & labels )
inline

Definition at line 439 of file comparitor.cxx.

440 : m_limits(limits), m_labels(labels)
441 { }
std::vector< std::string > m_labels
std::vector< double > m_limits

Member Function Documentation

◆ operator=()

bands & bands::operator= ( const bands & b)
default

◆ range() [1/2]

void bands::range ( const std::string & chain,
TH1F * h )
inline

Definition at line 443 of file comparitor.cxx.

443 {
444 for ( size_t i=0 ; i<m_labels.size() ; i++ ) {
445 if ( chain.find(m_labels[i])!=std::string::npos ) return range( i, h );
446 }
447 return range( m_labels.size(), h );
448 }
void range(const std::string &chain, TH1F *h)

◆ range() [2/2]

void bands::range ( size_t i,
TH1F * h )
inline

Definition at line 451 of file comparitor.cxx.

451 {
452
453 double minx = h->GetBinLowEdge(1);
454 double maxx = h->GetBinLowEdge(h->GetNbinsX()+1);
455
456 if ( i>=m_limits.size() ) { maxx+=1; minx=maxx; }
457 else if ( (i+1)==m_limits.size() ) minx=m_limits[i];
458 else {
459 minx = m_limits[i];
460 maxx = m_limits[i+1];
461 }
462
463
464 for ( int j=1 ; j<=h->GetNbinsX() ; j++ ) {
465
466 std::cout << "range: " << j << "\tminx: " << minx << "\t" << maxx << std::endl;
467 if ( ! ( h->GetBinCenter(j)>=minx && h->GetBinCenter(j)<maxx ) ) {
468 h->SetBinContent(j,0);
469 h->SetBinError(j,0);
470 }
471 }
472 }
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

Member Data Documentation

◆ m_labels

std::vector<std::string> bands::m_labels
private

Definition at line 478 of file comparitor.cxx.

◆ m_limits

std::vector<double> bands::m_limits
private

Definition at line 477 of file comparitor.cxx.


The documentation for this class was generated from the following file: