Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonIsolation_TrackExtractor_H
0002 #define MuonIsolation_TrackExtractor_H
0003 
0004 #include <string>
0005 #include <vector>
0006 
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 
0009 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0010 #include "DataFormats/TrackReco/interface/Track.h"
0011 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0012 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0013 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
0014 #include "DataFormats/Common/interface/View.h"
0015 
0016 namespace muonisolation {
0017 
0018   class TrackExtractor : public reco::isodeposit::IsoDepositExtractor {
0019   public:
0020     TrackExtractor(){};
0021     TrackExtractor(const edm::ParameterSet& par, edm::ConsumesCollector&& iC);
0022 
0023     ~TrackExtractor() override {}
0024 
0025     void fillVetos(const edm::Event& ev, const edm::EventSetup& evSetup, const reco::TrackCollection& track) override {}
0026 
0027     virtual reco::IsoDeposit::Vetos vetos(const edm::Event& ev,
0028                                           const edm::EventSetup& evSetup,
0029                                           const reco::Track& track) const;
0030 
0031     reco::IsoDeposit deposit(const edm::Event& ev,
0032                              const edm::EventSetup& evSetup,
0033                              const reco::Track& muon) const override;
0034 
0035   private:
0036     reco::IsoDeposit::Veto veto(const reco::IsoDeposit::Direction& dir) const;
0037 
0038   private:
0039     // Parameter set
0040     edm::EDGetTokenT<reco::TrackCollection> theTrackCollectionToken;  //! Track Collection Label
0041     std::string theDepositLabel;                                      //! name for deposit
0042     double theDiff_r;                                                 //! transverse distance to vertex
0043     double theDiff_z;                                                 //! z distance to vertex
0044     double theDR_Max;                                                 //! Maximum cone angle for deposits
0045     double theDR_Veto;                                                //! Veto cone angle
0046     std::string theBeamlineOption;                                    //! "NONE", "BeamSpotFromEvent"
0047     edm::EDGetTokenT<reco::BeamSpot> theBeamSpotToken;                //! BeamSpot name
0048     unsigned int theNHits_Min;                                        //! trk.numberOfValidHits >= theNHits_Min
0049     double theChi2Ndof_Max;                                           //! trk.normalizedChi2 < theChi2Ndof_Max
0050     double theChi2Prob_Min;  //! ChiSquaredProbability(trk.chi2,trk.ndof) > theChi2Prob_Min
0051     double thePt_Min;        //! min track pt to include into iso deposit
0052   };
0053 
0054 }  // namespace muonisolation
0055 
0056 #endif