test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ME0MuonTrackCollProducer Class Reference
Inheritance diagram for ME0MuonTrackCollProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 ME0MuonTrackCollProducer (const edm::ParameterSet &)
 
 ~ME0MuonTrackCollProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::Handle< std::vector
< reco::ME0Muon > > 
OurMuons
 
edm::InputTag OurMuonsTag
 
edm::EDGetTokenT
< ME0MuonCollection
OurMuonsToken_
 
const edm::ParameterSet parset_
 
std::vector< std::string > selectionTags
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 29 of file ME0MuonTrackCollProducer.cc.

Constructor & Destructor Documentation

ME0MuonTrackCollProducer::ME0MuonTrackCollProducer ( const edm::ParameterSet parset)
explicit

Definition at line 52 of file ME0MuonTrackCollProducer.cc.

References OurMuonsTag, and OurMuonsToken_.

52  :
53  OurMuonsTag(parset.getParameter<edm::InputTag>("me0MuonTag")),
54  selectionTags(parset.getParameter< std::vector<std::string> >("selectionTags")),
55  parset_(parset)
56 {
57  produces<reco::TrackCollection>();
58  OurMuonsToken_ = consumes<ME0MuonCollection>(OurMuonsTag);
59 }
T getParameter(std::string const &) const
const edm::ParameterSet parset_
std::vector< std::string > selectionTags
edm::EDGetTokenT< ME0MuonCollection > OurMuonsToken_
ME0MuonTrackCollProducer::~ME0MuonTrackCollProducer ( )

Definition at line 61 of file ME0MuonTrackCollProducer.cc.

61  {
62 }

Member Function Documentation

void ME0MuonTrackCollProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 64 of file ME0MuonTrackCollProducer.cc.

References edm::Event::getByToken(), edm::Event::getRefBeforePut(), muon::isGoodMuon(), OurMuons, OurMuonsToken_, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, TrackCollections2monitor_cff::selectedTracks, and muon::Tight.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

65 {
66  using namespace reco;
67  using namespace edm;
70 
71 
72  std::auto_ptr<reco::TrackCollection> selectedTracks(new reco::TrackCollection);
73 
75 
76 
77 
78  for(std::vector<reco::ME0Muon>::const_iterator thismuon = OurMuons->begin();
79  thismuon != OurMuons->end(); ++thismuon) {
80 
81  if (!muon::isGoodMuon(*thismuon, muon::Tight)) continue;
82  reco::TrackRef trackref;
83 
84  if (thismuon->innerTrack().isNonnull()) trackref = thismuon->innerTrack();
85 
86  const reco::Track* trk = &(*trackref);
87  // pointer to old track:
88  //reco::Track* newTrk = new reco::Track(*trk);
89 
90  selectedTracks->push_back( *trk );
91  //selectedTrackExtras->push_back( *newExtra );
92  }
93  iEvent.put(selectedTracks);
94 
95 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::Handle< std::vector< reco::ME0Muon > > OurMuons
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
RefProd< PROD > getRefBeforePut()
Definition: Event.h:141
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
edm::EDGetTokenT< ME0MuonCollection > OurMuonsToken_

Member Data Documentation

edm::Handle<std::vector<reco::ME0Muon> > ME0MuonTrackCollProducer::OurMuons
private

Definition at line 37 of file ME0MuonTrackCollProducer.cc.

Referenced by produce().

edm::InputTag ME0MuonTrackCollProducer::OurMuonsTag
private

Definition at line 39 of file ME0MuonTrackCollProducer.cc.

Referenced by ME0MuonTrackCollProducer().

edm::EDGetTokenT<ME0MuonCollection> ME0MuonTrackCollProducer::OurMuonsToken_
private

Definition at line 42 of file ME0MuonTrackCollProducer.cc.

Referenced by ME0MuonTrackCollProducer(), and produce().

const edm::ParameterSet ME0MuonTrackCollProducer::parset_
private

Definition at line 41 of file ME0MuonTrackCollProducer.cc.

std::vector<std::string> ME0MuonTrackCollProducer::selectionTags
private

Definition at line 40 of file ME0MuonTrackCollProducer.cc.