CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TMuonBarrelKalmanTrackProducer Class Reference
Inheritance diagram for L1TMuonBarrelKalmanTrackProducer:
edm::stream::EDProducer<>

Public Member Functions

 L1TMuonBarrelKalmanTrackProducer (const edm::ParameterSet &)
 
 ~L1TMuonBarrelKalmanTrackProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void beginStream (edm::StreamID) override
 
void endStream () override
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::unique_ptr< L1TMuonBarrelKalmanAlgoalgo_
 
std::vector< int > bx_
 
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
 
std::unique_ptr< L1TMuonBarrelKalmanTrackFindertrackFinder_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 21 of file L1TMuonBarrelKalmanTrackProducer.cc.

Constructor & Destructor Documentation

L1TMuonBarrelKalmanTrackProducer::L1TMuonBarrelKalmanTrackProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 42 of file L1TMuonBarrelKalmanTrackProducer.cc.

42  :
43  src_(consumes<std::vector<L1MuKBMTCombinedStub> >(iConfig.getParameter<edm::InputTag>("src"))),
44  bx_(iConfig.getParameter<std::vector<int> >("bx")),
45  algo_(new L1TMuonBarrelKalmanAlgo(iConfig.getParameter<edm::ParameterSet>("algoSettings"))),
47 {
48  produces <std::vector<L1MuKBMTrack> >();
49  produces <l1t::RegionalMuonCandBxCollection>("BMTF");
50 
51 }
T getParameter(std::string const &) const
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
std::unique_ptr< L1TMuonBarrelKalmanTrackFinder > trackFinder_
std::unique_ptr< L1TMuonBarrelKalmanAlgo > algo_
L1TMuonBarrelKalmanTrackProducer::~L1TMuonBarrelKalmanTrackProducer ( )
override

Definition at line 54 of file L1TMuonBarrelKalmanTrackProducer.cc.

55 {
56 
57  // do anything here that needs to be done at destruction time
58  // (e.g. close files, deallocate resources etc.)
59 
60 }

Member Function Documentation

void L1TMuonBarrelKalmanTrackProducer::beginStream ( edm::StreamID  )
overrideprivate

Definition at line 109 of file L1TMuonBarrelKalmanTrackProducer.cc.

110 {
111 }
void L1TMuonBarrelKalmanTrackProducer::endStream ( )
overrideprivate

Definition at line 115 of file L1TMuonBarrelKalmanTrackProducer.cc.

115  {
116 }
void L1TMuonBarrelKalmanTrackProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 119 of file L1TMuonBarrelKalmanTrackProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setUnknown().

119  {
120  //The following says we do not know what parameters are allowed so do no validation
121  // Please change this to state exactly what you do use, even if it is no parameters
123  desc.setUnknown();
124  descriptions.addDefault(desc);
125 }
void addDefault(ParameterSetDescription const &psetDescription)
void L1TMuonBarrelKalmanTrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 71 of file L1TMuonBarrelKalmanTrackProducer.cc.

References algo_, bx_, edm::Event::getByToken(), mps_fire::i, eostools::move(), MillePedeFileConverter_cfg::out, edm::Event::put(), alignCSCRings::r, src_, tmp, HiIsolationCommonParameters_cff::track, trackFinder_, and parallelization::uint().

72 {
73  using namespace edm;
75  std::vector<L1MuKBMTrack> outAll;
76  iEvent.getByToken(src_,stubHandle);
77 
79  for (uint i=0;i<stubHandle->size();++i) {
80  L1MuKBMTCombinedStubRef r(stubHandle,i);
81  stubs.push_back(r);
82  }
83 
84 
85  std::unique_ptr<l1t::RegionalMuonCandBxCollection> outBMTF(new l1t::RegionalMuonCandBxCollection());
86  outBMTF->setBXRange(-3,3);
88  for (const auto& bx : bx_) {
89  L1MuKBMTrackCollection tmp = trackFinder_->process(algo_.get(),stubs,bx);
90  for (const auto& track :tmp) {
91  algo_->addBMTFMuon(bx,track,outBMTF);
92  }
93  if (!tmp.empty())
94  out.insert(out.end(),tmp.begin(),tmp.end());
95  }
96 
97 
98 
99 
100 
101  iEvent.put(std::move(outBMTF),"BMTF");
102  std::unique_ptr<L1MuKBMTrackCollection > out1 = std::make_unique<L1MuKBMTrackCollection >(out);
103  iEvent.put(std::move(out1));
104 
105 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
std::unique_ptr< L1TMuonBarrelKalmanTrackFinder > trackFinder_
std::unique_ptr< L1TMuonBarrelKalmanAlgo > algo_
def uint(string)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
HLT enums.
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:14
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

std::unique_ptr<L1TMuonBarrelKalmanAlgo> L1TMuonBarrelKalmanTrackProducer::algo_
private

Definition at line 34 of file L1TMuonBarrelKalmanTrackProducer.cc.

Referenced by produce().

std::vector<int> L1TMuonBarrelKalmanTrackProducer::bx_
private

Definition at line 33 of file L1TMuonBarrelKalmanTrackProducer.cc.

Referenced by produce().

edm::EDGetTokenT<std::vector<L1MuKBMTCombinedStub> > L1TMuonBarrelKalmanTrackProducer::src_
private

Definition at line 32 of file L1TMuonBarrelKalmanTrackProducer.cc.

Referenced by produce().

std::unique_ptr<L1TMuonBarrelKalmanTrackFinder> L1TMuonBarrelKalmanTrackProducer::trackFinder_
private

Definition at line 35 of file L1TMuonBarrelKalmanTrackProducer.cc.

Referenced by produce().