Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonIsolation_PixelTrackExtractor_H
0002 #define MuonIsolation_PixelTrackExtractor_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 "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
0013 #include "DataFormats/Common/interface/View.h"
0014 #include "DataFormats/TrackReco/interface/Track.h"
0015 #include "MagneticField/Engine/interface/MagneticField.h"
0016 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0017 
0018 namespace muonisolation {
0019 
0020   class PixelTrackExtractor : public reco::isodeposit::IsoDepositExtractor {
0021   public:
0022     PixelTrackExtractor(){};
0023     PixelTrackExtractor(const edm::ParameterSet& par, edm::ConsumesCollector&& iC);
0024 
0025     ~PixelTrackExtractor() override {}
0026 
0027     void fillVetos(const edm::Event& ev, const edm::EventSetup& evSetup, const reco::TrackCollection& track) override {}
0028 
0029     virtual reco::IsoDeposit::Vetos vetos(const edm::Event& ev,
0030                                           const edm::EventSetup& evSetup,
0031                                           const reco::Track& track) const;
0032 
0033     reco::IsoDeposit deposit(const edm::Event& ev,
0034                              const edm::EventSetup& evSetup,
0035                              const reco::Track& muon) const override;
0036 
0037   private:
0038     reco::IsoDeposit::Veto veto(const reco::IsoDeposit::Direction& dir) const;
0039 
0040     reco::isodeposit::Direction directionAtPresetRadius(const reco::Track& tk, double bz) const;
0041 
0042   private:
0043     // Parameter set
0044     edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theFieldToken;
0045     edm::EDGetTokenT<reco::TrackCollection> theTrackCollectionToken;  //! Track Collection Token
0046     std::string theDepositLabel;                                      //! name for deposit
0047     double theDiff_r;                                                 //! transverse distance to vertex
0048     double theDiff_z;                                                 //! z distance to vertex
0049     double theDR_Max;                                                 //! Maximum cone angle for deposits
0050     double theDR_Veto;                                                //! Veto cone angle
0051     std::string theBeamlineOption;                                    //! "NONE", "BeamSpotFromEvent"
0052     edm::EDGetTokenT<reco::BeamSpot> theBeamSpotToken;                //! BeamSpot name
0053     unsigned int theNHits_Min;                                        //! trk.numberOfValidHits >= theNHits_Min
0054     double theChi2Ndof_Max;                                           //! trk.normalizedChi2 < theChi2Ndof_Max
0055     double theChi2Prob_Min;  //! ChiSquaredProbability(trk.chi2,trk.ndof) > theChi2Prob_Min
0056     double thePt_Min;        //! min track pt to include into iso deposit
0057 
0058     bool thePropagateTracksToRadius;  //! If set to true will compare track eta-phi at ...
0059     double theReferenceRadius;        //! ... this radius
0060 
0061     bool theVetoLeadingTrack;  //! will veto leading track if
0062     double thePtVeto_Min;      //! .. it is above this threshold
0063     double theDR_VetoPt;       //!.. and is inside this cone
0064   };
0065 
0066 }  // namespace muonisolation
0067 
0068 #endif