CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoParticleFlow/PFSimProducer/plugins/ConvBremSeedProducer.h

Go to the documentation of this file.
00001 #include <memory>
00002 
00003 // user include files
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/EDProducer.h"
00006 
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/MakerMacros.h"
00009 
00010 
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 
00013 //COLLECTION
00014 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00015 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00016 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00017 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00018 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
00019 
00020 
00022 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
00023 
00024 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00025 #include "FastSimulation/BaseParticlePropagator/interface/BaseParticlePropagator.h"
00026 
00027 
00028 class DetLayer;
00029 class TrajectoryStateOnSurface;
00030 class ParticlePropagator;
00031 class TrackerLayer;
00032 class MagneticField;
00033 class TrackerInteractionGeometry;
00034 class TrackerGeometry;
00035 class MagneticFieldMap;
00036 class PropagatorWithMaterial;
00037 class KFUpdator;
00038 class TransientTrackingRecHitBuilder;
00039 class TrajectoryStateTransform;
00040 
00041 class ConvBremSeedProducer : public edm::EDProducer {
00042   typedef SiStripRecHit2DCollection::const_iterator StDetMatch;
00043   typedef SiPixelRecHitCollection::const_iterator PiDetMatch;
00044   typedef SiStripMatchedRecHit2DCollection::const_iterator MatDetMatch;
00045   typedef SiStripRecHit2DCollection::DetSet        StDetSet;
00046   typedef SiPixelRecHitCollection::DetSet          PiDetSet;
00047   typedef SiStripMatchedRecHit2DCollection::DetSet MatDetSet;
00048   typedef GeometricSearchDet::DetWithState   DetWithState;
00049  
00050  public:
00051   explicit ConvBremSeedProducer(const edm::ParameterSet&);
00052   ~ConvBremSeedProducer();
00053   
00054  private:
00055   virtual void beginRun(edm::Run&,const edm::EventSetup&) ;
00056   virtual void produce(edm::Event&, const edm::EventSetup&);
00057   virtual void endRun() ;
00058   void initializeLayerMap();
00059   std::vector<const DetLayer*>                theLayerMap;
00060   TrajectoryStateOnSurface makeTrajectoryState( const DetLayer* layer, 
00061                                                 const ParticlePropagator& pp,
00062                                                 const MagneticField* field) const;
00063   const DetLayer* detLayer( const TrackerLayer& layer, float zpos) const;
00064 
00065   bool isGsfTrack(TrackingRecHitRefVector, const TrackingRecHit *);
00066 
00067   int GoodCluster(BaseParticlePropagator bpg, const reco::PFClusterCollection& pfc, 
00068                   float minep, bool sec=false);
00069 
00070   std::vector <bool> sharedHits( std::vector<std::pair< TrajectorySeed, 
00071                                  std::pair<GlobalVector,float> > >);
00072 
00073   edm::ParameterSet                           conf_;
00074   const GeometricSearchTracker*               geomSearchTracker_;
00075   const TrackerInteractionGeometry*           geometry_;
00076   const TrackerGeometry*                      tracker_;
00077   const MagneticField*                        magfield_;
00078   const MagneticFieldMap*                     fieldMap_;
00079   const PropagatorWithMaterial*               propagator_;
00080   const KFUpdator*                            kfUpdator_;
00081   const TransientTrackingRecHitBuilder*       hitBuilder_;
00082   const TrajectoryStateTransform*             transformer_;
00083   std::vector<const DetLayer*>                layerMap_;
00084   int                                         negLayerOffset_;
00086   math::XYZVector B_;
00087 
00088 };