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
PFDisplacedVertexCandidateProducer Class Reference

Producer for DisplacedVertices. More...

#include <PFDisplacedVertexCandidateProducer.h>

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

Public Member Functions

virtual void beginJob ()
 
virtual void beginRun (edm::Run &r, const edm::EventSetup &c)
 
 PFDisplacedVertexCandidateProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~PFDisplacedVertexCandidateProducer ()
 
- 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 inputTagTracks_
 Reco Tracks used to spot the nuclear interactions. More...
 
PFDisplacedVertexCandidateFinder pfDisplacedVertexCandidateFinder_
 Displaced Vertex Candidates finder. More...
 
bool verbose_
 verbose ? More...
 

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

Producer for DisplacedVertices.

This producer makes use of DisplacedVertexCandidateFinder. This Finder loop recursively over reco::Tracks to find those which are linked together by the criterion which is by default the minimal approach distance.

Author
Maxime Gouzevitch
Date
November 2009

Definition at line 25 of file PFDisplacedVertexCandidateProducer.h.

Constructor & Destructor Documentation

PFDisplacedVertexCandidateProducer::PFDisplacedVertexCandidateProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file PFDisplacedVertexCandidateProducer.cc.

References debug, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

22  {
23 
24  // --- Setup input collection names --- //
26  = iConfig.getParameter<InputTag>("trackCollection");
27 
28  verbose_ =
29  iConfig.getUntrackedParameter<bool>("verbose");
30 
31  bool debug =
32  iConfig.getUntrackedParameter<bool>("debug");
33 
34  // ------ Algo Parameters ------ //
35 
36  // Distance of minimal approach below which
37  // two tracks are considered as linked together
38  double dcaCut
39  = iConfig.getParameter< double >("dcaCut");
40 
41  // Do not reconstruct vertices wich are
42  // too close to the beam pipe
43  double primaryVertexCut
44  = iConfig.getParameter< double >("primaryVertexCut");
45 
46  //maximum distance between the DCA Point and the inner hit of the track
47  double dcaPInnerHitCut
48  = iConfig.getParameter< double >("dcaPInnerHitCut");
49 
50  edm::ParameterSet ps_trk
51  = iConfig.getParameter<edm::ParameterSet>("tracksSelectorParameters");
52 
53  // Collection to be produced
54  produces<reco::PFDisplacedVertexCandidateCollection>();
55 
56  // Vertex Finder parameters -----------------------------------
58  pfDisplacedVertexCandidateFinder_.setParameters(dcaCut, primaryVertexCut, dcaPInnerHitCut, ps_trk);
59 
60 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
PFDisplacedVertexCandidateFinder pfDisplacedVertexCandidateFinder_
Displaced Vertex Candidates finder.
void setDebug(bool debug)
sets debug printout flag
void setParameters(double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet &ps_trk)
---—— Set different algo parameters —— ///
#define debug
Definition: MEtoEDMFormat.h:34
edm::InputTag inputTagTracks_
Reco Tracks used to spot the nuclear interactions.
PFDisplacedVertexCandidateProducer::~PFDisplacedVertexCandidateProducer ( )

Definition at line 63 of file PFDisplacedVertexCandidateProducer.cc.

63 { }

Member Function Documentation

void PFDisplacedVertexCandidateProducer::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 68 of file PFDisplacedVertexCandidateProducer.cc.

68 { }
void PFDisplacedVertexCandidateProducer::beginRun ( edm::Run r,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 71 of file PFDisplacedVertexCandidateProducer.cc.

72  { }
void PFDisplacedVertexCandidateProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 76 of file PFDisplacedVertexCandidateProducer.cc.

References gather_cfg::cout, edm::EventID::event(), edm::EventSetup::get(), edm::Event::getByLabel(), edm::EventBase::id(), LogDebug, edm::ESHandle< class >::product(), edm::Event::put(), and edm::EventID::run().

77  {
78 
79  LogDebug("PFDisplacedVertexCandidateProducer")<<"START event: "<<iEvent.id().event()
80  <<" in run "<<iEvent.id().run()<<endl;
81 
82  // Prepare and fill useful event information for the Finder
84  iSetup.get<IdealMagneticFieldRecord>().get(magField);
85  const MagneticField* theMagField = magField.product();
86 
87  Handle <reco::TrackCollection> trackCollection;
88  iEvent.getByLabel(inputTagTracks_, trackCollection);
89 
90  pfDisplacedVertexCandidateFinder_.setInput( trackCollection, theMagField );
91 
92 
93  // Run the finder
95 
96 
97  if(verbose_) {
98  ostringstream str;
101  LogInfo("PFDisplacedVertexCandidateProducer") << str.str()<<endl;
102  }
103 
104 
105  auto_ptr< reco::PFDisplacedVertexCandidateCollection >
106  pOutputDisplacedVertexCandidateCollection(
108 
109 
110  iEvent.put(pOutputDisplacedVertexCandidateCollection);
111 
112  LogDebug("PFDisplacedVertexCandidateProducer")<<"STOP event: "<<iEvent.id().event()
113  <<" in run "<<iEvent.id().run()<<endl;
114 
115 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
void setInput(const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
EventNumber_t event() const
Definition: EventID.h:44
PFDisplacedVertexCandidateFinder pfDisplacedVertexCandidateFinder_
Displaced Vertex Candidates finder.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::EventID id() const
Definition: EventBase.h:56
void findDisplacedVertexCandidates()
-----— Main function which find vertices -----— ///
tuple cout
Definition: gather_cfg.py:41
edm::InputTag inputTagTracks_
Reco Tracks used to spot the nuclear interactions.
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates()

Member Data Documentation

edm::InputTag PFDisplacedVertexCandidateProducer::inputTagTracks_
private

Reco Tracks used to spot the nuclear interactions.

Definition at line 41 of file PFDisplacedVertexCandidateProducer.h.

PFDisplacedVertexCandidateFinder PFDisplacedVertexCandidateProducer::pfDisplacedVertexCandidateFinder_
private

Displaced Vertex Candidates finder.

Definition at line 47 of file PFDisplacedVertexCandidateProducer.h.

bool PFDisplacedVertexCandidateProducer::verbose_
private

verbose ?

Definition at line 44 of file PFDisplacedVertexCandidateProducer.h.