CMS 3D CMS Logo

Public Member Functions | Public Attributes

PixelLimits Struct Reference

#include <ClusterShapeHitFilter.h>

List of all members.

Public Member Functions

bool isInside (const std::pair< float, float > &pred) const
 PixelLimits ()

Public Attributes

float data [2][2][2]

Detailed Description

Definition at line 78 of file ClusterShapeHitFilter.h.


Constructor & Destructor Documentation

PixelLimits::PixelLimits ( ) [inline]

Definition at line 79 of file ClusterShapeHitFilter.h.

References data, and MessageLogger_cff::limit.

                {
    // init to make sure inside is true;
    auto limit = data[0];
    limit[0][0] = -10e10;
    limit[0][1] =  10e10;
    limit[1][0] = -10e10;
    limit[1][1] =  10e10;
    limit = data[1];
    limit[0][0] = -10e10;
    limit[0][1] =  10e10;
    limit[1][0] = -10e10;
    limit[1][1] =  10e10;
  }

Member Function Documentation

bool PixelLimits::isInside ( const std::pair< float, float > &  pred) const [inline]

Definition at line 95 of file ClusterShapeHitFilter.h.

References data, and MessageLogger_cff::limit.

                                                          {
    auto limit = data[0];
    bool one = (pred.first  > limit[0][0]) && ( pred.first  < limit[0][1] ) 
                                                && (pred.second > limit[1][0]) && (pred.second < limit[1][1]);

    limit = data[1];
    bool two = (pred.first  > limit[0][0]) && ( pred.first  < limit[0][1] ) 
                                                && (pred.second > limit[1][0]) && (pred.second < limit[1][1]);
    
    return one || two;
  }

Member Data Documentation

float PixelLimits::data[2][2][2]

Definition at line 93 of file ClusterShapeHitFilter.h.

Referenced by isInside(), and PixelLimits().