|
|
Go to the documentation of this file. 1 #ifndef DQMOFFLINE_TRIGGER_EGHLTDQMCUT
2 #define DQMOFFLINE_TRIGGER_EGHLTDQMCUT
66 if (((
obj.*cutCodeFunc_)() & cutsToPass_) == 0)
73 template <
class T,
class Key>
89 template <
class T,
class Key>
91 if (((
obj.*cutCodeFunc_)(key_)&cutsNotToMask_) == 0)
97 template <
class T,
typename varType>
119 std::vector<const EgHLTDQMCut<T>*>
cuts_;
125 for (
size_t i = 0;
i <
cuts_.size();
i++)
140 for (
size_t cutNr = 0; cutNr < rhs.
cuts_.size(); cutNr++) {
141 cuts_.push_back(rhs.
cuts_[cutNr]->clone());
147 if (
typeid(*inputCut) ==
typeid(
EgMultiCut)) {
148 edm::LogError(
"EgMultiCut") <<
" Error can not currently load an EgMultiCut inside a EgMultiCut, the practical "
149 "upshot is that the selection you think is being loaded isnt ";
150 }
else if (inputCut ==
nullptr) {
151 edm::LogError(
"EgMultiCut") <<
"Error, cut being loaded is null, ignoring";
153 cuts_.push_back(inputCut);
159 for (
size_t i = 0;
i < cuts_.size();
i++) {
160 if (!cuts_[
i]->pass(
obj, evt))
201 bool passResult = passLogic_ == AND ? passMasked == bitsToPass_ : passMasked != 0x0;
202 bool failResult = failLogic_ == AND ? failMasked == bitsToFail_ : failMasked != 0x0;
203 if (bitsToFail_ == 0x0)
205 return passResult && !failResult;
232 return passLogic_ == AND ? passMasked == bitsToPass_ : passMasked != 0x0;
278 int (
T::*probeCutCodeFunc)()
const,
280 int (
OffEle::*tagCutCodeFunc)()
const,
299 const std::vector<OffEle>& eles = evt.
eles();
301 for (
const auto& ele : eles) {
302 if (((ele.*tagCutCodeFunc_)() & tagCutCode_) == 0x0) {
313 if (((
obj.*probeCutCodeFunc_)() & probeCutCode_) == 0x0) {
315 if (
mass > minMass_ &&
mass < maxMass_)
341 const std::vector<OffEle>& eles = evt.
eles();
342 for (
const auto& ele : eles) {
343 if (((ele.*probeCutCodeFunc_)() & probeCutCode_) == 0x0) {
348 const std::vector<reco::CaloJet>&
jets = evt.
jets();
353 if (
dPhi > minDPhi_ &&
dPhi < maxDPhi_)
358 return nrProbes == 1 && b2bJet;
378 const std::vector<reco::CaloJet>&
jets = evt.
jets();
383 if (
dPhi > minDPhi_ &&
dPhi < maxDPhi_ && fabs(1 -
jet.pt() /
obj.pt()) < ptRelDiff_)
423 const std::vector<OffEle>& eles = evt.
eles();
424 for (
const auto& ele : eles) {
426 int diEleCutCode = (
obj.*cutCodeFunc_)(key_) | (ele.*cutCodeFunc_)(key_);
427 if ((diEleCutCode & cutsNotToMask_) == 0x0)
467 const std::vector<OffPho>& phos = evt.
phos();
468 for (
const auto& pho : phos) {
471 int diPhoCutCode = (
obj.*cutCodeFunc_)(key_) | (pho.*cutCodeFunc_)(key_);
472 if ((diPhoCutCode & cutsNotToMask_) == 0x0)
494 int (
OffEle::*cutCodeFunc)()
const,
520 int (
OffEle::*cutCodeFunc)()
const,
548 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