1 #ifndef DQMOFFLINE_TRIGGER_EGHLTDQMCUT
2 #define DQMOFFLINE_TRIGGER_EGHLTDQMCUT
66 if(((obj.*cutCodeFunc_)() & cutsToPass_)==0)
return true;
90 if(((obj.*cutCodeFunc_)(key_) & cutsNotToMask_)==0)
return true;
116 std::vector<const EgHLTDQMCut<T>*>
cuts_;
135 for(
size_t cutNr=0;cutNr<rhs.
cuts_.size();cutNr++){
136 cuts_.push_back(rhs.
cuts_[cutNr]->clone());
144 edm::LogError(
"EgMultiCut") <<
" Error can not currently load an EgMultiCut inside a EgMultiCut, the practical upshot is that the selection you think is being loaded isnt ";
145 }
else if(inputCut==
NULL){
146 edm::LogError(
"EgMultiCut") <<
"Error, cut being loaded is null, ignoring";
147 }
else cuts_.push_back(inputCut);
153 for(
size_t i=0;
i<cuts_.size();
i++){
154 if(!cuts_[
i]->pass(obj,evt))
return false;
191 bool passResult = passLogic_==
AND ? passMasked==bitsToPass_ : passMasked!=0x0;
192 bool failResult = failLogic_==
AND ? failMasked==bitsToFail_ : failMasked!=0x0;
193 if(bitsToFail_==0x0) failResult=
false;
194 return passResult && !failResult;
221 return passLogic_==
AND ? passMasked==bitsToPass_ : passMasked!=0x0;
262 EgTagProbeCut(
int probeCutCode,
int (
T::*probeCutCodeFunc)()
const,
int tagCutCode,
int (
OffEle::*tagCutCodeFunc)()
const,
float minMass=81.,
float maxMass=101.):
probeCutCode_(probeCutCode),
probeCutCodeFunc_(probeCutCodeFunc),
tagCutCode_(tagCutCode),
tagCutCodeFunc_(tagCutCodeFunc),
minMass_(
minMass),
maxMass_(
maxMass){}
273 const std::vector<OffEle>& eles = evt.
eles();
275 for(
size_t eleNr=0;eleNr<eles.size();eleNr++){
276 if( ((eles[eleNr].*tagCutCodeFunc_)() & tagCutCode_)==0x0){
278 if(
reco::deltaR2(obj.eta(),obj.phi(),eles[eleNr].eta(),eles[eleNr].phi())>0.1*0.1){
280 tagEle = &eles[eleNr];
285 if(((obj.*probeCutCodeFunc_)() & probeCutCode_)==0x0){
286 float mass = (obj.p4()+tagEle->
p4()).
mag();
287 if(mass>minMass_ && mass<maxMass_)
return true;
312 const std::vector<OffEle>& eles = evt.
eles();
313 for(
size_t eleNr=0;eleNr<eles.size();eleNr++){
314 if( ((eles[eleNr].*probeCutCodeFunc_)() & probeCutCode_)==0x0){
319 const std::vector<reco::CaloJet>&
jets =evt.
jets();
320 for(
size_t jetNr=0;jetNr<jets.size();jetNr++){
321 if(
reco::deltaR2(obj.eta(),obj.phi(),jets[jetNr].eta(),jets[jetNr].phi())>0.1*0.1){
323 if(dPhi>minDPhi_ && dPhi<maxDPhi_) b2bJet=
true;
327 return nrProbes==1 && b2bJet;
352 const std::vector<reco::CaloJet>&
jets =evt.
jets();
353 for(
size_t jetNr=0;jetNr<jets.size();jetNr++){
354 if(
reco::deltaR2(obj.eta(),obj.phi(),jets[jetNr].eta(),jets[jetNr].phi())>0.1*0.1){
356 if(dPhi>minDPhi_ && dPhi<maxDPhi_ && fabs(1-jets[jetNr].
pt()/obj.pt()) < ptRelDiff_) b2bJet=
true;
393 const std::vector<OffEle>& eles = evt.
eles();
394 for(
size_t eleNr=0;eleNr<eles.size();eleNr++){
395 if(&eles[eleNr]!=&obj){
396 int diEleCutCode = (obj.*cutCodeFunc_)(key_) | (eles[eleNr].*cutCodeFunc_)(key_);
397 if( (diEleCutCode & cutsNotToMask_)==0x0)
return true;
434 const std::vector<OffPho>& phos = evt.
phos();
435 for(
size_t phoNr=0;phoNr<phos.size();phoNr++){
436 if(&phos[phoNr]!=&obj){
438 int diPhoCutCode = (obj.*cutCodeFunc_)(key_) | (phos[phoNr].*cutCodeFunc_)(key_);
439 if( (diPhoCutCode & cutsNotToMask_)==0x0)
return true;
477 EgTrigTagProbeCut_New(
TrigCodes::TrigBitSet bit1ToPass,
TrigCodes::TrigBitSet bit2ToPass,
int cutCode,
int (
OffEle::*cutCodeFunc)()
const,
float minMass=81.,
float maxMass=101.):
bit1ToPass_(bit1ToPass),
bit2ToPass_(bit2ToPass),
cutCode_(cutCode),
cutCodeFunc_(cutCodeFunc),
minMass_(
minMass),
maxMass_(
maxMass){}
494 EgTrigTagProbeCut_NewPho(
TrigCodes::TrigBitSet bit1ToPass,
TrigCodes::TrigBitSet bit2ToPass,
int cutCode,
int (
OffPho::*cutCodeFunc)()
const,
float minMass=81.,
float maxMass=101.):
bit1ToPass_(bit1ToPass),
bit2ToPass_(bit2ToPass),
cutCode_(cutCode),
cutCodeFunc_(cutCodeFunc),
minMass_(
minMass),
maxMass_(
maxMass){}
std::vector< const EgHLTDQMCut< T > * > cuts_
bool pass(const OffPho &pho, const OffEvt &evt) const
EgHLTDQMCut< T > * clone() const
bool pass(const T &obj, const OffEvt &evt) const
bool pass(const T &obj, const OffEvt &evt) const
TrigCodes::TrigBitSet bit1ToPass_
EgHLTDQMCut< T > * clone() const
EgHLTDQMCut< OffEle > * clone() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual bool pass(const T &obj, const OffEvt &evt) const =0
bool pass(const T &obj, const OffEvt &evt) const
EgEvtTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR)
EgHLTDQMCut & operator=(const EgHLTDQMCut &rhs)
EgHLTDQMCut< T > * clone() const
EgHLTDQMCut< T > * clone() const
int(OffEle::* tagCutCodeFunc_)() const
int(T::* probeCutCodeFunc_)() const
bool pass(const T &obj, const OffEvt &evt) const
EgDiEleUserCut(int(OffEle::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
bool pass(const T &obj, const OffEvt &evt) const
EgDiPhoUserCut(int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
TrigCodes::TrigBitSet bit1ToPass_
EgHLTDQMCut< T > * clone() const
EgMultiCut< T > & operator<<(const EgHLTDQMCut< T > *inputCut)
varType(T::* varFunc_)() const
TrigCodes::TrigBitSet evtTrigBits() const
double dPhi(double phi1, double phi2)
bool pass(const T &obj, const OffEvt &evt) const
int(T::* cutCodeFunc_)(const Key &) const
bool pass(const OffEle &obj, const OffEvt &evt) const
int(OffEle::* cutCodeFunc_)() const
EgHLTDQMCut< OffEle > * clone() const
TrigCodes::TrigBitSet bit2ToPass_
EgHLTDQMCut< T > * clone() const
const std::vector< reco::CaloJet > & jets() const
double deltaR2(const T1 &t1, const T2 &t2)
TrigCodes::TrigBitSet bitsToPass_
int(OffEle::* probeCutCodeFunc_)() const
EgJetTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, float minDPhi=-M_PI, float maxDPhi=M_PI)
bool pass(const OffEle &obj, const OffEvt &evt) const
virtual EgHLTDQMCut< T > * clone() const =0
EgHLTDQMCut< OffPho > * clone() const
bool pass(const OffEle &ele, const OffEvt &evt) const
EgHLTDQMCut< OffPho > * clone() const
TrigCodes::TrigBitSet bitsToFail_
EgHLTDQMCut(const EgHLTDQMCut &rhs)
TrigCodes::TrigBitSet bitsToPass_
const std::vector< OffPho > & phos() const
EgNotCut(EgHLTDQMCut< T > *cut)
bool pass(const OffEle &ele, const OffEvt &evt) const
int(OffPho::* cutCodeFunc_)(const Key &) const
double deltaPhi(double phi1, double phi2)
EgJetB2BCut(float minDPhi=-M_PI, float maxDPhi=M_PI, float ptRelDiff=999)
EgTrigTagProbeCut_NewPho(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffPho::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
~EgTrigTagProbeCut_NewPho()
EgHLTDQMCut< T > * clone() const
EgTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, int tagCutCode, int(OffEle::*tagCutCodeFunc)() const, float minMass=81., float maxMass=101.)
EgObjTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=TrigCodes::TrigBitSet(), CutLogic failLogic=AND)
bool pass(const T &obj, const OffEvt &evt) const
EgHLTDQMCut< T > * clone() const
EgHLTDQMUserVarCut(int(T::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
bool pass(const T &obj, const OffEvt &evt) const
EgHLTDQMCut< OffEle > * clone() const
EgHLTDQMCut< T > * clone() const
EgHLTDQMCut< T > * clone() const
EgGreaterCut(varType cutValue, varType(T::*varFunc)() const)
EgHLTDQMCut< T > * clone() const
const std::vector< OffEle > & eles() const
int(OffEle::* cutCodeFunc_)(const Key &) const
bool pass(const OffPho &obj, const OffEvt &evt) const
TrigCodes::TrigBitSet bitsToPass_
bool AND(const TrackBaseRef &track, const RecoTauQualityCuts::TrackQCutFuncCollection &cuts)
int(OffEle::* cutCodeFunc_)() const
bool pass(const T &obj, const OffEvt &evt) const
EgTrigTagProbeCut(TrigCodes::TrigBitSet bitsToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
EgHLTDQMVarCut(int cutsToPass, int(T::*cutCodeFunc)() const)
bool pass(const T &obj, const OffEvt &evt) const
EgDiPhoCut(int cutCode, int(OffPho::*cutCodeFunc)() const)
EgNotCut(const EgNotCut< T > &rhs)
const math::XYZTLorentzVector & p4() const
bool pass(const T &obj, const OffEvt &evt) const
int(T::* cutCodeFunc_)() const
int(OffPho::* cutCodeFunc_)() const
int(OffEle::* cutCodeFunc_)() const
EgDiEleCut(int cutCode, int(OffEle::*cutCodeFunc)() const)
int(OffPho::* cutCodeFunc_)() const
EgTrigTagProbeCut_New(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
bool pass(const OffPho &obj, const OffEvt &evt) const
EgHLTDQMCut< OffEle > * clone() const
TrigCodes::TrigBitSet bit2ToPass_
std::bitset< maxNrBits_ > TrigBitSet
EgHLTDQMCut< OffPho > * clone() const