Skip to content

Commit

Permalink
Merge pull request #15949 from davidlange6/rb15691
Browse files Browse the repository at this point in the history
l1 track trigger rebased
  • Loading branch information
davidlange6 committed Sep 23, 2016
2 parents 2509600 + 16c2e88 commit 5f26427
Show file tree
Hide file tree
Showing 35 changed files with 2,909 additions and 357 deletions.
3 changes: 2 additions & 1 deletion L1Trigger/TrackTrigger/interface/TTStubAlgorithmRecord.h
Expand Up @@ -16,11 +16,12 @@
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"

#include "boost/mpl/vector.hpp"

class TTStubAlgorithmRecord
: public edm::eventsetup::DependentRecordImplementation< TTStubAlgorithmRecord, boost::mpl::vector< TrackerDigiGeometryRecord, IdealGeometryRecord, IdealMagneticFieldRecord > >{};
: public edm::eventsetup::DependentRecordImplementation< TTStubAlgorithmRecord, boost::mpl::vector< TrackerDigiGeometryRecord, TrackerTopologyRcd, IdealMagneticFieldRecord > >{};

#endif

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h
Expand Up @@ -104,7 +104,7 @@ class ES_TTStubAlgorithm_cbc3 : public edm::ESProducer
record.getRecord< TrackerDigiGeometryRecord >().get( tGeomHandle );
const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
edm::ESHandle<TrackerTopology> tTopoHandle;
record.getRecord<IdealGeometryRecord>().get(tTopoHandle);
record.getRecord<TrackerTopologyRcd>().get(tTopoHandle);
const TrackerTopology* const theTrackerTopo = tTopoHandle.product();

TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
Expand Down
35 changes: 28 additions & 7 deletions L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h
Expand Up @@ -13,8 +13,8 @@
*
*/

#ifndef L1_TRACK_TRIGGER_STUB_ALGO_TAB2013_H
#define L1_TRACK_TRIGGER_STUB_ALGO_TAB2013_H
#ifndef L1_TRACK_TRIGGER_STUB_ALGO_official_H
#define L1_TRACK_TRIGGER_STUB_ALGO_official_H

#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
Expand All @@ -41,21 +41,28 @@ class TTStubAlgorithm_official : public TTStubAlgorithm< T >
/// Data members
bool mPerformZMatchingPS;
bool mPerformZMatching2S;
bool m_tilted;
std::string className_;

std::vector< double > barrelCut;
std::vector< std::vector< double > > ringCut;
std::vector< std::vector< double > > tiltedCut;
std::vector< double > barrelNTilt;

public:
/// Constructor
TTStubAlgorithm_official( const TrackerGeometry* const theTrackerGeom, const TrackerTopology* const theTrackerTopo,
std::vector< double > setBarrelCut,
std::vector< std::vector< double > > setRingCut,
bool aPerformZMatchingPS, bool aPerformZMatching2S )
std::vector< std::vector< double > > setTiltedCut,
std::vector< double > setBarrelNTilt,
bool aPerformZMatchingPS, bool aPerformZMatching2S )
: TTStubAlgorithm< T >( theTrackerGeom, theTrackerTopo, __func__ )
{
barrelCut = setBarrelCut;
ringCut = setRingCut;
tiltedCut = setTiltedCut;
barrelNTilt = setBarrelNTilt;
mPerformZMatchingPS = aPerformZMatchingPS;
mPerformZMatching2S = aPerformZMatching2S;
}
Expand Down Expand Up @@ -103,6 +110,9 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer
/// Windows
std::vector< double > setBarrelCut;
std::vector< std::vector< double > > setRingCut;
std::vector< std::vector< double > > setTiltedCut;

std::vector< double > setBarrelNTilt;

/// Z-matching
bool mPerformZMatchingPS;
Expand All @@ -114,15 +124,24 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer
{
mPerformZMatchingPS = p.getParameter< bool >("zMatchingPS");
mPerformZMatching2S = p.getParameter< bool >("zMatching2S");

setBarrelCut = p.getParameter< std::vector< double > >("BarrelCut");
setBarrelNTilt = p.getParameter< std::vector< double > >("NTiltedRings");

std::vector< edm::ParameterSet > vPSet = p.getParameter< std::vector< edm::ParameterSet > >("EndcapCutSet");
std::vector< edm::ParameterSet > vPSet2 = p.getParameter< std::vector< edm::ParameterSet > >("TiltedBarrelCutSet");

std::vector< edm::ParameterSet > vPSet = p.getParameter< std::vector< edm::ParameterSet > >("EndcapCutSet");
std::vector< edm::ParameterSet >::const_iterator iPSet;
for ( iPSet = vPSet.begin(); iPSet != vPSet.end(); iPSet++ )
{
setRingCut.push_back( iPSet->getParameter< std::vector< double > >("EndcapCut") );
}

for ( iPSet = vPSet2.begin(); iPSet != vPSet2.end(); iPSet++ )
{
setTiltedCut.push_back( iPSet->getParameter< std::vector< double > >("TiltedCut") );
}


setWhatProduced( this );
}

Expand All @@ -136,11 +155,12 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer
record.getRecord< TrackerDigiGeometryRecord >().get( tGeomHandle );
const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
edm::ESHandle<TrackerTopology> tTopoHandle;
record.getRecord<IdealGeometryRecord>().get(tTopoHandle);
record.getRecord< TrackerTopologyRcd >().get(tTopoHandle);
const TrackerTopology* const theTrackerTopo = tTopoHandle.product();

TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_official< T >( theTrackerGeom, theTrackerTopo,
setBarrelCut, setRingCut, mPerformZMatchingPS, mPerformZMatching2S );
setBarrelCut, setRingCut, setTiltedCut, setBarrelNTilt,
mPerformZMatchingPS, mPerformZMatching2S);

_theAlgo = std::shared_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
return _theAlgo;
Expand All @@ -150,3 +170,4 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer

#endif


10 changes: 5 additions & 5 deletions L1Trigger/TrackTrigger/plugins/TTClusterBuilder.cc
Expand Up @@ -14,13 +14,13 @@ template< >
void TTClusterBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, const edm::EventSetup& iSetup )
{
/// Prepare output
std::unique_ptr< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > > > TTClusterDSVForOutput( new edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > > );
auto ttClusterDSVForOutput = std::make_unique<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>>();
std::map< DetId, std::vector< Ref_Phase2TrackerDigi_ > > rawHits;
this->RetrieveRawHits( rawHits, iEvent );

// Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

edm::ESHandle< TrackerGeometry > tGeomHandle;
Expand Down Expand Up @@ -54,7 +54,7 @@ void TTClusterBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, co
/// Create TTCluster objects and store them
/// Use the FastFiller with edmNew::DetSetVector
{
edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller lowerOutputFiller( *TTClusterDSVForOutput, lowerDetid );
edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller lowerOutputFiller( *ttClusterDSVForOutput, lowerDetid );
for ( unsigned int i = 0; i < lowerHits.size(); i++ )
{
TTCluster< Ref_Phase2TrackerDigi_ > temp( lowerHits.at(i), stackDetid, 0, storeLocalCoord );
Expand All @@ -64,7 +64,7 @@ void TTClusterBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, co
lowerOutputFiller.abort();
}
{
edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller upperOutputFiller( *TTClusterDSVForOutput, upperDetid );
edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >::FastFiller upperOutputFiller( *ttClusterDSVForOutput, upperDetid );
for ( unsigned int i = 0; i < upperHits.size(); i++ )
{
TTCluster< Ref_Phase2TrackerDigi_ > temp( upperHits.at(i), stackDetid, 1, storeLocalCoord );
Expand All @@ -76,7 +76,7 @@ void TTClusterBuilder< Ref_Phase2TrackerDigi_ >::produce( edm::Event& iEvent, co
} /// End of loop over detector elements

/// Put output in the event
iEvent.put( std::move(TTClusterDSVForOutput), "ClusterInclusive" );
iEvent.put( std::move(ttClusterDSVForOutput), "ClusterInclusive" );
}

/// Retrieve hits from the event
Expand Down

0 comments on commit 5f26427

Please sign in to comment.