16 return (fabs(eta) < 1.479) == (
barrel_) ?
veto_->veto(eta, phi, value) :
false;
29 if (fabs(vetoDir_.eta()) < 1.479) {
30 return (vetoDir_.deltaR(
Direction(eta, phi)) < 0.0174 * iR_);
32 return (vetoDir_.deltaR(
Direction(eta, phi)) < 0.00864 * fabs(sinh(eta)) * iR_);
45 : vetoDir_(dir.
eta(), dir.phi()), iEta_(iEta), iPhi_(iPhi) {}
47 : vetoDir_(dir.
eta(), dir.phi()), iEta_(iEta), iPhi_(iPhi) {}
49 double dPhi = phi - vetoDir_.phi();
50 double dEta = eta - vetoDir_.eta();
55 if (fabs(vetoDir_.eta()) < 1.479) {
56 return ((fabs(dEta) < 0.0174 * iEta_) && (fabs(dPhi) < 0.0174 * iPhi_));
58 return ((fabs(dEta) < 0.00864 * fabs(sinh(eta)) * iEta_) && (fabs(dPhi) < 0.00864 * fabs(sinh(eta)) * iPhi_));
74 std::unique_ptr<reco::isodeposit::AbsVeto>
ret(
make(
string, evdep, iC));
75 if (evdep !=
nullptr) {
76 throw cms::Exception(
"Configuration") <<
"The resulting AbsVeto depends on the edm::Event.\n" 77 <<
"Please use the two-arguments IsoDepositVetoFactory::make.\n";
86 static const std::regex ecalSwitch(
"^Ecal(Barrel|Endcaps):(.*)"),
threshold(
"Threshold\\((\\d+\\.\\d+)\\)"),
87 thresholdtransverse(
"ThresholdFromTransverse\\((\\d+\\.\\d+)\\)"),
88 absthreshold(
"AbsThreshold\\((\\d+\\.\\d+)\\)"),
89 absthresholdtransverse(
"AbsThresholdFromTransverse\\((\\d+\\.\\d+)\\)"), cone(
"ConeVeto\\((\\d+\\.\\d+)\\)"),
90 angleCone(
"AngleCone\\((\\d+\\.\\d+)\\)"), angleVeto(
"AngleVeto\\((\\d+\\.\\d+)\\)"),
91 rectangularEtaPhiVeto(
92 "RectangularEtaPhiVeto\\(([+-]?\\d+\\.\\d+),([+-]?\\d+\\.\\d+),([+-]?\\d+\\.\\d+),([+-]?\\d+\\.\\d+)\\)"),
93 numCrystal(
"NumCrystalVeto\\((\\d+\\.\\d+)\\)"),
94 numCrystalEtaPhi(
"NumCrystalEtaPhiVeto\\((\\d+\\.\\d+),(\\d+\\.\\d+)\\)"),
95 otherCandidatesDR(
"OtherCandidatesByDR\\((\\w+:?\\w*:?\\w*),\\s*(\\d+\\.?|\\d*\\.\\d*)\\)"),
96 otherJetConstituentsDR(
97 "OtherJetConstituentsDeltaRVeto\\((\\w+:?\\w*:?\\w*),\\s*(\\d+\\.?|\\d*\\.\\d*),\\s*(\\w+:?\\w*:?\\w*),\\s*(" 98 "\\d+\\.?|\\d*\\.\\d*)\\)"),
99 otherCand(
"^(.*?):(.*)"),
number(
"^(\\d+\\.?|\\d*\\.\\d*)$");
103 if (regex_match(
string, match, ecalSwitch)) {
105 }
else if (regex_match(
string, match,
threshold)) {
107 }
else if (regex_match(
string, match, thresholdtransverse)) {
109 }
else if (regex_match(
string, match, absthreshold)) {
111 }
else if (regex_match(
string, match, absthresholdtransverse)) {
113 }
else if (regex_match(
string, match, cone)) {
115 }
else if (regex_match(
string, match, number)) {
117 }
else if (regex_match(
string, match, angleCone)) {
119 }
else if (regex_match(
string, match, angleVeto)) {
121 }
else if (regex_match(
string, match, rectangularEtaPhiVeto)) {
123 Direction(), atof(match[1].
first), atof(match[2].first), atof(match[3].first), atof(match[4].first));
124 }
else if (regex_match(
string, match, numCrystal)) {
126 }
else if (regex_match(
string, match, numCrystalEtaPhi)) {
128 }
else if (regex_match(
string, match, otherCandidatesDR)) {
132 }
else if (regex_match(
string, match, otherJetConstituentsDR)) {
137 }
else if (regex_match(
string, match, otherCand)) {
142 throw cms::Exception(
"Not Implemented") <<
"Veto " <<
string <<
" not implemented yet...";
static reco::isodeposit::AbsVeto * make(const char *string, edm::ConsumesCollector &iC)
void centerOn(double eta, double phi) override
void centerOn(double eta, double phi) override
ret
prodAgent to be discontinued
S make(const edm::ParameterSet &cfg)
std::unique_ptr< AbsVeto > veto_
NumCrystalEtaPhiVeto(const math::XYZVectorD &dir, double iEta, double iPhi)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
bool veto(double eta, double phi, float value) const override
Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum...
NumCrystalEtaPhiVeto(Direction dir, double iEta, double iPhi)
void centerOn(double eta, double phi) override
bool veto(double eta, double phi, float value) const override
Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum...
bool veto(double eta, double phi, float value) const override
Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum...
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
NumCrystalVeto(Direction dir, double iR)
SwitchingEcalVeto(AbsVeto *veto, bool isBarrel)