-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTStub and TTCluster class porting to CMSSW 10 #21765
Conversation
Dumb fix...
@sviret, CMSSW_10_0_X branch is closed for direct updates. cms-bot is going to move this PR to master branch. |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-21765/2729 |
A new Pull Request was created by @sviret (Seb Viret) for master. It involves the following packages: DataFormats/L1TrackTrigger @cmsbuild, @civanch, @mdhildreth, @nsmith-, @rekovic, @kpedro88, @thomreis can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
@@ -80,6 +88,8 @@ TTStub< T >::TTStub() | |||
theDetId = 0; | |||
theDisplacement = 999999; | |||
theOffset = 0; | |||
theRealOffset = 0; | |||
theHardwareBend = 999999; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the "999999" value is used in multiple places, it should be a const member of the class (e.g. defaultHardwareBend
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
// Loop over all the tracker elements | ||
|
||
for (auto gd=theTrackerGeom->dets().begin(); gd != theTrackerGeom->dets().end(); gd++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
range-based loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
else if (detid.subdetId()==StripSubdetector::TID) | ||
{ | ||
if (tTopo->tidWheel(detid)<=2 && tTopo->tidRing(detid)<=4) is10G_PS = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these magic numbers be obtained from some geometry/topology class? Otherwise, should be made into descriptive constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, numbers have been passed as joboptions
const PixelGeomDetUnit* pix0 = dynamic_cast< const PixelGeomDetUnit* >( det0 ); | ||
const PixelTopology* top0 = dynamic_cast< const PixelTopology* >( &(pix0->specificTopology()) ); | ||
const int chipSize = 2 * top0->rowsperroc(); /// Need to find ASIC size in half-strip units | ||
//const GeomDetUnit* det0 = theTrackerGeom->idToDetUnit( lowerDetid ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented-out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if ( moduleStubs.find( chip ) == moduleStubs.end() ) /// Already a stub for this ASIC? | ||
MeasurementPoint mp0 = tempTTStub.getClusterRef(0)->findAverageLocalCoordinates(); | ||
int seg = static_cast<int>(mp0.y()); | ||
if (isPS) seg = seg/16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use consistent indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps done...
throw cms::Exception("DegradeBend: logic error with odd numbers"); | ||
} | ||
|
||
for (unsigned int i = 0; i < numSmallGroups/2; i++) groups.push_back(inSmallGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reserve()
again
@@ -146,6 +163,12 @@ bool TTClusterAssociationMap< T >::isGenuine( edm::Ref< edmNew::DetSetVector< TT | |||
unsigned int goodDifferentTPs = 0; | |||
std::vector< const TrackingParticle* > tpAddressVector; | |||
|
|||
std::vector<float> tp_mom; | |||
|
|||
tp_mom.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to clear vector right after creating it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
if (tp_tot==0) return false; | ||
|
||
for ( unsigned int itp = 0; itp < theseTrackingParticles.size(); itp++ ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
range-based loop w/ const auto&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
/// Count how many different TrackingParticle there are | ||
std::sort( tpAddressVector.begin(), tpAddressVector.end() ); | ||
tpAddressVector.erase( std::unique( tpAddressVector.begin(), tpAddressVector.end() ), tpAddressVector.end() ); | ||
goodDifferentTPs = tpAddressVector.size(); | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented-out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/// GENUINE means no NULLs and only one good TP | ||
return ( nullTPs == 0 && goodDifferentTPs == 1 ); | ||
//return ( nullTPs == 0 && goodDifferentTPs == 1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented-out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
-1 Tested at: 4d1c103 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: RelVals
When I ran the RelVals I found an error in the following worklfows: runTheMatrix-results/1325.7_TTbar_13_94XNanoAODINPUT+TTbar_13_94XNanoAODINPUT+NANOEDMMC2017/step2_TTbar_13_94XNanoAODINPUT+TTbar_13_94XNanoAODINPUT+NANOEDMMC2017.log |
Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped) |
Not sure that this error is related to the PR itself. |
There are not, if you look at the log, this is an error when trying to open a file ... Seems other PR are affected too |
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
+1 |
@rekovic since this PR only affects trigger, it should be acceptable to backport it to 9_3_X and make a 9_3_6 release for trigger study production. |
@kpedro88 Thx. |
@rekovic is this backport going to happen? |
@kpedro88 |
This branch contains significant updates of the TTStub building algorithm, and a TTCluster association update:
FE inefficiencies: if this option is turned on (default is off), the MPA/CBC and CIC inefficiencies are accounted for based on the event sequence over which stubs are reconstructed. CIC inefficiency is only partially accounted, MPA and CBC are exact.
Hardware bend degradation: bend is encoded on a limited number of bits. Therefore for given stub window tuning all the values cannot be encoded independently and they must be grouped. This process is now done during the Stub building, and the degraded bend can be obtained using the getHardwareBend() method, which is added to the TTStub class. Of course nominal bend is still accessible.
Full parallax correction: within the FE asics, parallax is corrected in half-strips units. However, the exact parallax value can always be retrieved at the backend using the stub position and module radius, and can subsequently be used to improve the bend resolution. This parameter is therefore computed during stub building, and can be retrieved via the method getRealTriggerOffset()
New stub window tuning: stub are built using the new tuning optimized for PU200 events. The default tuning is PU200 TIGHT. For stub tuning documentation, information is available here: https://www.dropbox.com/s/sc1ifhfbcv5pts3/Stub%20windows%20tuning-%20a%20tutorial.pdf?dl=0
Updated TTCluster association scheme:
is replaced by his
With this new association scheme, a cluster made from more than 1 digis, with one digi associated to a low-pt secondary and the other one associated to the primary will be flagged as genuine and associated to the primary TP. Was flagged as combinatoric with the previous association.
IMPORTANT NOTE: This PR does not include any modification of the TTTrack class, as Track Trigger algorithm using it are still in development phase within CMSSW