CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoVertex/NuclearInteractionProducer/interface/NuclearInteractionEDProducer.h

Go to the documentation of this file.
00001 #ifndef CD_NuclearInteractionEDProducer_H_
00002 #define CD_NuclearInteractionEDProducer_H_
00003 // -*- C++ -*-
00004 //
00005 // Package:    NuclearAssociatonMapEDProducer
00006 // Class:      NuclearInteractionEDProducer
00007 //
00015 //
00016 // Original Author:  Vincent ROBERFROID
00017 //         Created:  Fri Aug 10 12:05:36 CET 2007
00018 // $Id: NuclearInteractionEDProducer.h,v 1.10 2010/01/21 10:53:40 adamwo Exp $
00019 //
00020 //
00021 
00022 
00023 // system include files
00024 #include <memory>
00025 
00026 // user include files
00027 #include "FWCore/Framework/interface/ESHandle.h"
00028 #include "FWCore/Framework/interface/ESWatcher.h"
00029 #include "FWCore/Framework/interface/Frameworkfwd.h"
00030 #include "FWCore/Framework/interface/EDProducer.h"
00031 
00032 #include "FWCore/Framework/interface/Event.h"
00033 #include "FWCore/Framework/interface/MakerMacros.h"
00034 
00035 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00036 
00037 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00038 
00039 #include "MagneticField/Engine/interface/MagneticField.h"
00040 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00041 #include "RecoTracker/NuclearSeedGenerator/interface/TrajectoryToSeedMap.h"
00042 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
00043 
00044 #include "DataFormats/VertexReco/interface/NuclearInteraction.h"
00045 
00046 class NuclearVertexBuilder;
00047 class NuclearLikelihood;
00048 
00049 class NuclearInteractionEDProducer : public edm::EDProducer {
00050 
00051 public:
00052       typedef edm::RefVector<TrajectorySeedCollection> TrajectorySeedRefVector;
00053 
00054       explicit NuclearInteractionEDProducer(const edm::ParameterSet&);
00055       ~NuclearInteractionEDProducer();
00056 
00057    private:
00058       virtual void beginJob() ;
00059       virtual void produce(edm::Event&, const edm::EventSetup&);
00060       virtual void endJob();
00061 
00062       bool isInside( const reco::TrackRef& track, const TrajectorySeedRefVector& seeds);
00063       void findAdditionalSecondaryTracks( reco::NuclearInteraction& nucl,
00064                                           const edm::Handle<reco::TrackCollection>& additionalSecTracks);
00065 
00066       // ----------member data ---------------------------
00067       edm::ParameterSet conf_;
00068       std::string primaryProducer_;
00069       std::string seedsProducer_;
00070       std::string secondaryProducer_;
00071       std::string additionalSecondaryProducer_;
00072 
00073       std::auto_ptr< NuclearVertexBuilder >  vertexBuilder;
00074       std::auto_ptr< NuclearLikelihood >     likelihoodCalculator;
00075 
00076   edm::ESWatcher<IdealMagneticFieldRecord> magFieldWatcher_;
00077   edm::ESWatcher<TransientTrackRecord> transientTrackWatcher_;
00078 
00079 };
00080 
00081 void print(std::ostringstream& str, const reco::NuclearInteraction& nucl, const std::auto_ptr< NuclearVertexBuilder >& builder);
00082 #endif