Main Page
Namespaces
Classes
Package Documentation
L1Trigger
TrackTrigger
src
TTStubAlgorithm_cbc3.cc
Go to the documentation of this file.
1
10
#include "
L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h
"
11
13
template
< >
14
void
TTStubAlgorithm_cbc3< Ref_Phase2TrackerDigi_ >::PatternHitCorrelation
(
bool
&aConfirmation,
15
int
&aDisplacement,
16
int
&anOffset,
17
const
TTStub< Ref_Phase2TrackerDigi_ >
&aTTStub )
const
18
{
19
/*
22
MeasurementPoint mp0 = aTTStub.getClusterRef(0)->findAverageLocalCoordinates();
23
MeasurementPoint mp1 = aTTStub.getClusterRef(1)->findAverageLocalCoordinates();
24
26
StackedTrackerDetId stDetId( aTTStub.getDetId() );
27
28
//bool isPS = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->isPSModule( stDetId );
29
31
const GeomDetUnit* det0 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 0 );
32
34
const PixelGeomDetUnit* pix0 = dynamic_cast< const PixelGeomDetUnit* >( det0 );
35
const PixelTopology* top0 = dynamic_cast< const PixelTopology* >( &(pix0->specificTopology()) );
36
38
int myPosition = mp0.x();
39
41
int chipSize = top0->rowsperroc();
42
int asicNumber = myPosition / chipSize; /// ASIC in module
43
int partitionSize = ceil( float(chipSize) / float( TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getPartitionsPerRoc() ) );
44
int partitionNumber = (myPosition % chipSize) / partitionSize; /// Partition in ASIC
45
47
anOffset = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getASICOffset( stDetId, asicNumber, partitionNumber );
48
50
int aPosition = 2 * mp0.x();
51
int aBend = (2 * mp1.x()) - aPosition - anOffset;
52
54
aDisplacement = (2 * mp1.x()) - aPosition;
55
57
aConfirmation = ( (abs(4 * aBend - 1)) <= (2 * TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getDetUnitWindow(stDetId) ) );
58
60
if ( !mPerformZMatching2S ) // && !isPS
61
return;
62
63
//if ( !mPerformZMatchingPS && isPS )
64
// return;
65
67
const GeomDetUnit* det1 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 1 );
68
const PixelGeomDetUnit* pix1 = dynamic_cast< const PixelGeomDetUnit* >( det1 );
69
const PixelTopology* top1 = dynamic_cast< const PixelTopology* >( &(pix1->specificTopology()) );
70
int cols0 = top0->ncolumns();
71
int cols1 = top1->ncolumns();
72
int ratio = cols0/cols1; /// This assumes the ratio is integer!
73
int segment0 = floor( mp0.y() / ratio );
74
if ( segment0 != floor( mp1.y() ) )
75
aConfirmation = false;
76
*/
77
}
78
TTStubAlgorithm_cbc3.h
TTStubAlgorithm_cbc3::PatternHitCorrelation
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, const TTStub< T > &aTTStub) const
Matching operations.
TTStub
Class to store the L1 Track Trigger stubs.
Definition:
TTStub.h:22
Generated for CMSSW Reference Manual by
1.8.11