double Qjets::d_ij(const fastjet::PseudoJet& v1,const fastjet::PseudoJet& v2){ double p1 = v1.perp(); double p2 = v2.perp(); double ret = pow(min(p1,p2),_exp_min) * pow(max(p1,p2),_exp_max) * v1.squared_distance(v2); assert(!isnan((float)ret)); return ret; }
double Qjets::d_ij(const fastjet::PseudoJet& v1,const fastjet::PseudoJet& v2) { double p1 = v1.perp(); double p2 = v2.perp(); // small fix here -- nhan // double ret = pow(min(p1,p2),_exp_min) * pow(max(p1,p2),_exp_max) * v1.squared_distance(v2); double ret = pow(10.,-5.); if(v1.squared_distance(v2) != 0.) { ret = pow(min(p1,p2),_exp_min) * pow(max(p1,p2),_exp_max) * v1.squared_distance(v2); } assert(!std::isnan(ret)); return ret; }
void InfoRecombiner::recombine(fastjet::PseudoJet const& jet_1, fastjet::PseudoJet const& jet_2, fastjet::PseudoJet& jet) const { fastjet::JetDefinition::DefaultRecombiner::recombine(jet_1, jet_2, jet); JetInfo jet_info; if (jet_1.has_user_info<JetInfo>()) jet_info = jet_1.user_info<JetInfo>(); if (jet_2.has_user_info<JetInfo>()) jet_info += jet_2.user_info<JetInfo>(); jet.set_user_info(new JetInfo(jet_info)); }
double FastJetTopTagger::getECF(fastjet::PseudoJet& jet, int whichECF, const std::string& energyCorr){ /// ********** Energy Correlation Function *** ///////// // options for EnergyCorrelator: // pt_R (transverse momenta and boost-invariant angles) // E_theta (energy and angle as dot product of vectors) // E_inv (energy and angle as (2p_i \cdot p_j/E_i E_j) if(whichECF > _maxECF) return -1.0; if(!jet.has_constituents()) return -1.0; return _energyCorrMap[energyCorr].at(whichECF)(jet); } //end
PseudoJet::PseudoJet(fastjet::PseudoJet const& pseudo_jet) : fastjet::PseudoJet(pseudo_jet) { INFO(pseudo_jet.px(), px(), pseudo_jet.py(), py()); }
void ISRboost(fastjet::PseudoJet& bj1,fastjet::PseudoJet& bj2, const fastjet::PseudoJet& j1, const vector<int>& candidates, fastjet::ClusterSequence & cs, const vector<int>& beam_particles, double* boostzVec,double *boostxyVec ){ double q0=bj1.E()+bj2.E(); double q2=q0*q0; double k0_rec=q0-j1.E(); double keith_beta=j1.pz()/k0_rec; double krec2=j1.px()*j1.px()+j1.py()*j1.py()+j1.pz()*j1.pz(); double krec=sqrt(krec2); double recMass2=k0_rec*k0_rec-krec2; boostzVec[0]=0;boostzVec[1]=0;boostzVec[2]=keith_beta; double jperp=j1.perp(); double Keith_norm=sqrt(recMass2+jperp*jperp); double boostx=-j1.px()/Keith_norm; double boosty=-j1.py()/Keith_norm; boostxyVec[0]=-boostx;boostxyVec[1]=-boosty;boostxyVec[2]=0; TLorentzVector q(-j1.px(),-j1.py(),-j1.pz(),-j1.E()); TLorentzVector m1(bj1.px(),bj1.py(),bj1.pz(),bj1.E()); TLorentzVector m2(bj2.px(),bj2.py(),bj2.pz(),bj2.E()); q=q+m1+m2; NAMED_DEBUG("BOOST", std::cout << "q0: " << q0 << " keith_beta: " << keith_beta << std::endl ; std::cout << "rebM2: " << recMass2 << std::endl ; std::cout << "keith norm: " << Keith_norm << std::endl ; )
//this returns the delta r of a particle to a pseudojet double MyTopEvent::Return_DR(const Pythia8::Particle & a,const fastjet::PseudoJet & b) { double DR(0); DR = sqrt( pow((a.eta() - b.eta()),2) + pow((a.phi() - b.phi() ),2) ); return DR; }