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 428 of file comparitor.cxx.

Constructor & Destructor Documentation

◆ bands() [1/3]

bands::bands ( )
inline

Definition at line 432 of file comparitor.cxx.

432{ }

◆ 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 437 of file comparitor.cxx.

438 : m_limits(limits), m_labels(labels)
439 { }
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 441 of file comparitor.cxx.

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

◆ range() [2/2]

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

Definition at line 449 of file comparitor.cxx.

449 {
450
451 double minx = h->GetBinLowEdge(1);
452 double maxx = h->GetBinLowEdge(h->GetNbinsX()+1);
453
454 if ( i>=m_limits.size() ) { maxx+=1; minx=maxx; }
455 else if ( (i+1)==m_limits.size() ) minx=m_limits[i];
456 else {
457 minx = m_limits[i];
458 maxx = m_limits[i+1];
459 }
460
461
462 for ( int j=1 ; j<=h->GetNbinsX() ; j++ ) {
463
464 std::cout << "range: " << j << "\tminx: " << minx << "\t" << maxx << std::endl;
465 if ( ! ( h->GetBinCenter(j)>=minx && h->GetBinCenter(j)<maxx ) ) {
466 h->SetBinContent(j,0);
467 h->SetBinError(j,0);
468 }
469 }
470 }
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 476 of file comparitor.cxx.

◆ m_limits

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

Definition at line 475 of file comparitor.cxx.


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