CMS 3D CMS Logo

Public Member Functions | Private Attributes

HitMatchingAlgorithm_window2012< T > Class Template Reference

#include <HitMatchingAlgorithm_window2012.h>

Inheritance diagram for HitMatchingAlgorithm_window2012< 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_window2012 (const StackedTrackerGeometry *aStackedTracker, double aPtScalingFactor)
 Constructor.
 ~HitMatchingAlgorithm_window2012 ()
 Destructor.

Private Attributes

std::string className_
double mPtScalingFactor
 Data members.

Detailed Description

template<typename T>
class HitMatchingAlgorithm_window2012< T >

//////////////////////////////////////// Stacked Tracker Simulations /// / Nicola Pozzobon, UNIPD /// / 2012, August, October /// ////////////////////////////////////// ************************ DECLARATION OF CLASS ************************

Definition at line 39 of file HitMatchingAlgorithm_window2012.h.


Constructor & Destructor Documentation

template<typename T>
HitMatchingAlgorithm_window2012< T >::HitMatchingAlgorithm_window2012 ( const StackedTrackerGeometry aStackedTracker,
double  aPtScalingFactor 
) [inline]

Constructor.

Definition at line 48 of file HitMatchingAlgorithm_window2012.h.

References HitMatchingAlgorithm_window2012< T >::mPtScalingFactor.

        : HitMatchingAlgorithm< T >( aStackedTracker,__func__ )
      {
        mPtScalingFactor = aPtScalingFactor;
      }
template<typename T>
HitMatchingAlgorithm_window2012< T >::~HitMatchingAlgorithm_window2012 ( ) [inline]

Destructor.

Definition at line 56 of file HitMatchingAlgorithm_window2012.h.

{}

Member Function Documentation

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

Matching operations.

Close class.

***************************** IMPLEMENTATION OF METHODS ***************************** Matching operations Default is for PixelDigis

Calculate average coordinates col/row for inner/outer Cluster These are already corrected for being at the center of each pixel

Get the module position in global coordinates

Find pixel pitch and topology related information

Get the Stack radius and z and displacements

Scale factor is already present in double mPtScalingFactor = (floor(mMagneticFieldStrength*10.0 + 0.5))/10.0*0.0015/mPtThreshold; hence the formula iis something like displacement < Delta * 1 / sqrt( ( 1/(mPtScalingFactor*R) )** 2 - 1 )

All of these are calculated in terms of pixels in outer sensor 0) Calculate window in terms of multiples of outer sensor pitch

POSITION IN TERMS OF PITCH MULTIPLES: 0 1 2 3 4 5 5 6 8 9 ... COORD: 0 1 2 3 4 5 6 7 8 9 ... OUT | | | | | |x| | | | | | | | | |

IN | | | |x|x| | | | | | | | | | | THIS is 3.5 (COORD) and 4.0 (POS) 1) disp is the difference between average row coordinates in inner and outer stack member, in terms of outer member pitch (in case they are the same, this is just a plain coordinate difference)

2) offset is the projection with a straight line of the innermost hit towards the ourermost stack member, still in terms of outer member pitch NOTE: in terms of coordinates, the center of the module is at NROWS/2-0.5 to be consistent with the definition given above

Accept the stub if the post-offset correction displacement is smaller than the half-window

Accept the stub if the rough backprojection is fine

In HALF-STRIP units!

In HALF-STRIP units!

End of stub is accepted

All of these are calculated in terms of pixels in outer sensor 0) Calculate window in terms of multiples of outer sensor pitch

1) disp is the difference between average row coordinates in inner and outer stack member, in terms of outer member pitch (in case they are the same, this is just a plain coordinate difference)

2) offset is the projection with a straight line of the innermost hit towards the ourermost stack member, still in terms of outer member pitch NOTE: in terms of coordinates, the center of the module is at NROWS/2-0.5 to be consistent with the definition given above

Accept the stub if the post-offset correction displacement is smaller than the half-window

In HALF-STRIP units!

In HALF-STRIP units!

End of stub is accepted

Reimplemented from HitMatchingAlgorithm< T >.

Definition at line 75 of file HitMatchingAlgorithm_window2012.h.

References abs, RecoTauValidation_cfi::denominator, L1TkStub< T >::getClusterPtr(), L1TkStub< T >::getDetId(), PixelTopology::nrows(), PV3DBase< T, PVType, FrameType >::perp(), PixelTopology::pitch(), GeomDet::position(), PixelGeomDetUnit::specificTopology(), mathSSE::sqrt(), svgfig::window(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::z(), and Z0.

{
  MeasurementPoint mp0 = aL1TkStub.getClusterPtr(0)->findAverageLocalCoordinates();
  MeasurementPoint mp1 = aL1TkStub.getClusterPtr(1)->findAverageLocalCoordinates();

  StackedTrackerDetId stDetId( aL1TkStub.getDetId() );
  const GeomDetUnit* det0 = HitMatchingAlgorithm< T >::theStackedTracker->idToDetUnit( stDetId, 0 );
  const GeomDetUnit* det1 = HitMatchingAlgorithm< T >::theStackedTracker->idToDetUnit( stDetId, 1 );

  const PixelGeomDetUnit* pix0 = dynamic_cast< const PixelGeomDetUnit* >( det0 );
  const PixelGeomDetUnit* pix1 = dynamic_cast< const PixelGeomDetUnit* >( det1 );
  const PixelTopology* top0 = dynamic_cast< const PixelTopology* >( &(pix0->specificTopology()) );
  const PixelTopology* top1 = dynamic_cast< const PixelTopology* >( &(pix1->specificTopology()) );
  std::pair< float, float > pitch0 = top0->pitch();
  std::pair< float, float > pitch1 = top1->pitch();
  
  double R0 = det0->position().perp();
  double R1 = det1->position().perp();
  double Z0 = det0->position().z();
  double Z1 = det1->position().z();

  double DR = R1-R0;
  double DZ = Z1-Z0;

  double denominator = sqrt( 1/( mPtScalingFactor*mPtScalingFactor*R0*R0 ) - 1 );

  if (stDetId.isBarrel())
  {
    int window = floor( (DR/denominator) / pitch1.first ) + 1;
    double dispD = mp1.x() - mp0.x() * (pitch0.first / pitch1.first);
    int dispI = ((dispD>0)-(dispD<0))*floor(fabs(dispD));
    double offsetD = DR/R0 * ( mp0.x() - (top0->nrows()/2 - 0.5) ) * (pitch0.first / pitch1.first);
    int offsetI = ((offsetD>0)-(offsetD<0))*floor(fabs(offsetD));

    if ( abs(dispI - offsetI) < window )
    {
/*
      double DP = fabs((dispI-offsetI) * pitch1.first / R0) + 0.00000000001;
      double roughPt = DR * mPtFactor / DP;
      a.first = true;
      a.second = roughPt;
*/

//      if (fabs(Z0 - R0*DZ/DR)<200) {
// NON SI PUO` perche' Z0, R0 ecc sono le coordinate dei MODULI

        aConfirmation = true;
        aDisplacement = 2*dispI; 
        anOffset = 2*offsetI; 

//      }

    } 
  }
  else if (stDetId.isEndcap())
  {
    int window = floor( R0/Z0 * (DZ/denominator) / pitch1.first ) + 1;
    double dispD = mp1.x() - mp0.x() * (pitch0.first / pitch1.first);
    int dispI = ((dispD>0)-(dispD<0))*floor(fabs(dispD));
    double offsetD = DZ/Z0 * ( mp0.x() - (top0->nrows()/2 - 0.5) ) * (pitch0.first / pitch1.first);
    int offsetI = ((offsetD>0)-(offsetD<0))*floor(fabs(offsetD));

    if ( abs(dispI - offsetI) < window )
    {
/*
      double DP = fabs((dispI-offsetI) * pitch1.first / R0) + 0.00000000001;
      double roughPt = DZ * R0 / Z0 * mPtFactor / DP;
      a.first = true;
      a.second = roughPt;
*/

        aConfirmation = true;
        aDisplacement = 2*dispI; 
        anOffset = 2*offsetI; 

    } 
  }
}

Member Data Documentation

template<typename T>
std::string HitMatchingAlgorithm_window2012< T >::className_ [private]

Reimplemented from HitMatchingAlgorithm< T >.

Definition at line 44 of file HitMatchingAlgorithm_window2012.h.

template<typename T>
double HitMatchingAlgorithm_window2012< T >::mPtScalingFactor [private]