CMS 3D CMS Logo

TTStubAlgorithm_cbc3.cc
Go to the documentation of this file.
1 
11 
13 template< >
15  int &aDisplacement,
16  int &anOffset,
17  float &anROffset,
18  float &anHardBend,
19  const TTStub< Ref_Phase2TrackerDigi_ > &aTTStub ) const
20 {
21  /*
24  MeasurementPoint mp0 = aTTStub.getClusterRef(0)->findAverageLocalCoordinates();
25  MeasurementPoint mp1 = aTTStub.getClusterRef(1)->findAverageLocalCoordinates();
26 
28  StackedTrackerDetId stDetId( aTTStub.getDetId() );
29 
30  //bool isPS = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->isPSModule( stDetId );
31 
33  const GeomDetUnit* det0 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 0 );
34 
36  const PixelGeomDetUnit* pix0 = dynamic_cast< const PixelGeomDetUnit* >( det0 );
37  const PixelTopology* top0 = dynamic_cast< const PixelTopology* >( &(pix0->specificTopology()) );
38 
40  int myPosition = mp0.x();
41 
43  int chipSize = top0->rowsperroc();
44  int asicNumber = myPosition / chipSize; /// ASIC in module
45  int partitionSize = ceil( float(chipSize) / float( TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getPartitionsPerRoc() ) );
46  int partitionNumber = (myPosition % chipSize) / partitionSize; /// Partition in ASIC
47 
49  anOffset = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getASICOffset( stDetId, asicNumber, partitionNumber );
50 
52  int aPosition = 2 * mp0.x();
53  int aBend = (2 * mp1.x()) - aPosition - anOffset;
54 
56  aDisplacement = (2 * mp1.x()) - aPosition;
57 
59  aConfirmation = ( (abs(4 * aBend - 1)) <= (2 * TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->getDetUnitWindow(stDetId) ) );
60 
62  if ( !mPerformZMatching2S ) // && !isPS
63  return;
64 
65  //if ( !mPerformZMatchingPS && isPS )
66  // return;
67 
69  const GeomDetUnit* det1 = TTStubAlgorithm< Ref_Phase2TrackerDigi_ >::theStackedTracker->idToDetUnit( stDetId, 1 );
70  const PixelGeomDetUnit* pix1 = dynamic_cast< const PixelGeomDetUnit* >( det1 );
71  const PixelTopology* top1 = dynamic_cast< const PixelTopology* >( &(pix1->specificTopology()) );
72  int cols0 = top0->ncolumns();
73  int cols1 = top1->ncolumns();
74  int ratio = cols0/cols1; /// This assumes the ratio is integer!
75  int segment0 = floor( mp0.y() / ratio );
76  if ( segment0 != floor( mp1.y() ) )
77  aConfirmation = false;
78  */
79 }
80 
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, float &anROffset, float &anHardBend, const TTStub< T > &aTTStub) const override
Matching operations.
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22