Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:36

0001 #ifndef RecoParticleFlow_PFTracking_ConvBremPFTrackFinder_H
0002 #define RecoParticleFlow_PFTracking_ConvBremPFTrackFinder_H
0003 // user include files
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/MakerMacros.h"
0008 #include "DataFormats/Common/interface/Handle.h"
0009 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
0010 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h"
0011 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
0012 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
0013 #include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrack.h"
0014 #include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrackFwd.h"
0015 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0016 #include "DataFormats/VertexReco/interface/Vertex.h"
0017 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0018 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedTrackerVertex.h"
0019 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexFwd.h"
0020 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertex.h"
0021 #include "DataFormats/ParticleFlowReco/interface/PFConversionFwd.h"
0022 #include "DataFormats/ParticleFlowReco/interface/PFConversion.h"
0023 #include "DataFormats/ParticleFlowReco/interface/PFV0Fwd.h"
0024 #include "DataFormats/ParticleFlowReco/interface/PFV0.h"
0025 #include "TMVA/Reader.h"
0026 
0027 #include "CondFormats/GBRForest/interface/GBRForest.h"
0028 #include <memory>
0029 
0030 #include "RecoParticleFlow/PFTracking/interface/ConvBremHeavyObjectCache.h"
0031 
0032 class PFEnergyCalibration;
0033 
0034 class ConvBremPFTrackFinder {
0035 public:
0036   ConvBremPFTrackFinder(const TransientTrackBuilder& builder,
0037                         double mvaBremConvCutBarrelLowPt,
0038                         double mvaBremConvCutBarrelHighPt,
0039                         double mvaBremConvCutEndcapsLowPt,
0040                         double mvaBremConvCutEndcapsHighPt);
0041   ~ConvBremPFTrackFinder();
0042 
0043   bool foundConvBremPFRecTrack(const edm::Handle<reco::PFRecTrackCollection>& thePfRecTrackCol,
0044                                const edm::Handle<reco::VertexCollection>& primaryVertex,
0045                                const edm::Handle<reco::PFDisplacedTrackerVertexCollection>& pfNuclears,
0046                                const edm::Handle<reco::PFConversionCollection>& pfConversions,
0047                                const edm::Handle<reco::PFV0Collection>& pfV0,
0048                                const convbremhelpers::HeavyObjectCache* cache,
0049                                bool useNuclear,
0050                                bool useConversions,
0051                                bool useV0,
0052                                const reco::PFClusterCollection& theEClus,
0053                                const reco::GsfPFRecTrack& gsfpfrectk) {
0054     found_ = false;
0055     runConvBremFinder(thePfRecTrackCol,
0056                       primaryVertex,
0057                       pfNuclears,
0058                       pfConversions,
0059                       pfV0,
0060                       cache,
0061                       useNuclear,
0062                       useConversions,
0063                       useV0,
0064                       theEClus,
0065                       gsfpfrectk);
0066     return found_;
0067   };
0068 
0069   const std::vector<reco::PFRecTrackRef>& getConvBremPFRecTracks() { return pfRecTrRef_vec_; };
0070 
0071 private:
0072   void runConvBremFinder(const edm::Handle<reco::PFRecTrackCollection>& thePfRecTrackCol,
0073                          const edm::Handle<reco::VertexCollection>& primaryVertex,
0074                          const edm::Handle<reco::PFDisplacedTrackerVertexCollection>& pfNuclears,
0075                          const edm::Handle<reco::PFConversionCollection>& pfConversions,
0076                          const edm::Handle<reco::PFV0Collection>& pfV0,
0077                          const convbremhelpers::HeavyObjectCache* cache,
0078                          bool useNuclear,
0079                          bool useConversions,
0080                          bool useV0,
0081                          const reco::PFClusterCollection& theEClus,
0082                          const reco::GsfPFRecTrack& gsfpfrectk);
0083 
0084   bool found_;
0085   TransientTrackBuilder builder_;
0086   double mvaBremConvCutBarrelLowPt_, mvaBremConvCutBarrelHighPt_, mvaBremConvCutEndcapsLowPt_,
0087       mvaBremConvCutEndcapsHighPt_;
0088 
0089   std::vector<reco::PFRecTrackRef> pfRecTrRef_vec_;
0090   float secR, secPout, ptRatioGsfKF, sTIP, Epout, detaBremKF, secPin;
0091   //int nHITS1;
0092   float nHITS1;
0093 };
0094 #endif