CMS 3D CMS Logo

Public Member Functions | Private Attributes

HitMatchingAlgorithm_thresholds< T > Class Template Reference

#include <HitMatchingAlgorithm_thresholds.h>

Inheritance diagram for HitMatchingAlgorithm_thresholds< T >:
HitMatchingAlgorithm< T >

List of all members.

Public Member Functions

void CheckTwoMemberHitsForCompatibility (bool &aConfirmation, int &aDisplacement, int &anOffset, const L1TkStub< T > &aL1TkStub) const
 Matching operations.
 HitMatchingAlgorithm_thresholds (const StackedTrackerGeometry *aStackedTracker, const edm::ParameterSet &pset)
 Constructor.
 ~HitMatchingAlgorithm_thresholds ()
 Destructor.

Private Attributes

std::vector< unsigned int > columnmax_
std::vector< unsigned int > columnmin_
std::vector< unsigned int > layers_
std::vector< std::vector
< unsigned int > > 
rowcuts_
 Data members.
std::vector< std::vector
< unsigned int > > 
rowoffsets_
std::vector< std::vector
< unsigned int > > 
rowwindows_

Detailed Description

template<class T>
class HitMatchingAlgorithm_thresholds< T >

//////////////////////////////////////// Stacked Tracker Simulations /// / Nicola Pozzobon, UNIPD /// / 2010, May /// 2011, June /// ////////////////////////////////////// ************************ DECLARATION OF CLASS ************************

Definition at line 31 of file HitMatchingAlgorithm_thresholds.h.


Constructor & Destructor Documentation

template<class T >
HitMatchingAlgorithm_thresholds< T >::HitMatchingAlgorithm_thresholds ( const StackedTrackerGeometry aStackedTracker,
const edm::ParameterSet pset 
) [inline]

Constructor.

Extract row threshold options

Definition at line 45 of file HitMatchingAlgorithm_thresholds.h.

References HitMatchingAlgorithm_thresholds< T >::columnmax_, HitMatchingAlgorithm_thresholds< T >::columnmin_, edm::ParameterSet::getParameter(), HitMatchingAlgorithm_thresholds< T >::layers_, HitMatchingAlgorithm_thresholds< T >::rowcuts_, HitMatchingAlgorithm_thresholds< T >::rowoffsets_, and HitMatchingAlgorithm_thresholds< T >::rowwindows_.

        : HitMatchingAlgorithm< T >( aStackedTracker,__func__ ) {

        std::vector< edm::ParameterSet > vpset=(pset.getParameter< std::vector< edm::ParameterSet > >("Thresholds"));
        std::vector<edm::ParameterSet>::const_iterator ipset;
        for (ipset = vpset.begin(); ipset!=vpset.end(); ipset++)
          {   
            layers_.push_back(ipset->getParameter<unsigned int>("Layer"));
            rowcuts_.push_back(ipset->getParameter< std::vector< unsigned int > >("RowCuts"));
            rowoffsets_.push_back(ipset->getParameter< std::vector< unsigned int > >("RowOffsets"));
            rowwindows_.push_back(ipset->getParameter< std::vector< unsigned int > >("RowWindows"));
            columnmin_.push_back(ipset->getParameter<unsigned int>("ColumnCutMin"));
            columnmax_.push_back(ipset->getParameter<unsigned int>("ColumnCutMax"));
          }
      }

Destructor.

Definition at line 64 of file HitMatchingAlgorithm_thresholds.h.

{}

Member Function Documentation

template<typename T >
void HitMatchingAlgorithm_thresholds< T >::CheckTwoMemberHitsForCompatibility ( bool &  aConfirmation,
int &  aDisplacement,
int &  anOffset,
const L1TkStub< T > &  aL1TkStub 
) const [virtual]

Matching operations.

Close class.

***************************** IMPLEMENTATION OF METHODS ***************************** Matching operations

Convert DetId

Force this to be a BARREL-only algorithm

Find hit positions

Layer number

Check layer

Find row cut

Set row thresholds

Set column thresholds

Decision

Return comparison

Calculate output NOTE this assumes equal pitch in both sensors!

In HALF-STRIP units!

By default, assigned as ZERO

Reimplemented from HitMatchingAlgorithm< T >.

Definition at line 80 of file HitMatchingAlgorithm_thresholds.h.

References PV3DBase< T, PVType, FrameType >::eta(), L1TkStub< T >::getClusterPtr(), L1TkStub< T >::getDetId(), i, SurfaceOrientation::inner, j, SurfaceOrientation::outer, pos, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

  {
    StackedTrackerDetId stDetId( aL1TkStub.getDetId() );

    if ( stDetId.isEndcap() )
    {
      aConfirmation = false;
      return;
    }

    
    MeasurementPoint inner = aL1TkStub.getClusterPtr(0)->findAverageLocalCoordinates();
    MeasurementPoint outer = aL1TkStub.getClusterPtr(1)->findAverageLocalCoordinates();
    GlobalPoint pos = HitMatchingAlgorithm< T >::theStackedTracker->findAverageGlobalPosition( aL1TkStub.getClusterPtr(1).get() ); 

    unsigned int layer = stDetId.layer();
    
    //std::vector<edm::ParameterSet>::const_iterator ipset;
    //for (ipset = vpset_.begin(); ipset!=vpset_.end(); ipset++)
    for ( unsigned int j=0; j<layers_.size(); j++)  
    {  
      if (layers_[j]!=layer) continue;

      unsigned int i = 0;
      for (i=0; i<rowcuts_[j].size(); i++)
      {
        if (outer.y()<rowcuts_[j][i]) break;
      }

      unsigned int rowoffset = rowoffsets_[j][i]; 
      unsigned int rowwindow = rowwindows_[j][i];
      
      unsigned int columncut = (pos.eta()>0)?outer.x()-inner.x():inner.x()-outer.x();

      bool row = ((int)inner.y()-(int)outer.y()-(int)rowoffset>=0)&&(inner.y()-outer.y()-rowoffset<rowwindow);
      bool col = (columncut>=columnmin_[j])&&(columncut<=columnmax_[j]);

      if ( row && col )
      {
        aConfirmation = true;

        MeasurementPoint mp0 = aL1TkStub.getClusterPtr(0)->findAverageLocalCoordinates();
        MeasurementPoint mp1 = aL1TkStub.getClusterPtr(1)->findAverageLocalCoordinates();
        aDisplacement = 2*(mp1.x() - mp0.x()); 

        anOffset = 0;

      }
    }
  }

Member Data Documentation

template<class T >
std::vector<unsigned int> HitMatchingAlgorithm_thresholds< T >::columnmax_ [private]
template<class T >
std::vector<unsigned int> HitMatchingAlgorithm_thresholds< T >::columnmin_ [private]
template<class T >
std::vector<unsigned int> HitMatchingAlgorithm_thresholds< T >::layers_ [private]
template<class T >
std::vector< std::vector< unsigned int > > HitMatchingAlgorithm_thresholds< T >::rowcuts_ [private]
template<class T >
std::vector< std::vector< unsigned int > > HitMatchingAlgorithm_thresholds< T >::rowoffsets_ [private]
template<class T >
std::vector< std::vector< unsigned int > > HitMatchingAlgorithm_thresholds< T >::rowwindows_ [private]