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

L1TMuonBarrelKalmanAlgoalgo_
 
std::vector< int > bx_
 
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
 
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 <L1MuKBMTrackBxCollection>();
49  produces <l1t::RegionalMuonCandBxCollection>("BMTF");
50 
51 }
T getParameter(std::string const &) const
L1TMuonBarrelKalmanTrackFinder * trackFinder_
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
L1TMuonBarrelKalmanTrackProducer::~L1TMuonBarrelKalmanTrackProducer ( )
override

Definition at line 54 of file L1TMuonBarrelKalmanTrackProducer.cc.

References algo_, and trackFinder_.

55 {
56 
57  if (algo_!=nullptr)
58  delete algo_;
59 
60  if (trackFinder_!=nullptr)
61  delete trackFinder_;
62 
63  // do anything here that needs to be done at destruction time
64  // (e.g. close files, deallocate resources etc.)
65 
66 }
L1TMuonBarrelKalmanTrackFinder * trackFinder_

Member Function Documentation

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

Definition at line 108 of file L1TMuonBarrelKalmanTrackProducer.cc.

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

Definition at line 114 of file L1TMuonBarrelKalmanTrackProducer.cc.

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

Definition at line 118 of file L1TMuonBarrelKalmanTrackProducer.cc.

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

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

Definition at line 77 of file L1TMuonBarrelKalmanTrackProducer.cc.

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

78 {
79  using namespace edm;
81  iEvent.getByToken(src_,stubHandle);
82 
84  for (uint i=0;i<stubHandle->size();++i) {
85  L1MuKBMTCombinedStubRef r(stubHandle,i);
86  stubs.push_back(r);
87  }
88 
89 
90  std::unique_ptr<l1t::RegionalMuonCandBxCollection> outBMTF(new l1t::RegionalMuonCandBxCollection());
91  std::unique_ptr<L1MuKBMTrackBxCollection> out(new L1MuKBMTrackBxCollection());
92  outBMTF->setBXRange(bx_.front(),bx_.back());
93  out->setBXRange(bx_.front(),bx_.back());
94  for (const auto& bx : bx_) {
96  for (const auto& track :tmp) {
97  out->push_back(bx,track);
98  algo_->addBMTFMuon(bx,track,outBMTF);
99  }
100  }
101  iEvent.put(std::move(outBMTF),"BMTF");
102  iEvent.put(std::move(out));
103 
104 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
L1MuKBMTrackCollection process(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTCombinedStubRefVector &stubs, int bx)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
L1TMuonBarrelKalmanTrackFinder * trackFinder_
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
def uint(string)
void addBMTFMuon(int, const L1MuKBMTrack &, std::unique_ptr< l1t::RegionalMuonCandBxCollection > &)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
HLT enums.
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

L1TMuonBarrelKalmanAlgo* L1TMuonBarrelKalmanTrackProducer::algo_
private
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().

L1TMuonBarrelKalmanTrackFinder* L1TMuonBarrelKalmanTrackProducer::trackFinder_
private