fastjet 2.4.5
Public Member Functions | Private Attributes
fastjet::JetDefinition::DefaultRecombiner Class Reference

A class that will provide the recombination scheme facilities and/or allow a user to extend these facilities. More...

#include <JetDefinition.hh>

Inheritance diagram for fastjet::JetDefinition::DefaultRecombiner:
Inheritance graph
[legend]
Collaboration diagram for fastjet::JetDefinition::DefaultRecombiner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DefaultRecombiner (RecombinationScheme recomb_scheme=E_scheme)
virtual std::string description () const
 return a textual description of the recombination scheme implemented here
virtual void recombine (const PseudoJet &pa, const PseudoJet &pb, PseudoJet &pab) const
 recombine pa and pb and put result into pab
virtual void preprocess (PseudoJet &p) const
 routine called to preprocess each input jet (to make all input jets compatible with the scheme requirements (e.g.
RecombinationScheme scheme () const
 return the index of the recombination scheme

Private Attributes

RecombinationScheme _recomb_scheme

Detailed Description

A class that will provide the recombination scheme facilities and/or allow a user to extend these facilities.

Definition at line 357 of file JetDefinition.hh.


Constructor & Destructor Documentation

fastjet::JetDefinition::DefaultRecombiner::DefaultRecombiner ( RecombinationScheme  recomb_scheme = E_scheme) [inline]

Definition at line 359 of file JetDefinition.hh.

                                                                    : 
      _recomb_scheme(recomb_scheme) {}

Member Function Documentation

string fastjet::JetDefinition::DefaultRecombiner::description ( ) const [virtual]

return a textual description of the recombination scheme implemented here

Implements fastjet::JetDefinition::Recombiner.

Definition at line 134 of file JetDefinition.cc.

References _recomb_scheme, fastjet::BIpt2_scheme, fastjet::BIpt_scheme, fastjet::E_scheme, fastjet::Et2_scheme, fastjet::Et_scheme, fastjet::pt2_scheme, and fastjet::pt_scheme.

                                                         {
  switch(_recomb_scheme) {
  case E_scheme:
    return "E scheme recombination";
  case pt_scheme:
    return "pt scheme recombination";
  case pt2_scheme:
    return "pt2 scheme recombination";
  case Et_scheme:
    return "Et scheme recombination";
  case Et2_scheme:
    return "Et2 scheme recombination";
  case BIpt_scheme:
    return "boost-invariant pt scheme recombination";
  case BIpt2_scheme:
    return "boost-invariant pt2 scheme recombination";
  default:
    ostringstream err;
    err << "DefaultRecombiner: unrecognized recombination scheme " 
        << _recomb_scheme;
    throw Error(err.str());
  }
}
void fastjet::JetDefinition::DefaultRecombiner::preprocess ( PseudoJet ) const [virtual]

routine called to preprocess each input jet (to make all input jets compatible with the scheme requirements (e.g.

massless).

Reimplemented from fastjet::JetDefinition::Recombiner.

Definition at line 212 of file JetDefinition.cc.

References fastjet::BIpt2_scheme, fastjet::BIpt_scheme, fastjet::PseudoJet::E(), fastjet::E_scheme, fastjet::Et2_scheme, fastjet::Et_scheme, fastjet::PseudoJet::perp2(), fastjet::pt2_scheme, fastjet::pt_scheme, fastjet::PseudoJet::px(), fastjet::PseudoJet::py(), fastjet::PseudoJet::pz(), fastjet::PseudoJet::set_user_index(), and fastjet::PseudoJet::user_index().

                                                                   {
  switch(_recomb_scheme) {
  case E_scheme:
  case BIpt_scheme:
  case BIpt2_scheme:
    break;
  case pt_scheme:
  case pt2_scheme:
    {
      // these schemes (as in the ktjet implementation) need massless
      // initial 4-vectors with essentially E=|p|.
      double newE = sqrt(p.perp2()+p.pz()*p.pz());
      int    user_index = p.user_index();
      p = PseudoJet(p.px(), p.py(), p.pz(), newE);
      p.set_user_index(user_index);
    }
    break;
  case Et_scheme:
  case Et2_scheme:
    {
      // these schemes (as in the ktjet implementation) need massless
      // initial 4-vectors with essentially E=|p|.
      double rescale = p.E()/sqrt(p.perp2()+p.pz()*p.pz());
      int    user_index = p.user_index();
      p = PseudoJet(rescale*p.px(), rescale*p.py(), rescale*p.pz(), p.E());
      p.set_user_index(user_index);
    }
    break;
  default:
    ostringstream err;
    err << "DefaultRecombiner: unrecognized recombination scheme " 
        << _recomb_scheme;
    throw Error(err.str());
  }
}
void fastjet::JetDefinition::DefaultRecombiner::recombine ( const PseudoJet pa,
const PseudoJet pb,
PseudoJet pab 
) const [virtual]

recombine pa and pb and put result into pab

Implements fastjet::JetDefinition::Recombiner.

Definition at line 159 of file JetDefinition.cc.

References fastjet::BIpt2_scheme, fastjet::BIpt_scheme, fastjet::E_scheme, fastjet::Et2_scheme, fastjet::Et_scheme, fastjet::PseudoJet::perp(), fastjet::PseudoJet::perp2(), fastjet::PseudoJet::phi(), fastjet::pi, fastjet::pt2_scheme, fastjet::pt_scheme, fastjet::PseudoJet::rap(), fastjet::PseudoJet::set_user_index(), and fastjet::twopi.

                                  {
  
  double weighta, weightb;

  switch(_recomb_scheme) {
  case E_scheme:
    pab = pa + pb; 
    pab.set_user_index(0);
    return;
  // all remaining schemes are massless recombinations and locally
  // we just set weights, while the hard work is done below...
  case pt_scheme:
  case Et_scheme:
  case BIpt_scheme:
    weighta = pa.perp(); 
    weightb = pb.perp();
    break;
  case pt2_scheme:
  case Et2_scheme:
  case BIpt2_scheme:
    weighta = pa.perp2(); 
    weightb = pb.perp2();
    break;
  default:
    ostringstream err;
    err << "DefaultRecombiner: unrecognized recombination scheme " 
        << _recomb_scheme;
    throw Error(err.str());
  }

  double perp_ab = pa.perp() + pb.perp();
  if (perp_ab != 0.0) { // weights also non-zero...
    double y_ab    = (weighta * pa.rap() + weightb * pb.rap())/(weighta+weightb);
    
    // take care with periodicity in phi...
    double phi_a = pa.phi(), phi_b = pb.phi();
    if (phi_a - phi_b > pi)  phi_b += twopi;
    if (phi_a - phi_b < -pi) phi_b -= twopi;
    double phi_ab = (weighta * phi_a + weightb * phi_b)/(weighta+weightb);
    
    pab = PseudoJet(perp_ab*cos(phi_ab),
                    perp_ab*sin(phi_ab),
                    perp_ab*sinh(y_ab),
                    perp_ab*cosh(y_ab));
  } else { // weights are zero
    pab = PseudoJet(0.0,0.0,0.0,0.0);
  }
  pab.set_user_index(0);
}
RecombinationScheme fastjet::JetDefinition::DefaultRecombiner::scheme ( ) const [inline]

return the index of the recombination scheme

Definition at line 371 of file JetDefinition.hh.

{return _recomb_scheme;}

Member Data Documentation

Definition at line 374 of file JetDefinition.hh.

Referenced by description().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines