Skip to content
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

Stub builder fix and new SW #20492

Merged
merged 2 commits into from Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions L1Trigger/TrackTrigger/interface/classNameFinder.h
Expand Up @@ -9,7 +9,7 @@ template< class T >
std::string classNameFinder( std::string fName )
{
int status2 = 0;
char *dm2 = abi::__cxa_demangle( typeid(T).name(), 0, 0, &status2 );
char *dm2 = abi::__cxa_demangle( typeid(T).name(), nullptr, nullptr, &status2 );
std::string s2 = "failed demangle";
if ( status2 == 0 )
{
Expand All @@ -22,7 +22,7 @@ template< class T >
std::string templateNameFinder()
{
int status2 = 0;
char *dm2 = abi::__cxa_demangle( typeid(T).name(), 0, 0, &status2 );
char *dm2 = abi::__cxa_demangle( typeid(T).name(), nullptr, nullptr, &status2 );
std::string s2 = "failed demangle";
if ( status2 == 0 )
{
Expand Down
16 changes: 8 additions & 8 deletions L1Trigger/TrackTrigger/plugins/TTStubBuilder.cc
Expand Up @@ -35,8 +35,8 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const

/// Get the maximum number of stubs per ROC
/// (CBC3-style)
// unsigned maxStubs = theStackedTracker->getCBC3MaxStubs();
unsigned maxStubs = 3;
// unsigned maxStubs = theStackedTracker->getCBC3MaxStubs();
unsigned maxStubs = 0; // 0 is default, cut is disabled

for (auto gd=theTrackerGeom->dets().begin(); gd != theTrackerGeom->dets().end(); gd++) {
DetId detid = (*gd)->geographicalId();
Expand All @@ -58,7 +58,7 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const
/// If there are Clusters in both sensors
/// you can try and make a Stub
/// This is ~redundant
if ( lowerClusters.size() == 0 || upperClusters.size() == 0 )
if ( lowerClusters.empty() || upperClusters.empty() )
continue;

/// Create the vectors of objects to be passed to the FastFillers
Expand Down Expand Up @@ -208,7 +208,7 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const
} /// End of loop over temp output
} /// End store only the selected stubs if max no. stub/ROC is set
/// Create the FastFillers
if ( tempInner.size() > 0 )
if ( !tempInner.empty() )
{
typename edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller lowerOutputFiller( *ttClusterDSVForOutput, lowerDetid );
for ( unsigned int m = 0; m < tempInner.size(); m++ )
Expand All @@ -219,7 +219,7 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const
lowerOutputFiller.abort();
}

if ( tempOuter.size() > 0 )
if ( !tempOuter.empty() )
{
typename edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller upperOutputFiller( *ttClusterDSVForOutput, upperDetid );
for ( unsigned int m = 0; m < tempOuter.size(); m++ )
Expand All @@ -230,7 +230,7 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const
upperOutputFiller.abort();
}

if ( tempAccepted.size() > 0 )
if ( !tempAccepted.empty() )
{
typename edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >::FastFiller tempAcceptedFiller( *ttStubDSVForOutputTemp, stackDetid);
for ( unsigned int m = 0; m < tempAccepted.size(); m++ )
Expand Down Expand Up @@ -280,8 +280,8 @@ void TTStubBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const
TTStub< Ref_Phase2TrackerDigi_ > tempTTStub( stubIter->getDetId() );

/// Compare the clusters stored in the stub with the ones of this module
edm::Ref< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >, TTCluster< Ref_Phase2TrackerDigi_ > > lowerClusterToBeReplaced = stubIter->getClusterRef(0);
edm::Ref< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >, TTCluster< Ref_Phase2TrackerDigi_ > > upperClusterToBeReplaced = stubIter->getClusterRef(1);
const edm::Ref< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >, TTCluster< Ref_Phase2TrackerDigi_ > >& lowerClusterToBeReplaced = stubIter->getClusterRef(0);
const edm::Ref< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >, TTCluster< Ref_Phase2TrackerDigi_ > >& upperClusterToBeReplaced = stubIter->getClusterRef(1);

bool lowerOK = false;
bool upperOK = false;
Expand Down
8 changes: 4 additions & 4 deletions L1Trigger/TrackTrigger/plugins/TTStubBuilder.h
Expand Up @@ -47,7 +47,7 @@ class TTStubBuilder : public edm::EDProducer
explicit TTStubBuilder( const edm::ParameterSet& iConfig );

/// Destructor;
~TTStubBuilder();
~TTStubBuilder() override;

private:
/// Data members
Expand All @@ -56,9 +56,9 @@ class TTStubBuilder : public edm::EDProducer
bool ForbidMultipleStubs;

/// Mandatory methods
virtual void beginRun( const edm::Run& run, const edm::EventSetup& iSetup );
virtual void endRun( const edm::Run& run, const edm::EventSetup& iSetup );
virtual void produce( edm::Event& iEvent, const edm::EventSetup& iSetup );
void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
void endRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ) override;

/// Sorting method for stubs
/// NOTE: this must be static!
Expand Down
23 changes: 13 additions & 10 deletions L1Trigger/TrackTrigger/python/TTStubAlgorithmRegister_cfi.py
Expand Up @@ -14,25 +14,28 @@
#
#

# The tuning is not yet fully validated
# But should enable a good turn-on at 2GeV with reasonable rates at PU200

# Tab2013 hit matching algorithm
TTStubAlgorithm_official_Phase2TrackerDigi_ = cms.ESProducer("TTStubAlgorithm_official_Phase2TrackerDigi_",
zMatchingPS = cms.bool(True),
zMatching2S = cms.bool(True),
BarrelCut = cms.vdouble( 0, 1.5, 1.5, 2.5, 4.0, 5.0, 6.5), #Use 0 as dummy to have direct access using DetId to the correct element
BarrelCut = cms.vdouble( 0, 2.0, 2.0, 3.5, 4.5, 5.5, 6.5), #Use 0 as dummy to have direct access using DetId to the correct element
NTiltedRings = cms.vdouble( 0., 12., 12., 12., 0., 0., 0.), #Number of tilted rings per side in barrel layers (for tilted geom only)
TiltedBarrelCutSet = cms.VPSet(
cms.PSet( TiltedCut = cms.vdouble( 0 ) ),
cms.PSet( TiltedCut = cms.vdouble( 0, 1.5,1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1, 1, 1, 1, 1) ), #TBPS L1 rings
cms.PSet( TiltedCut = cms.vdouble( 0, 2, 2, 2, 2, 2, 1.5, 1.5, 2, 2, 1.5, 1.5, 1.5) ), #TBPS L2 rings
cms.PSet( TiltedCut = cms.vdouble( 0, 2.5, 2.5, 2.5, 2.5, 2, 2, 2, 2, 2, 2, 2, 2, 1.5) ), #TBPS L3 rings
cms.PSet( TiltedCut = cms.vdouble( 0 ) ),
cms.PSet( TiltedCut = cms.vdouble( 0, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2., 2., 1.5, 1.5, 1., 1.) ),
cms.PSet( TiltedCut = cms.vdouble( 0, 3., 3., 3., 3., 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2, 2) ),
cms.PSet( TiltedCut = cms.vdouble( 0, 4.5, 4.5, 4, 4, 4, 4, 3.5, 3.5, 3.5, 3, 3, 3) ),
),
EndcapCutSet = cms.VPSet(
cms.PSet( EndcapCut = cms.vdouble( 0 ) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1, 1.5, 1.5, 2, 2, 2.5, 2.5, 3, 4, 2.5, 3, 3.5, 4, 5) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1, 1, 1.5, 1.5, 2, 2, 2.5, 2.5, 3.5, 2, 2.5, 3, 3.5, 4) ), #D1
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1, 1, 1.5, 1.5, 1.5, 2, 2, 2, 3, 3.5, 2, 2.5, 3, 3.5) ), #D2 ...
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1, 1, 1, 1, 1.5, 2, 2, 2, 2.5, 3, 2, 2, 2.5, 3) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1, 1, 1, 1, 1.5, 1.5, 2, 2, 2, 3, 3, 2, 2, 2.5) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1.5, 1.5, 2, 2, 2.5, 3, 3, 3.5, 4, 2.5, 3, 3.5, 4.5, 5.5) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1, 1.5, 1.5, 2, 2, 2, 2.5, 3, 3, 3, 2, 3, 4, 5, 5.5) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1.5, 1.5, 2, 2, 2.5, 2.5, 2.5, 3.5, 2.5, 5, 5.5, 6) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1.0, 1.5, 1.5, 2, 2, 2, 2, 3, 3, 6, 6, 6.5) ),
cms.PSet( EndcapCut = cms.vdouble( 0, 1.0, 1.5, 1.5, 1.5, 2, 2, 2, 3, 3, 6, 6, 6.5) ),
)
)

Expand Down