本文整理汇总了C++中Interpretation类的典型用法代码示例。如果您正苦于以下问题:C++ Interpretation类的具体用法?C++ Interpretation怎么用?C++ Interpretation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Interpretation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
float ReconstructionMCMatching::DrQ2(Interpretation& i){
float dr=999;
if(q2.Pt()>0.01 && i.Q2().Pt()>0.01){
dr=q2.DeltaR(i.Q2());
}
return dr;
}
示例2: DrBLep
float ReconstructionMCMatching::DrBLep(Interpretation& i){
float dr=999;
if(b_lep.Pt()>0.01 && i.BLep().Pt()>0.01){
dr=b_lep.DeltaR(i.BLep());
}
return dr;
}
示例3: DrH
float ReconstructionMCMatching::DrH(Interpretation& i){
float dr=999;
if(higgs.Pt()>0.01 && i.Higgs().Pt()>0.01){
dr=higgs.DeltaR(i.Higgs());
}
return dr;
}
示例4: DrTopHad
float ReconstructionMCMatching::DrTopHad(Interpretation& i){
float dr=999;
if(top_had.Pt()>0.01 && i.TopHad().Pt()>0.01){
dr=top_had.DeltaR(i.TopHad());
}
return dr;
}
示例5: DrNu
float ReconstructionMCMatching::DrNu(Interpretation& i){
float dr=999;
if(nu.Pt()>0.01 && i.Nu().Pt()>0.01){
dr=nu.DeltaR(i.Nu());
}
return dr;
}
示例6: MatchBHad
bool ReconstructionMCMatching::MatchBHad(Interpretation& i){
if(setupMC==0){
cerr << "need to setup mc matching first!" << endl;
return false;
}
bool matchBhad=b_had.E()>1.&&i.BHad().E()>1.&&b_had.DeltaR(i.BHad())<maxdr;
// cout << "dr bhad " << b_had.DeltaR(i.BHad()) << endl;
return matchBhad;
}
示例7: MatchBLep
bool ReconstructionMCMatching::MatchBLep(Interpretation& i){
if(setupMC==0){
cerr << "need to setup mc matching first!" << endl;
return false;
}
// cout << "dr blep " << b_lep.DeltaR(i.BLep()) << endl;
bool matchBlep=b_lep.E()>1.&&i.BLep().E()>1.&&b_lep.DeltaR(i.BLep())<maxdr;
return matchBlep;
}
示例8: MatchH
bool ReconstructionMCMatching::MatchH(Interpretation& i){
if(setupMC<2){
cerr << "need to setup mc matching (incl Higgs) first!" << endl;
return false;
}
bool matchH=b1.E()>1.&&b2.E()>1.&&i.B1().E()>1.&&i.B2().E()>1.
&& ( (b1.DeltaR(i.B1())<maxdr && b2.DeltaR(i.B2())<maxdr) || (b1.DeltaR(i.B2())<maxdr && b2.DeltaR(i.B1())<maxdr) );
return matchH;
}
示例9: MatchWHad
bool ReconstructionMCMatching::MatchWHad(Interpretation& i){
if(setupMC==0){
cerr << "need to setup mc matching first!" << endl;
return false;
}
bool matchWhad=q1.E()>1.&&q2.E()>1.&&i.Q1().E()>1.&&i.Q2().E()>1.
&&
( (q1.DeltaR(i.Q1())<maxdr && q2.DeltaR(i.Q2())<maxdr) || (q1.DeltaR(i.Q2())<maxdr && q2.DeltaR(i.Q1())<maxdr) );
// cout << "1 " << q1.DeltaR(i.Q1()) << ", " << q2.DeltaR(i.Q2()) << " 2 " << q2.DeltaR(i.Q1()) << ", " << q1.DeltaR(i.Q2()) << endl;
// cout << "q1 pt " << i.Q1().Pt() << " q2 pt " << i.Q2().Pt() << " blep pt " << i.BLep().Pt() << " bhad pt " << i.BHad().Pt() << " nu pz " << i.Nu().Pz() << endl;
// if(matchWhad) cout << "matched" << endl;
// else cout << "not matched" << endl;
return matchWhad;
}
示例10: anticipateLearning
void ConsistencyAtom::anticipateLearning(RegistryPtr& registry,const InterpretationConstPtr& assigned,NogoodContainerPtr& nogoods,
vector<string>& expressions,vector<ID>& atomIds,vector<OrdinaryAtom> &sumData,int domainMinValue,int domainMaxValue,string& globalConstraintName,string& globalConstraintValue,Interpretation& toCheck)
{
pm.updateMask();
Interpretation::TrueBitIterator it, it_end;
boost::tie(it, it_end) = pm.mask()->trueBits();
//iterate over all Ordinary ground atom (expr and not_expr)
for(;it!=it_end;it++)
{
//if the atom is not assigned, add atom to lists in order to check consistency
if(assigned->getFact(*it))
{
continue;
}
const OrdinaryAtom& atom=pm.mask()->getAtomToBit(it);
if (atom.tuple[0]==exprAuxID && (!cspGraphLearning || !cpVariables.getFact(*it) || toCheck.getFact(*it))) {
expressions.push_back(getExpressionFromID(registry,atom,false));
atomIds.push_back(registry->ogatoms.getIDByTuple(atom.tuple));
}
else if (atom.tuple[0]==not_exprAuxID && (!cspGraphLearning ||!cpVariables.getFact(*it) || toCheck.getFact(*it))) {
expressions.push_back(getExpressionFromID(registry,atom,true));
atomIds.push_back(registry->ogatoms.getIDByTuple(atom.tuple));
}
GecodeSolver* solver = new GecodeSolver(registry,sumData,domainMinValue, domainMaxValue, globalConstraintName, globalConstraintValue, simpleParser);
solver->propagate(expressions);
Gecode::Search::Options opt;
Gecode::BAB<GecodeSolver> solutions(solver,opt);
//if the solution is not consistent try to learn nogoods
if (solutions.next()==NULL)
{
GecodeSolver* otherSolver = new GecodeSolver(registry,sumData, domainMinValue,domainMaxValue, globalConstraintName, globalConstraintValue, simpleParser);
//try to learn no goods
backwardlearningProcessor->learnNogoods(nogoods,expressions,atomIds,otherSolver);
delete otherSolver;
}
delete solver;
expressions.pop_back();
atomIds.pop_back();
}
}
示例11: MatchNWHad
int ReconstructionMCMatching::MatchNWHad(Interpretation& i){
if(setupMC<1){
cerr << "need to setup mc matching (incl Higgs) first!" << endl;
return false;
}
int nQ=0;
if(q1.E()>1.&&q2.E()>1.&&i.Q1().E()>1.&&i.Q2().E()>1.){
if(q1.DeltaR(i.Q1())<maxdr || q2.DeltaR(i.Q1())<maxdr) nQ++;
if(q1.DeltaR(i.Q2())<maxdr || q2.DeltaR(i.Q2())<maxdr) nQ++;
}
return nQ++;
}
示例12: MatchNH
int ReconstructionMCMatching::MatchNH(Interpretation& i){
if(setupMC<2){
cerr << "need to setup mc matching (incl Higgs) first!" << endl;
return false;
}
int nQ=0;
if(b1.E()>1.&&b2.E()>1.&&i.B1().E()>1.&&i.B2().E()>1.){
if(b1.DeltaR(i.B1())<maxdr || b2.DeltaR(i.B1())<maxdr) nQ++;
if(b1.DeltaR(i.B2())<maxdr || b2.DeltaR(i.B2())<maxdr) nQ++;
}
return nQ;
}
示例13: SumDrTTH
float ReconstructionMCMatching::SumDrTTH(Interpretation& i){
if(setupMC<2){
cerr << "need to setup mc matching (incl Higgs) first!" << endl;
return false;
}
float sumDr=0;
sumDr+=b_had.DeltaR(i.BHad());
sumDr+=q1.DeltaR(i.Q1());
sumDr+=q2.DeltaR(i.Q2());
sumDr+=b_lep.DeltaR(i.BLep());
sumDr+=lep.DeltaR(i.Lep());
sumDr+=nu.DeltaR(i.Nu());
sumDr+=b1.DeltaR(i.B1());
sumDr+=b2.DeltaR(i.B1());
return sumDr;
}
示例14:
float ReconstructionQuality::TTWBBChi2(Interpretation& i){
if(i.HasTag("TTWBBChi2")) return i.GetTag("TTWBBChi2");
float tag=TTWBBChi2(i.TopHad_M(),i.TopLep_M(),i.WHad_M(),i.Higgs_M());
i.SetTag("TTWBBChi2",tag);
return tag;
}
示例15: TTHBB_ME
float ReconstructionQuality::TTHBB_ME(Interpretation& i){
if(i.HasTag("TTHBB_ME")) return i.GetTag("TTHBB_ME");
float tag=me.GetTTHBBMEsq(i.TopHad(),i.TopLep(),i.B1(),i.B2());
i.SetTag("TTHBB_ME",tag);
return tag;
}