|
|
Go to the documentation of this file. 1 #ifndef DQMOFFLINE_TRIGGER_EGHLTDQMCUT
2 #define DQMOFFLINE_TRIGGER_EGHLTDQMCUT
65 if (((
obj.*cutCodeFunc_)() & cutsToPass_) == 0)
72 template <
class T,
class Key>
88 template <
class T,
class Key>
90 if (((
obj.*cutCodeFunc_)(key_)&cutsNotToMask_) == 0)
96 template <
class T,
typename varType>
118 std::vector<const EgHLTDQMCut<T>*>
cuts_;
124 for (
size_t i = 0;
i <
cuts_.size();
i++)
139 for (
size_t cutNr = 0; cutNr < rhs.
cuts_.size(); cutNr++) {
140 cuts_.push_back(rhs.
cuts_[cutNr]->clone());
146 if (
typeid(*inputCut) ==
typeid(
EgMultiCut)) {
147 edm::LogError(
"EgMultiCut") <<
" Error can not currently load an EgMultiCut inside a EgMultiCut, the practical "
148 "upshot is that the selection you think is being loaded isnt ";
149 }
else if (inputCut ==
nullptr) {
150 edm::LogError(
"EgMultiCut") <<
"Error, cut being loaded is null, ignoring";
152 cuts_.push_back(inputCut);
158 for (
size_t i = 0;
i < cuts_.size();
i++) {
159 if (!cuts_[
i]->pass(
obj, evt))
200 bool passResult = passLogic_ == AND ? passMasked == bitsToPass_ : passMasked != 0x0;
201 bool failResult = failLogic_ == AND ? failMasked == bitsToFail_ : failMasked != 0x0;
202 if (bitsToFail_ == 0x0)
204 return passResult && !failResult;
231 return passLogic_ == AND ? passMasked == bitsToPass_ : passMasked != 0x0;
277 int (
T::*probeCutCodeFunc)()
const,
279 int (
OffEle::*tagCutCodeFunc)()
const,
298 const std::vector<OffEle>& eles = evt.
eles();
300 for (
const auto& ele : eles) {
301 if (((ele.*tagCutCodeFunc_)() & tagCutCode_) == 0x0) {
312 if (((
obj.*probeCutCodeFunc_)() & probeCutCode_) == 0x0) {
314 if (
mass > minMass_ &&
mass < maxMass_)
340 const std::vector<OffEle>& eles = evt.
eles();
341 for (
const auto& ele : eles) {
342 if (((ele.*probeCutCodeFunc_)() & probeCutCode_) == 0x0) {
347 const std::vector<reco::CaloJet>&
jets = evt.
jets();
352 if (
dPhi > minDPhi_ &&
dPhi < maxDPhi_)
357 return nrProbes == 1 && b2bJet;
377 const std::vector<reco::CaloJet>&
jets = evt.
jets();
382 if (
dPhi > minDPhi_ &&
dPhi < maxDPhi_ && fabs(1 -
jet.pt() /
obj.pt()) < ptRelDiff_)
422 const std::vector<OffEle>& eles = evt.
eles();
423 for (
const auto& ele : eles) {
425 int diEleCutCode = (
obj.*cutCodeFunc_)(key_) | (ele.*cutCodeFunc_)(key_);
426 if ((diEleCutCode & cutsNotToMask_) == 0x0)
466 const std::vector<OffPho>& phos = evt.
phos();
467 for (
const auto& pho : phos) {
470 int diPhoCutCode = (
obj.*cutCodeFunc_)(key_) | (pho.*cutCodeFunc_)(key_);
471 if ((diPhoCutCode & cutsNotToMask_) == 0x0)
493 int (
OffEle::*cutCodeFunc)()
const,
519 int (
OffEle::*cutCodeFunc)()
const,
547 int (
OffPho::*cutCodeFunc)()
const,
varType(T::* varFunc_)() const
bool pass(const OffPho &obj, const OffEvt &evt) const override
EgDiEleCut(int cutCode, int(OffEle::*cutCodeFunc)() const)
bool pass(const T &obj, const OffEvt &evt) const override
bool pass(const T &obj, const OffEvt &evt) const
bool pass(const T &obj, const OffEvt &evt) const override
~EgTrigTagProbeCut_New() override=default
EgHLTDQMCut< OffPho > * clone() const override
TrigCodes::TrigBitSet bitsToPass_
constexpr double deltaPhi(double phi1, double phi2)
const std::vector< OffPho > & phos() const
EgJetTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, float minDPhi=-M_PI, float maxDPhi=M_PI)
EgDiPhoCut(int cutCode, int(OffPho::*cutCodeFunc)() const)
EgJetB2BCut(float minDPhi=-M_PI, float maxDPhi=M_PI, float ptRelDiff=999)
TrigCodes::TrigBitSet bit1ToPass_
EgHLTDQMCut< T > * clone() const override
EgHLTDQMVarCut(int cutsToPass, int(T::*cutCodeFunc)() const)
EgHLTDQMCut< T > * clone() const override
EgHLTDQMCut< T > * clone() const override
EgMultiCut< T > & operator<<(const EgHLTDQMCut< T > *inputCut)
int(T::* probeCutCodeFunc_)() const
EgTrigTagProbeCut(TrigCodes::TrigBitSet bitsToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
bool pass(const T &obj, const OffEvt &evt) const override
EgHLTDQMCut< T > * clone() const override
int(OffEle::* cutCodeFunc_)() const
const std::vector< reco::CaloJet > & jets() const
EgEvtTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR)
EgHLTDQMCut< T > * clone() const override
bool pass(const T &obj, const OffEvt &evt) const
TrigCodes::TrigBitSet bit2ToPass_
~EgDiPhoUserCut() override=default
TrigCodes::TrigBitSet evtTrigBits() const
~EgHLTDQMUserVarCut() override=default
int(OffPho::* cutCodeFunc_)() const
std::bitset< maxNrBits_ > TrigBitSet
int(OffEle::* cutCodeFunc_)() const
int(OffPho::* cutCodeFunc_)(const Key &) const
bool pass(const OffEle &obj, const OffEvt &evt) const override
EgDiPhoUserCut(int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
~ChargeCut() override=default
bool pass(const T &obj, const OffEvt &evt) const override
EgHLTDQMCut< OffEle > * clone() const override
EgHLTDQMCut< OffPho > * clone() const override
bool pass(const OffEle &ele, const OffEvt &evt) const override
EgHLTDQMCut< T > * clone() const override
int(T::* cutCodeFunc_)() const
int(OffEle::* cutCodeFunc_)(const Key &) const
int(OffEle::* cutCodeFunc_)() const
bool pass(const T &obj, const OffEvt &evt) const override
EgHLTDQMUserVarCut(int(T::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
EgHLTDQMCut< T > * clone() const override
TrigCodes::TrigBitSet bit2ToPass_
EgHLTDQMCut< T > * clone() const override
EgTrigTagProbeCut_New(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
TrigCodes::TrigBitSet bitsToPass_
EgNotCut(EgHLTDQMCut< T > *cut)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
EgHLTDQMCut< T > * clone() const
~EgTrigTagProbeCut_NewPho() override=default
EgTrigTagProbeCut_NewPho(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffPho::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
EgObjTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=TrigCodes::TrigBitSet(), CutLogic failLogic=AND)
int(OffEle::* probeCutCodeFunc_)() const
EgTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, int tagCutCode, int(OffEle::*tagCutCodeFunc)() const, float minMass=81., float maxMass=101.)
~EgDiEleUserCut() override=default
bool pass(const T &obj, const OffEvt &evt) const
int(OffEle::* tagCutCodeFunc_)() const
Log< level::Error, false > LogError
EgHLTDQMCut< T > * clone() const
virtual bool pass(const T &obj, const OffEvt &evt) const =0
EgGreaterCut(varType cutValue, varType(T::*varFunc)() const)
EgHLTDQMCut< T > * clone() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
EgHLTDQMCut & operator=(const EgHLTDQMCut &rhs)
TrigCodes::TrigBitSet bitsToPass_
TrigCodes::TrigBitSet bitsToFail_
int(OffPho::* cutCodeFunc_)() const
EgDiEleUserCut(int(OffEle::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
EgHLTDQMCut< OffEle > * clone() const override
~EgTrigTagProbeCut() override=default
bool pass(const OffEle &obj, const OffEvt &evt) const override
~EgTagProbeCut() override=default
bool pass(const T &obj, const OffEvt &evt) const override
bool pass(const T &obj, const OffEvt &evt) const override
bool pass(const OffPho &obj, const OffEvt &evt) const override
const std::vector< OffEle > & eles() const
bool pass(const OffEle &ele, const OffEvt &evt) const override
virtual ~EgHLTDQMCut()=default
bool pass(const T &obj, const OffEvt &evt) const override
int(T::* cutCodeFunc_)(const Key &) const
virtual EgHLTDQMCut< T > * clone() const =0
~EgObjTrigCut() override=default
~EgHLTDQMVarCut() override=default
EgHLTDQMCut< OffEle > * clone() const override
EgHLTDQMCut< OffEle > * clone() const override
EgHLTDQMCut< OffPho > * clone() const override
TrigCodes::TrigBitSet bit1ToPass_
EgNotCut(const EgNotCut< T > &rhs)
std::vector< const EgHLTDQMCut< T > * > cuts_
bool pass(const OffPho &pho, const OffEvt &evt) const override