CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TTStubAlgorithm_cbc3< T > Class Template Reference

Class for "cbc3" algorithm to be used in TTStubBuilder. More...

#include <TTStubAlgorithm_cbc3.h>

Inheritance diagram for TTStubAlgorithm_cbc3< T >:
TTStubAlgorithm< T >

Public Member Functions

template<>
void PatternHitCorrelation (bool &aConfirmation, int &aDisplacement, int &anOffset, float &anHardBend, const TTStub< Ref_Phase2TrackerDigi_ > &aTTStub) const
 Implementation of methods of TTStubAlgorithm_cbc3. More...
 
template<>
void PatternHitCorrelation (bool &aConfirmation, int &aDisplacement, int &anOffset, float &anHardBend, const TTStub< Ref_Phase2TrackerDigi_ > &aTTStub) const
 Close class. More...
 
void PatternHitCorrelation (bool &aConfirmation, int &aDisplacement, int &anOffset, float &anHardBend, const TTStub< T > &aTTStub) const override
 Matching operations. More...
 
 TTStubAlgorithm_cbc3 (const TrackerGeometry *const theTrackerGeom, const TrackerTopology *const theTrackerTopo, bool aPerformZMatching2S)
 Constructor. More...
 
 ~TTStubAlgorithm_cbc3 () override
 Destructor. More...
 
- Public Member Functions inherited from TTStubAlgorithm< T >
virtual std::string AlgorithmName () const
 Algorithm name. More...
 
 TTStubAlgorithm (const TrackerGeometry *const theTrackerGeom, const TrackerTopology *const theTrackerTopo, std::string fName)
 Constructors. More...
 
virtual ~TTStubAlgorithm ()
 Destructor. More...
 

Private Attributes

std::string className_
 
bool mPerformZMatching2S
 Data members. More...
 

Additional Inherited Members

- Protected Attributes inherited from TTStubAlgorithm< T >
std::string className_
 
const TrackerGeometry *const theTrackerGeom_
 Data members. More...
 
const TrackerTopology *const theTrackerTopo_
 

Detailed Description

template<typename T>
class TTStubAlgorithm_cbc3< T >

Class for "cbc3" algorithm to be used in TTStubBuilder.

HW emulation.

Author
Ivan Reid
Date
2013, Oct 16

Definition at line 30 of file TTStubAlgorithm_cbc3.h.

Constructor & Destructor Documentation

◆ TTStubAlgorithm_cbc3()

template<typename T >
TTStubAlgorithm_cbc3< T >::TTStubAlgorithm_cbc3 ( const TrackerGeometry *const  theTrackerGeom,
const TrackerTopology *const  theTrackerTopo,
bool  aPerformZMatching2S 
)
inline

Constructor.

Definition at line 38 of file TTStubAlgorithm_cbc3.h.

41  : TTStubAlgorithm<T>(theTrackerGeom, theTrackerTopo, __func__) {
42  mPerformZMatching2S = aPerformZMatching2S;
43  }

References TTStubAlgorithm_cbc3< T >::mPerformZMatching2S.

◆ ~TTStubAlgorithm_cbc3()

template<typename T >
TTStubAlgorithm_cbc3< T >::~TTStubAlgorithm_cbc3 ( )
inlineoverride

Destructor.

Definition at line 46 of file TTStubAlgorithm_cbc3.h.

46 {}

Member Function Documentation

◆ PatternHitCorrelation() [1/3]

template<>
void TTStubAlgorithm_cbc3< Ref_Phase2TrackerDigi_ >::PatternHitCorrelation ( bool &  aConfirmation,
int &  aDisplacement,
int &  anOffset,
float &  anHardBend,
const TTStub< Ref_Phase2TrackerDigi_ > &  aTTStub 
) const

Implementation of methods of TTStubAlgorithm_cbc3.

Here, in the source file, the methods which do depend on the specific type <T> that can fit the template.

Author
Ivan Reid
Date
2013, Oct 16 Matching operations

Definition at line 14 of file TTStubAlgorithm_cbc3.cc.

21 {
22  /*
25  MeasurementPoint mp0 = aTTStub.getClusterRef(0)->findAverageLocalCoordinates();
26  MeasurementPoint mp1 = aTTStub.getClusterRef(1)->findAverageLocalCoordinates();
27 
29  StackedTrackerDetId stDetId( aTTStub.getDetId() );
30 
31  //bool isPS = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->isPSModule( stDetId );
32 
34  const GeomDetUnit* det0 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 0 );
35 
37  const PixelGeomDetUnit* pix0 = dynamic_cast< const PixelGeomDetUnit* >( det0 );
38  const PixelTopology* top0 = dynamic_cast< const PixelTopology* >( &(pix0->specificTopology()) );
39 
41  int myPosition = mp0.x();
42 
44  int chipSize = top0->rowsperroc();
45  int asicNumber = myPosition / chipSize; /// ASIC in module
46  int partitionSize = ceil( float(chipSize) / float( TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getPartitionsPerRoc() ) );
47  int partitionNumber = (myPosition % chipSize) / partitionSize; /// Partition in ASIC
48 
50  anOffset = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getASICOffset( stDetId, asicNumber, partitionNumber );
51 
53  int aPosition = 2 * mp0.x();
54  int aBend = (2 * mp1.x()) - aPosition - anOffset;
55 
57  aDisplacement = (2 * mp1.x()) - aPosition;
58 
60  aConfirmation = ( (abs(4 * aBend - 1)) <= (2 * TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getDetUnitWindow(stDetId) ) );
61 
63  if ( !mPerformZMatching2S ) // && !isPS
64  return;
65 
66  //if ( !mPerformZMatchingPS && isPS )
67  // return;
68 
70  const GeomDetUnit* det1 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 1 );
71  const PixelGeomDetUnit* pix1 = dynamic_cast< const PixelGeomDetUnit* >( det1 );
72  const PixelTopology* top1 = dynamic_cast< const PixelTopology* >( &(pix1->specificTopology()) );
73  int cols0 = top0->ncolumns();
74  int cols1 = top1->ncolumns();
75  int ratio = cols0/cols1; /// This assumes the ratio is integer!
76  int segment0 = floor( mp0.y() / ratio );
77  if ( segment0 != floor( mp1.y() ) )
78  aConfirmation = false;
79  */
80 }

◆ PatternHitCorrelation() [2/3]

template<>
void TTStubAlgorithm_cbc3< Ref_Phase2TrackerDigi_ >::PatternHitCorrelation ( bool &  aConfirmation,
int &  aDisplacement,
int &  anOffset,
float &  anHardBend,
const TTStub< Ref_Phase2TrackerDigi_ > &  aTTStub 
) const

Close class.

Implementation of methods

Here, in the header file, the methods which do not depend on the specific type <T> that can fit the template. Other methods, with type-specific features, are implemented in the source file. Matching operations

◆ PatternHitCorrelation() [3/3]

template<typename T >
void TTStubAlgorithm_cbc3< T >::PatternHitCorrelation ( bool &  aConfirmation,
int &  aDisplacement,
int &  anOffset,
float &  anHardBend,
const TTStub< T > &  aTTStub 
) const
overridevirtual

Matching operations.

Reimplemented from TTStubAlgorithm< T >.

Member Data Documentation

◆ className_

template<typename T >
std::string TTStubAlgorithm_cbc3< T >::className_
private

Definition at line 34 of file TTStubAlgorithm_cbc3.h.

◆ mPerformZMatching2S

template<typename T >
bool TTStubAlgorithm_cbc3< T >::mPerformZMatching2S
private

Data members.

Definition at line 33 of file TTStubAlgorithm_cbc3.h.

Referenced by TTStubAlgorithm_cbc3< T >::TTStubAlgorithm_cbc3().

TTStubAlgorithm
Base class for any algorithm to be used in TTStubBuilder.
Definition: TTStubAlgorithm.h:29
TTStubAlgorithm_cbc3::mPerformZMatching2S
bool mPerformZMatching2S
Data members.
Definition: TTStubAlgorithm_cbc3.h:33