Go to the documentation of this file.00001 #ifndef RecoEgamma_EgammaPhotonProducers_ConvertedPhotonProducer_h
00002 #define RecoEgamma_EgammaPhotonProducers_ConvertedPhotonProducer_h
00003
00013 #include "FWCore/Framework/interface/EDProducer.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 #include "FWCore/Framework/interface/ESHandle.h"
00018 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00019 #include "MagneticField/Engine/interface/MagneticField.h"
00020 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
00021 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00022 #include "TrackingTools/MeasurementDet/interface/LayerMeasurements.h"
00023 #include "TrackingTools/DetLayers/interface/NavigationSetter.h"
00024 #include "TrackingTools/DetLayers/interface/NavigationSchool.h"
00025 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
00026 #include "RecoTracker/TkNavigation/interface/SimpleNavigationSchool.h"
00027 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
00028 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00029 #include "DataFormats/Common/interface/View.h"
00030 #include "RecoEgamma/EgammaTools/interface/ConversionLikelihoodCalculator.h"
00031 #include "RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollections.h"
00032 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00033
00034 class ConversionTrackEcalImpactPoint;
00035 class ConversionTrackPairFinder;
00036 class ConversionVertexFinder;
00037 class ConvertedPhotonProducer : public edm::EDProducer {
00038
00039 public:
00040
00041 ConvertedPhotonProducer (const edm::ParameterSet& ps);
00042 ~ConvertedPhotonProducer();
00043
00044 virtual void beginRun (edm::Run& r, edm::EventSetup const & es);
00045 virtual void endRun (edm::Run& r, edm::EventSetup const & es);
00046 virtual void produce(edm::Event& evt, const edm::EventSetup& es);
00047 virtual void endJob();
00048
00049
00050 private:
00051
00052
00053
00054
00055
00056
00057 void buildCollections ( edm::EventSetup const & es,
00058 const edm::Handle<edm::View<reco::CaloCluster> > & scHandle,
00059 const edm::Handle<edm::View<reco::CaloCluster> > & bcHandle,
00060 const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
00061 const edm::Handle<reco::TrackCollection> & trkHandle,
00062 std::map<std::vector<reco::TransientTrack>, reco::CaloClusterPtr>& allPairs,
00063 reco::ConversionCollection & outputConvPhotonCollection);
00064 void cleanCollections (const edm::Handle<edm::View<reco::CaloCluster> > & scHandle,
00065 const edm::OrphanHandle<reco::ConversionCollection> & conversionHandle,
00066 reco::ConversionCollection & outputCollection);
00067
00068 std::vector<reco::ConversionRef> solveAmbiguity( const edm::OrphanHandle<reco::ConversionCollection> & conversionHandle, reco::CaloClusterPtr& sc);
00069
00070 float calculateMinApproachDistance ( const reco::TrackRef& track1, const reco::TrackRef& track2);
00071 void getCircleCenter(const reco::TrackRef& tk, double r, double& x0, double& y0);
00072
00073
00074 std::string conversionOITrackProducer_;
00075 std::string conversionIOTrackProducer_;
00076
00077
00078 std::string outInTrackSCAssociationCollection_;
00079 std::string inOutTrackSCAssociationCollection_;
00080
00081
00082 std::string ConvertedPhotonCollection_;
00083 std::string CleanedConvertedPhotonCollection_;
00084
00085 edm::InputTag bcBarrelCollection_;
00086 edm::InputTag bcEndcapCollection_;
00087 edm::InputTag scHybridBarrelProducer_;
00088 edm::InputTag scIslandEndcapProducer_;
00089 edm::ParameterSet conf_;
00090 edm::InputTag hcalTowers_;
00091
00092 edm::ESHandle<CaloGeometry> theCaloGeom_;
00093 edm::ESHandle<MagneticField> theMF_;
00094 edm::ESHandle<TransientTrackBuilder> theTransientTrackBuilder_;
00095
00096 ConversionTrackPairFinder* theTrackPairFinder_;
00097 ConversionVertexFinder* theVertexFinder_;
00098 ConversionTrackEcalImpactPoint* theEcalImpactPositionFinder_;
00099 int nEvt_;
00100 std::string algoName_;
00101
00102
00103 double hOverEConeSize_;
00104 double maxHOverE_;
00105 double minSCEt_;
00106 bool recoverOneTrackCase_;
00107 double dRForConversionRecovery_;
00108 double deltaCotCut_;
00109 double minApproachDisCut_;
00110 int maxNumOfCandidates_;
00111 bool risolveAmbiguity_;
00112
00113
00114 ConversionLikelihoodCalculator* theLikelihoodCalc_;
00115 std::string likelihoodWeights_;
00116
00117
00118
00119 };
00120 #endif