|
[Rivet-svn] r3455 - branches/2011-07-aida2yoda/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Oct 24 16:32:52 BST 2011
Author: hoeth Date: Mon Oct 24 16:32:52 2011 New Revision: 3455 Log: whitespace Modified: branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc Modified: branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc Mon Oct 24 16:32:06 2011 (r3454) +++ branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc Mon Oct 24 16:32:52 2011 (r3455) @@ -46,19 +46,19 @@ FourMomentum ptotal; const FinalState& fs = applyProjection<FinalState>(e, "FS"); foreach (const Particle& p, fs.particles()) { - ptotal+= p.momentum(); - if(p.pdgId()==PHOTON) { - photons.push_back(p); - } - else { - nonPhotons.push_back(p); - } + ptotal+= p.momentum(); + if(p.pdgId()==PHOTON) { + photons.push_back(p); + } + else { + nonPhotons.push_back(p); + } } // no photon return but still count for normalisation if(photons.empty()) return; // definition of the Durham algorithm fastjet::JetDefinition durham_def(fastjet::ee_kt_algorithm,fastjet::E_scheme, - fastjet::Best); + fastjet::Best); // definition of the JADE algorithm fastjet::JadePlugin jade; fastjet::JetDefinition jade_def = fastjet::JetDefinition(&jade); @@ -67,76 +67,76 @@ vector<fastjet::PseudoJet> input_particles; // pseudo jets from the non photons foreach (const Particle& p, nonPhotons) { - input_particles.push_back(fastjet::PseudoJet(p.momentum().px(), - p.momentum().py(), - p.momentum().pz(), - p.momentum().E())); + input_particles.push_back(fastjet::PseudoJet(p.momentum().px(), + p.momentum().py(), + p.momentum().pz(), + p.momentum().E())); } // pseudo jets from all bar the first photon for(unsigned int ix=1;ix<photons.size();++ix) { - input_particles.push_back(fastjet::PseudoJet(photons[ix].momentum().px(), - photons[ix].momentum().py(), - photons[ix].momentum().pz(), - photons[ix].momentum().E())); + input_particles.push_back(fastjet::PseudoJet(photons[ix].momentum().px(), + photons[ix].momentum().py(), + photons[ix].momentum().pz(), + photons[ix].momentum().E())); } // now loop over the photons for(unsigned int ix=0;ix<photons.size();++ix) { - FourMomentum pgamma = photons[ix].momentum(); - // run the jet clustering DURHAM - fastjet::ClusterSequence clust_seq(input_particles, durham_def); - // cluster the jets - for (size_t j = 0; j < _nPhotonDurham->numPoints(); ++j) { - bool accept(true); - double ycut = _nPhotonDurham->point(j).x(); - double dcut = sqr(evis)*ycut; - vector<fastjet::PseudoJet> exclusive_jets = - sorted_by_E(clust_seq.exclusive_jets(dcut)); - for(unsigned int iy=0;iy<exclusive_jets.size();++iy) { - FourMomentum pjet(momentum(exclusive_jets[iy])); - double cost = pjet.vector3().unit().dot(pgamma.vector3().unit()); - double ygamma = 2.*min(sqr(pjet.E()/evis), - sqr(pgamma.E()/evis))*(1.-cost); - if(ygamma<ycut) { - accept = false; - break; - } - } - if(!accept) continue; - _nPhotonDurham->point(j).setY(_nPhotonDurham->point(j).y()+weight); - int njet = min(4,int(exclusive_jets.size())) - 1; - if(j<_nPhotonJetDurham[njet]->numPoints()) { - _nPhotonJetDurham[njet]->point(j).setY(_nPhotonJetDurham[njet]->point(j).y()+weight); - } - } - // run the jet clustering JADE - fastjet::ClusterSequence clust_seq2(input_particles, jade_def); - for (size_t j = 0; j < _nPhotonJade->numPoints(); ++j) { - bool accept(true); - double ycut = _nPhotonJade->point(j).x(); - double dcut = sqr(evis)*ycut; - vector<fastjet::PseudoJet> exclusive_jets = - sorted_by_E(clust_seq2.exclusive_jets(dcut)); - for(unsigned int iy=0;iy<exclusive_jets.size();++iy) { - FourMomentum pjet(momentum(exclusive_jets[iy])); - double cost = pjet.vector3().unit().dot(pgamma.vector3().unit()); - double ygamma = 2.*pjet.E()*pgamma.E()/sqr(evis)*(1.-cost); - if(ygamma<ycut) { - accept = false; - break; - } - } - if(!accept) continue; - _nPhotonJade->point(j).setY(_nPhotonJade->point(j).y()+weight); - int njet = min(4,int(exclusive_jets.size())) - 1; - if(j<_nPhotonJetJade[njet]->numPoints()) { - _nPhotonJetJade[njet]->point(j).setY(_nPhotonJetJade[njet]->point(j).y()+weight); - } - } - // add this photon back in for the next interation of the loop - if(ix+1!=photons.size()) - input_particles[nonPhotons.size()+ix] = - fastjet::PseudoJet(photons[ix].momentum().px(),photons[ix].momentum().py(), - photons[ix].momentum().pz(),photons[ix].momentum().E()); + FourMomentum pgamma = photons[ix].momentum(); + // run the jet clustering DURHAM + fastjet::ClusterSequence clust_seq(input_particles, durham_def); + // cluster the jets + for (size_t j = 0; j < _nPhotonDurham->numPoints(); ++j) { + bool accept(true); + double ycut = _nPhotonDurham->point(j).x(); + double dcut = sqr(evis)*ycut; + vector<fastjet::PseudoJet> exclusive_jets = + sorted_by_E(clust_seq.exclusive_jets(dcut)); + for(unsigned int iy=0;iy<exclusive_jets.size();++iy) { + FourMomentum pjet(momentum(exclusive_jets[iy])); + double cost = pjet.vector3().unit().dot(pgamma.vector3().unit()); + double ygamma = 2.*min(sqr(pjet.E()/evis), + sqr(pgamma.E()/evis))*(1.-cost); + if(ygamma<ycut) { + accept = false; + break; + } + } + if(!accept) continue; + _nPhotonDurham->point(j).setY(_nPhotonDurham->point(j).y()+weight); + int njet = min(4,int(exclusive_jets.size())) - 1; + if(j<_nPhotonJetDurham[njet]->numPoints()) { + _nPhotonJetDurham[njet]->point(j).setY(_nPhotonJetDurham[njet]->point(j).y()+weight); + } + } + // run the jet clustering JADE + fastjet::ClusterSequence clust_seq2(input_particles, jade_def); + for (size_t j = 0; j < _nPhotonJade->numPoints(); ++j) { + bool accept(true); + double ycut = _nPhotonJade->point(j).x(); + double dcut = sqr(evis)*ycut; + vector<fastjet::PseudoJet> exclusive_jets = + sorted_by_E(clust_seq2.exclusive_jets(dcut)); + for(unsigned int iy=0;iy<exclusive_jets.size();++iy) { + FourMomentum pjet(momentum(exclusive_jets[iy])); + double cost = pjet.vector3().unit().dot(pgamma.vector3().unit()); + double ygamma = 2.*pjet.E()*pgamma.E()/sqr(evis)*(1.-cost); + if(ygamma<ycut) { + accept = false; + break; + } + } + if(!accept) continue; + _nPhotonJade->point(j).setY(_nPhotonJade->point(j).y()+weight); + int njet = min(4,int(exclusive_jets.size())) - 1; + if(j<_nPhotonJetJade[njet]->numPoints()) { + _nPhotonJetJade[njet]->point(j).setY(_nPhotonJetJade[njet]->point(j).y()+weight); + } + } + // add this photon back in for the next interation of the loop + if(ix+1!=photons.size()) + input_particles[nonPhotons.size()+ix] = + fastjet::PseudoJet(photons[ix].momentum().px(),photons[ix].momentum().py(), + photons[ix].momentum().pz(),photons[ix].momentum().E()); } } @@ -150,8 +150,8 @@ _nPhotonJade = bookScatter2D(1, 1, 1); _nPhotonDurham = bookScatter2D(2, 1, 1); for(unsigned int ix=0;ix<4;++ix) { - _nPhotonJetJade [ix] = bookScatter2D(3 , 1, 1+ix); - _nPhotonJetDurham[ix] = bookScatter2D(4 , 1, 1+ix); + _nPhotonJetJade [ix] = bookScatter2D(3 , 1, 1+ix); + _nPhotonJetDurham[ix] = bookScatter2D(4 , 1, 1+ix); } } @@ -162,15 +162,15 @@ normaliseScatter2D(_nPhotonJade ,fact); normaliseScatter2D(_nPhotonDurham ,fact); for(unsigned int ix=0;ix<4;++ix) { - normaliseScatter2D(_nPhotonJetJade [ix],fact); - normaliseScatter2D(_nPhotonJetDurham[ix],fact); + normaliseScatter2D(_nPhotonJetJade [ix],fact); + normaliseScatter2D(_nPhotonJetDurham[ix],fact); } } // normalise a data point set, default function does both x and y AHHH void normaliseScatter2D(Scatter2DPtr points, double fact) { for (size_t i = 0; i < points->numPoints(); ++i) { - points->point(i).setY(points->point(i).y()*fact); + points->point(i).setY(points->point(i).y()*fact); } } //@}
More information about the Rivet-svn mailing list |