CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoTracker/ConversionSeedGenerators/interface/PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.h

Go to the documentation of this file.
00001 #ifndef  PhotonConversionFinderFromTracks_H
00002 #define  PhotonConversionFinderFromTracks_H
00003 
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/EDAnalyzer.h"
00006 #include "FWCore/Framework/interface/Event.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 
00010 #include "RecoTracker/ConversionSeedGenerators/interface/SeedForPhotonConversion1Leg.h"
00011 #include "RecoTracker/TkSeedGenerator/interface/FastHelix.h"
00012 
00013 #include "RecoTracker/ConversionSeedGenerators/interface/IdealHelixParameters.h"
00014 
00015 #include "RecoTracker/ConversionSeedGenerators/interface/PrintRecoObjects.h"
00016 
00017 #include "DataFormats/VertexReco/interface/Vertex.h"
00018 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00019 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00020 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00021 
00022 #include "RecoTracker/ConversionSeedGenerators/interface/CombinedHitPairGeneratorForPhotonConversion.h"
00023 
00024 #include "RecoTracker/SpecialSeedGenerators/interface/ClusterChecker.h"
00025 #include "RecoTracker/TkTrackingRegions/plugins/GlobalTrackingRegionProducerFromBeamSpot.h"
00026 
00027 #include "sstream"
00028 #include "boost/foreach.hpp"
00029 
00030 inline bool lt_(std::pair<double,short> a, std::pair<double,short> b) { return a.first<b.first; }
00031 
00032 class PhotonConversionTrajectorySeedProducerFromSingleLegAlgo{
00033 
00034  
00035  public:
00036   
00037   PhotonConversionTrajectorySeedProducerFromSingleLegAlgo(const edm::ParameterSet &);
00038   ~PhotonConversionTrajectorySeedProducerFromSingleLegAlgo(){};
00039 
00040   void init();
00041   void clear();
00042 
00043   void analyze(const edm::Event & event, const edm::EventSetup & setup);
00044   IdealHelixParameters* getIdealHelixParameters(){return &_IdealHelixParameters;}
00045   TrajectorySeedCollection* getTrajectorySeedCollection(){return seedCollection;}
00046   TrajectorySeedCollection* getTrajectorySeedCollectionOfSourceTracks(){return seedCollectionOfSourceTracks;}
00047 
00048  private:
00049 
00050   void loopOnTracks();
00051   bool inspectTrack(const reco::Track* track, const TrackingRegion & region, math::XYZPoint& primaryVertexPoint);
00052 
00053   bool rejectTrack(const reco::Track& track);
00054 
00055   bool selectPriVtxCompatibleWithTrack(const reco::Track& tk, std::vector<reco::Vertex>& selectedPriVtxCompatibleWithTrack);
00056   void loopOnPriVtx(const reco::Track& tk, const std::vector<reco::Vertex>& selectedPriVtxCompatibleWithTrack);
00057 
00058   //Data Members
00059   const edm::ParameterSet _conf;
00060 
00061   TrajectorySeedCollection *seedCollection;
00062   TrajectorySeedCollection *seedCollectionOfSourceTracks;
00063   CombinedHitPairGeneratorForPhotonConversion * theHitsGenerator;
00064   SeedForPhotonConversion1Leg *theSeedCreator;
00065   GlobalTrackingRegionProducerFromBeamSpot* theRegionProducer;
00066 
00067 
00068   edm::ParameterSet hitsfactoryPSet,creatorPSet,regfactoryPSet;
00069 
00070   ClusterChecker theClusterCheck;
00071   bool theSilentOnClusterCheck;
00072 
00073   double _vtxMinDoF, _maxDZSigmas;
00074   size_t _maxNumSelVtx;
00075   bool   _applyTkVtxConstraint;
00076   size_t _countSeedTracks;
00077   edm::InputTag _primaryVtxInputTag, _beamSpotInputTag;
00078 
00079   typedef std::vector<TrackingRegion* > Regions;
00080   typedef Regions::const_iterator IR;
00081   Regions regions; 
00082 
00083   edm::Handle<TrajTrackAssociationCollection> trajTrackAssociations;
00084   edm::Handle<reco::TrackCollection> trackCollectionH;
00085 
00086   const edm::EventSetup* myEsetup;
00087   const edm::Event* myEvent;
00088 
00089   const MagneticField* magField;
00090   edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
00091   const reco::BeamSpot * theBeamSpot;
00092 
00093   IdealHelixParameters _IdealHelixParameters;
00094 
00095   edm::Handle<reco::VertexCollection> vertexHandle;
00096   reco::VertexCollection vertexCollection;
00097   reco::Vertex primaryVertex;
00098 
00099   PrintRecoObjects po;
00100 
00101   std::stringstream ss;
00102  
00103 };
00104 #endif