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 Attributes
L3MuonCandidateProducer Class Reference

#include <L3MuonCandidateProducer.h>

Inheritance diagram for L3MuonCandidateProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 L3MuonCandidateProducer (const edm::ParameterSet &)
 constructor with config More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 produce candidates More...
 
virtual ~L3MuonCandidateProducer ()
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag theL3CollectionLabel
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- 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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Intermediate step in the L3 muons selection. This class takes the L3 muons (which are reco::Tracks) and creates the correspondent reco::RecoChargedCandidate.

Riccardo's comment: The separation between the L3MuonProducer and this class allows the interchangeability of the L3MuonProducer and the StandAloneMuonProducer This class is supposed to be removed once the L3/STA comparison will be done, then the RecoChargedCandidate production will be put into the L3MuonProducer class.

Author
J.Alcaraz

Intermediate step in the L3 muons selection. This class takes the L3 muons (which are reco::Tracks) and creates the correspondent reco::RecoChargedCandidate.

Riccardo's comment: The separation between the L3MuonProducer and this class allows the interchangeability of the L3MuonProducer and the StandAloneMuonProducer This class is supposed to be removed once the L3/STA comparison will be done, then the RecoChargedCandidate production will be done into the L3MuonProducer class.

Author
J.Alcaraz

Definition at line 26 of file L3MuonCandidateProducer.h.

Constructor & Destructor Documentation

L3MuonCandidateProducer::L3MuonCandidateProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 41 of file L3MuonCandidateProducer.cc.

References edm::ParameterSet::getParameter(), and LogTrace.

41  {
42  LogTrace("Muon|RecoMuon|L3MuonCandidateProducer")<<" constructor called";
43 
44  // StandAlone Collection Label
45  theL3CollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
46 
47  produces<RecoChargedCandidateCollection>();
48 }
T getParameter(std::string const &) const
#define LogTrace(id)
L3MuonCandidateProducer::~L3MuonCandidateProducer ( )
virtual

destructor

Definition at line 51 of file L3MuonCandidateProducer.cc.

References LogTrace.

51  {
52  LogTrace("Muon|RecoMuon|L3MuonCandidateProducer")<<" L3MuonCandidateProducer destructor called";
53 }
#define LogTrace(id)

Member Function Documentation

void L3MuonCandidateProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

produce candidates

reconstruct muons

Implements edm::EDProducer.

Definition at line 57 of file L3MuonCandidateProducer.cc.

References abs, i, LogTrace, metname, p4, evf::utils::pid, lumiQueryAPI::q, reco::RecoChargedCandidate::setTrack(), and testEve_cfg::tracks.

57  {
58  const string metname = "Muon|RecoMuon|L3MuonCandidateProducer";
59 
60  // Take the L3 container
61  LogTrace(metname)<<" Taking the L3/GLB muons: "<<theL3CollectionLabel.label();
63  event.getByLabel(theL3CollectionLabel,tracks);
64 
65  // Create a RecoChargedCandidate collection
66  LogTrace(metname)<<" Creating the RecoChargedCandidate collection";
67  auto_ptr<RecoChargedCandidateCollection> candidates( new RecoChargedCandidateCollection());
68 
69  for (unsigned int i=0; i<tracks->size(); i++) {
70  TrackRef tkref(tracks,i);
71  Particle::Charge q = tkref->charge();
72  Particle::LorentzVector p4(tkref->px(), tkref->py(), tkref->pz(), tkref->p());
73  Particle::Point vtx(tkref->vx(),tkref->vy(), tkref->vz());
74 
75  int pid = 13;
76  if(abs(q)==1) pid = q < 0 ? 13 : -13;
77  else LogWarning(metname) << "L3MuonCandidate has charge = "<<q;
78  RecoChargedCandidate cand(q, p4, vtx, pid);
79 
80  cand.setTrack(tkref);
81  candidates->push_back(cand);
82  }
83 
84  event.put(candidates);
85 
86  LogTrace(metname)<<" Event loaded"
87  <<"================================";
88 }
int i
Definition: DBlmapReader.cc:9
const std::string metname
#define abs(x)
Definition: mlp_lapack.h:159
int Charge
electric charge type
Definition: Particle.h:24
double p4[4]
Definition: TauolaWrapper.h:92
math::XYZPoint Point
point in the space
Definition: Particle.h:30
#define LogTrace(id)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
tuple tracks
Definition: testEve_cfg.py:39
std::string const & label() const
Definition: InputTag.h:25
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:26

Member Data Documentation

edm::InputTag L3MuonCandidateProducer::theL3CollectionLabel
private

Definition at line 42 of file L3MuonCandidateProducer.h.