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 Types | Private Member Functions
GlobalMuonTrackMixer Class Reference
Inheritance diagram for GlobalMuonTrackMixer:
TrackMixerBase edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalMuonTrackMixer (const edm::ParameterSet &)
 
 ~GlobalMuonTrackMixer ()
 
- Public Member Functions inherited from TrackMixerBase
 TrackMixerBase (const edm::ParameterSet &)
 
 ~TrackMixerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef std::vector
< reco::MuonTrackLinks
MuonTrackLinksCollection
 

Private Member Functions

virtual void produceTrackExtras (edm::Event &, const edm::EventSetup &)
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from TrackMixerBase
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual void produceTracks (edm::Event &, const edm::EventSetup &)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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)
 
- Protected Attributes inherited from TrackMixerBase
std::string moduleLabel_
 
std::vector< todoListEntryTypetodoList_
 
int verbosity_
 

Detailed Description

Definition at line 32 of file GlobalMuonTrackMixer.cc.

Member Typedef Documentation

Definition at line 41 of file GlobalMuonTrackMixer.cc.

Constructor & Destructor Documentation

GlobalMuonTrackMixer::GlobalMuonTrackMixer ( const edm::ParameterSet cfg)
explicit

Definition at line 44 of file GlobalMuonTrackMixer.cc.

References TrackMixerBase::todoList_.

45  : TrackMixerBase(cfg)
46 {
47  for ( typename std::vector<todoListEntryType>::const_iterator todoItem = todoList_.begin();
48  todoItem != todoList_.end(); ++todoItem ) {
49  produces<MuonTrackLinksCollection>(todoItem->srcTrackCollection1_.instance());
50  }
51 }
std::vector< todoListEntryType > todoList_
TrackMixerBase(const edm::ParameterSet &)
GlobalMuonTrackMixer::~GlobalMuonTrackMixer ( )
inline

Definition at line 36 of file GlobalMuonTrackMixer.cc.

36 {}

Member Function Documentation

void GlobalMuonTrackMixer::produceTrackExtras ( edm::Event evt,
const edm::EventSetup es 
)
privatevirtual

Implements TrackMixerBase.

Definition at line 74 of file GlobalMuonTrackMixer.cc.

References gather_cfg::cout, edm::Event::getByLabel(), reco::MuonTrackLinks::globalTrack(), edm::Ref< C, T, F >::id(), customizeTrackingMonitorSeedNumber::idx, edm::Ref< C, T, F >::key(), TrackMixerBase::moduleLabel_, edm::Event::put(), reco::MuonTrackLinks::standAloneTrack(), TrackMixerBase::todoList_, reco::MuonTrackLinks::trackerTrack(), and TrackMixerBase::verbosity_.

75 {
76  if ( verbosity_ ) std::cout << "<GlobalMuonTrackMixer::produceTrackExtras (" << moduleLabel_ << ")>:" << std::endl;
77 
78  for ( typename std::vector<todoListEntryType>::const_iterator todoItem = todoList_.begin();
79  todoItem != todoList_.end(); ++todoItem ) {
80  edm::Handle<MuonTrackLinksCollection> trackLinksCollection1;
81  evt.getByLabel(todoItem->srcTrackCollection1_, trackLinksCollection1);
82 
83  edm::Handle<MuonTrackLinksCollection> trackLinksCollection2;
84  evt.getByLabel(todoItem->srcTrackCollection2_, trackLinksCollection2);
85 
86  std::auto_ptr<MuonTrackLinksCollection> trackLinks_output(new MuonTrackLinksCollection());
87 
88  for ( MuonTrackLinksCollection::const_iterator trackLink = trackLinksCollection1->begin();
89  trackLink != trackLinksCollection1->end(); ++trackLink ) {
90  reco::MuonTrackLinks trackLink_output = makeMuonTrackLink(*trackLink, todoItem->trackRefMap_);
91  trackLinks_output->push_back(trackLink_output);
92  }
93  for ( MuonTrackLinksCollection::const_iterator trackLink = trackLinksCollection2->begin();
94  trackLink != trackLinksCollection2->end(); ++trackLink ) {
95  reco::MuonTrackLinks trackLink_output = makeMuonTrackLink(*trackLink, todoItem->trackRefMap_);
96  trackLinks_output->push_back(trackLink_output);
97  }
98 
99  if ( verbosity_ ) {
100  std::cout << "instanceLabel = " << todoItem->srcTrackCollection1_.instance() << ": #entries = " << trackLinks_output->size() << std::endl;
101  int idx = 0;
102  for ( MuonTrackLinksCollection::const_iterator trackLink = trackLinks_output->begin();
103  trackLink != trackLinks_output->end(); ++trackLink ) {
104  std::cout << "trackLink #" << idx << ":" << std::endl;
105  std::cout << " trackerTrack = " << trackLink->trackerTrack().id() << ":" << trackLink->trackerTrack().key() << std::endl;
106  std::cout << " standAloneTrack = " << trackLink->standAloneTrack().id() << ":" << trackLink->standAloneTrack().key() << std::endl;
107  std::cout << " globalTrack = " << trackLink->globalTrack().id() << ":" << trackLink->globalTrack().key() << std::endl;
108  ++idx;
109  }
110  }
111 
112  evt.put(trackLinks_output, todoItem->srcTrackCollection1_.instance());
113  }
114 }
std::vector< todoListEntryType > todoList_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
std::vector< reco::MuonTrackLinks > MuonTrackLinksCollection
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
tuple cout
Definition: gather_cfg.py:121
std::string moduleLabel_