CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTMuonL2SelectorForL3IO Class Reference

#include <HLTMuonL2SelectorForL3IO.h>

Inheritance diagram for HLTMuonL2SelectorForL3IO:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTMuonL2SelectorForL3IO (const edm::ParameterSet &)
 constructor with config More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 select muons More...
 
virtual ~HLTMuonL2SelectorForL3IO ()
 destructor More...
 
- 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 ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 default values More...
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const double dRDiffMax_
 
const edm::EDGetTokenT
< reco::TrackCollection
l2Src_
 
const edm::EDGetTokenT
< reco::TrackCollection
l3OISrc_
 
const bool useOuterHitPosition_
 
const double xDiffMax_
 
const double yDiffMax_
 
const double zDiffMax_
 

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
 
- 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

L2 muon selector for L3 IO: finds L2 muons not previous converted into L3 muons

Author
Benjamin Radburn-Smith - Purdue University

Definition at line 19 of file HLTMuonL2SelectorForL3IO.h.

Constructor & Destructor Documentation

HLTMuonL2SelectorForL3IO::HLTMuonL2SelectorForL3IO ( const edm::ParameterSet iConfig)

constructor with config

Definition at line 15 of file HLTMuonL2SelectorForL3IO.cc.

References LogTrace.

15  :
16  l2Src_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("l2Src"))),
17  l3OISrc_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("l3OISrc"))),
18  useOuterHitPosition_(iConfig.getParameter<bool>("useOuterHitPosition")),
19  xDiffMax_(iConfig.getParameter<double>("xDiffMax")),
20  yDiffMax_(iConfig.getParameter<double>("yDiffMax")),
21  zDiffMax_(iConfig.getParameter<double>("zDiffMax")),
22  dRDiffMax_(iConfig.getParameter<double>("dRDiffMax")){
23  LogTrace("Muon|RecoMuon|HLTMuonL2SelectorForL3IO")<<"constructor called";
24  produces<reco::TrackCollection>();
25 }
T getParameter(std::string const &) const
const edm::EDGetTokenT< reco::TrackCollection > l3OISrc_
#define LogTrace(id)
const edm::EDGetTokenT< reco::TrackCollection > l2Src_
HLTMuonL2SelectorForL3IO::~HLTMuonL2SelectorForL3IO ( )
virtual

destructor

Definition at line 28 of file HLTMuonL2SelectorForL3IO.cc.

28 {}

Member Function Documentation

void HLTMuonL2SelectorForL3IO::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

default values

Definition at line 68 of file HLTMuonL2SelectorForL3IO.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLT_25ns10e33_v2_cff::InputTag.

68  {
70  desc.add<edm::InputTag>("l2Src",edm::InputTag("hltL2Muons","UpdatedAtVtx"));
71  desc.add<edm::InputTag>("l3OISrc",edm::InputTag("hltL2Muons","UpdatedAtVtx"));
72  desc.add<bool>("useOuterHitPosition",true); //ToDo: Check whether untracked or tracked
73  desc.add<double>("xDiffMax",0.5);
74  desc.add<double>("yDiffMax",0.5);
75  desc.add<double>("zDiffMax",9999.0);
76  desc.add<double>("dRDiffMax",0.01);
77  descriptions.add("HLTMuonL2SelectorForL3IO",desc);
78 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HLTMuonL2SelectorForL3IO::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

select muons

create collection of L2 muons not already reconstructed as L3 muons

Implements edm::stream::EDProducerBase.

Definition at line 31 of file HLTMuonL2SelectorForL3IO.cc.

References funct::abs(), deltaR(), dRDiffMax_, edm::Event::getByToken(), l2Src_, l3OISrc_, metname, edm::Handle< T >::product(), edm::Event::put(), mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, useOuterHitPosition_, xDiffMax_, yDiffMax_, and zDiffMax_.

31  {
32  const std::string metname = "Muon|RecoMuon|HLTMuonL2SelectorForL3IO";
33 
34 // IN:
36  iEvent.getByToken(l2Src_, l2TrackCol);
37 
39  iEvent.getByToken(l3OISrc_, l3TrackCol);
40 
41 // OUT:
42  std::auto_ptr<std::vector<reco::Track> > result(new std::vector<reco::Track>());
43 
44  auto const& l2Tracks = *l2TrackCol.product();
45  auto const& l3Tracks = *l3TrackCol.product();
46  for (auto&& l2 : l2Tracks){
47  bool l2found=false;
48  for (auto&& l3 : l3Tracks){
50  // If x,y are within 0.5cm of each other: L2 has been found already
51  // z found to change beyond this (perhaps a refitting issue?)
52  if (std::abs(l2.outerPosition().X()-l3.outerPosition().X()) < xDiffMax_ &&
53  std::abs(l2.outerPosition().Y()-l3.outerPosition().Y()) < yDiffMax_ &&
54  std::abs(l2.outerPosition().Z()-l3.outerPosition().Z()) < zDiffMax_){
55  l2found=true;
56  }
57  }
58  else{
59  if (deltaR(l3,l2)<dRDiffMax_) l2found=true;
60  }
61  }
62  if (!l2found) result->push_back(l2);
63  }
64 
65  iEvent.put(result);
66 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
const std::string metname
tuple result
Definition: mps_fire.py:84
const edm::EDGetTokenT< reco::TrackCollection > l3OISrc_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
T const * product() const
Definition: Handle.h:81
const edm::EDGetTokenT< reco::TrackCollection > l2Src_

Member Data Documentation

const double HLTMuonL2SelectorForL3IO::dRDiffMax_
private

Definition at line 37 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const edm::EDGetTokenT<reco::TrackCollection> HLTMuonL2SelectorForL3IO::l2Src_
private

Definition at line 34 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const edm::EDGetTokenT<reco::TrackCollection> HLTMuonL2SelectorForL3IO::l3OISrc_
private

Definition at line 35 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const bool HLTMuonL2SelectorForL3IO::useOuterHitPosition_
private

Definition at line 36 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const double HLTMuonL2SelectorForL3IO::xDiffMax_
private

Definition at line 37 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const double HLTMuonL2SelectorForL3IO::yDiffMax_
private

Definition at line 37 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().

const double HLTMuonL2SelectorForL3IO::zDiffMax_
private

Definition at line 37 of file HLTMuonL2SelectorForL3IO.h.

Referenced by produce().