File indexing completed on 2024-04-06 12:05:07
0001 #ifndef DataFormats_MuonReco_IsoDepositVetos_h
0002 #define DataFormats_MuonReco_IsoDepositVetos_h
0003
0004 #include "DataFormats/Math/interface/Vector3D.h"
0005 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0006
0007 namespace reco {
0008 namespace isodeposit {
0009 class ConeVeto : public AbsVeto {
0010 public:
0011 ConeVeto(Direction dir, double dr) : vetoDir_(dir), dR2_(dr * dr) {}
0012 ConeVeto(const reco::IsoDeposit::Veto& veto) : vetoDir_(veto.vetoDir), dR2_(veto.dR * veto.dR) {}
0013 bool veto(double eta, double phi, float value) const override;
0014 void centerOn(double eta, double phi) override;
0015
0016 private:
0017 Direction vetoDir_;
0018 float dR2_;
0019 };
0020
0021 class ThresholdVeto : public AbsVeto {
0022 public:
0023 ThresholdVeto(double threshold) : threshold_(threshold) {}
0024 bool veto(double eta, double phi, float value) const override;
0025 void centerOn(double eta, double phi) override;
0026
0027 private:
0028 float threshold_;
0029 };
0030
0031 class ThresholdVetoFromTransverse : public AbsVeto {
0032 public:
0033 ThresholdVetoFromTransverse(double threshold) : threshold_(threshold) {}
0034 bool veto(double eta, double phi, float value) const override;
0035 void centerOn(double eta, double phi) override;
0036
0037 private:
0038 float threshold_;
0039 };
0040
0041 class AbsThresholdVeto : public AbsVeto {
0042 public:
0043 AbsThresholdVeto(double threshold) : threshold_(threshold) {}
0044 bool veto(double eta, double phi, float value) const override;
0045 void centerOn(double eta, double phi) override;
0046
0047 private:
0048 float threshold_;
0049 };
0050
0051 class AbsThresholdVetoFromTransverse : public AbsVeto {
0052 public:
0053 AbsThresholdVetoFromTransverse(double threshold) : threshold_(threshold) {}
0054 bool veto(double eta, double phi, float value) const override;
0055 void centerOn(double eta, double phi) override;
0056
0057 private:
0058 float threshold_;
0059 };
0060
0061 class ConeThresholdVeto : public AbsVeto {
0062 public:
0063 ConeThresholdVeto(Direction dir, double dr, double threshold)
0064 : vetoDir_(dir), dR2_(dr * dr), threshold_(threshold) {}
0065 bool veto(double eta, double phi, float value) const override;
0066 void centerOn(double eta, double phi) override;
0067
0068 private:
0069 Direction vetoDir_;
0070 float dR2_;
0071 float threshold_;
0072 };
0073
0074 class AngleConeVeto : public AbsVeto {
0075 public:
0076 AngleConeVeto(const math::XYZVectorD& dir, double angle);
0077 AngleConeVeto(Direction dir, double angle);
0078 bool veto(double eta, double phi, float value) const override;
0079 void centerOn(double eta, double phi) override;
0080
0081 private:
0082 math::XYZVectorD vetoDir_;
0083 float cosTheta_;
0084 };
0085
0086 class AngleCone : public AbsVeto {
0087 public:
0088 AngleCone(const math::XYZVectorD& dir, double angle);
0089 AngleCone(Direction dir, double angle);
0090 bool veto(double eta, double phi, float value) const override;
0091 void centerOn(double eta, double phi) override;
0092
0093 private:
0094 math::XYZVectorD coneDir_;
0095 float cosTheta_;
0096 };
0097
0098 class RectangularEtaPhiVeto : public AbsVeto {
0099 public:
0100 RectangularEtaPhiVeto(const math::XYZVectorD& dir, double etaMin, double etaMax, double phiMin, double phiMax);
0101 RectangularEtaPhiVeto(Direction dir, double etaMin, double etaMax, double phiMin, double phiMax);
0102 bool veto(double eta, double phi, float value) const override;
0103 void centerOn(double eta, double phi) override;
0104
0105 private:
0106 Direction vetoDir_;
0107 double etaMin_, etaMax_, phiMin_, phiMax_;
0108 };
0109
0110 }
0111 }
0112 #endif