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
fastjet::JetDefinition::Recombiner
[legend]
Collaboration diagram for fastjet::JetDefinition::DefaultRecombiner:

Collaboration graph
fastjet::JetDefinition::Recombiner
[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 294 of file JetDefinition.hh.


Constructor & Destructor Documentation

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

Definition at line 296 of file JetDefinition.hh.

00296                                                                     : 
00297       _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 72 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.

00072                                                          {
00073   switch(_recomb_scheme) {
00074   case E_scheme:
00075     return "E scheme recombination";
00076   case pt_scheme:
00077     return "pt scheme recombination";
00078   case pt2_scheme:
00079     return "pt2 scheme recombination";
00080   case Et_scheme:
00081     return "Et scheme recombination";
00082   case Et2_scheme:
00083     return "Et2 scheme recombination";
00084   case BIpt_scheme:
00085     return "boost-invariant pt scheme recombination";
00086   case BIpt2_scheme:
00087     return "boost-invariant pt2 scheme recombination";
00088   default:
00089     ostringstream err;
00090     err << "DefaultRecombiner: unrecognized recombination scheme " 
00091         << _recomb_scheme;
00092     throw Error(err.str());
00093   }
00094 }

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 97 of file JetDefinition.cc.

References _recomb_scheme, 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.

00099                                   {
00100   
00101   double weighta, weightb;
00102 
00103   switch(_recomb_scheme) {
00104   case E_scheme:
00105     pab = pa + pb; 
00106     pab.set_user_index(0);
00107     return;
00108   // all remaining schemes are massless recombinations and locally
00109   // we just set weights, while the hard work is done below...
00110   case pt_scheme:
00111   case Et_scheme:
00112   case BIpt_scheme:
00113     weighta = pa.perp(); 
00114     weightb = pb.perp();
00115     break;
00116   case pt2_scheme:
00117   case Et2_scheme:
00118   case BIpt2_scheme:
00119     weighta = pa.perp2(); 
00120     weightb = pb.perp2();
00121     break;
00122   default:
00123     ostringstream err;
00124     err << "DefaultRecombiner: unrecognized recombination scheme " 
00125         << _recomb_scheme;
00126     throw Error(err.str());
00127   }
00128 
00129   double perp_ab = pa.perp() + pb.perp();
00130   if (perp_ab != 0.0) { // weights also non-zero...
00131     double y_ab    = (weighta * pa.rap() + weightb * pb.rap())/(weighta+weightb);
00132     
00133     // take care with periodicity in phi...
00134     double phi_a = pa.phi(), phi_b = pb.phi();
00135     if (phi_a - phi_b > pi)  phi_b += twopi;
00136     if (phi_a - phi_b < -pi) phi_b -= twopi;
00137     double phi_ab = (weighta * phi_a + weightb * phi_b)/(weighta+weightb);
00138     
00139     pab = PseudoJet(perp_ab*cos(phi_ab),
00140                     perp_ab*sin(phi_ab),
00141                     perp_ab*sinh(y_ab),
00142                     perp_ab*cosh(y_ab));
00143   } else { // weights are zero
00144     pab = PseudoJet(0.0,0.0,0.0,0.0);
00145   }
00146   pab.set_user_index(0);
00147 }

void fastjet::JetDefinition::DefaultRecombiner::preprocess ( PseudoJet p  )  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 150 of file JetDefinition.cc.

References _recomb_scheme, 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().

00150                                                                    {
00151   switch(_recomb_scheme) {
00152   case E_scheme:
00153   case BIpt_scheme:
00154   case BIpt2_scheme:
00155     break;
00156   case pt_scheme:
00157   case pt2_scheme:
00158     {
00159       // these schemes (as in the ktjet implementation) need massless
00160       // initial 4-vectors with essentially E=|p|.
00161       double newE = sqrt(p.perp2()+p.pz()*p.pz());
00162       int    user_index = p.user_index();
00163       p = PseudoJet(p.px(), p.py(), p.pz(), newE);
00164       p.set_user_index(user_index);
00165     }
00166     break;
00167   case Et_scheme:
00168   case Et2_scheme:
00169     {
00170       // these schemes (as in the ktjet implementation) need massless
00171       // initial 4-vectors with essentially E=|p|.
00172       double rescale = p.E()/sqrt(p.perp2()+p.pz()*p.pz());
00173       int    user_index = p.user_index();
00174       p = PseudoJet(rescale*p.px(), rescale*p.py(), rescale*p.pz(), p.E());
00175       p.set_user_index(user_index);
00176     }
00177     break;
00178   default:
00179     ostringstream err;
00180     err << "DefaultRecombiner: unrecognized recombination scheme " 
00181         << _recomb_scheme;
00182     throw Error(err.str());
00183   }
00184 }

RecombinationScheme fastjet::JetDefinition::DefaultRecombiner::scheme (  )  const [inline]

return the index of the recombination scheme

Definition at line 308 of file JetDefinition.hh.

00308 {return _recomb_scheme;}


Member Data Documentation

RecombinationScheme fastjet::JetDefinition::DefaultRecombiner::_recomb_scheme [private]

Definition at line 311 of file JetDefinition.hh.

Referenced by description(), preprocess(), and recombine().


The documentation for this class was generated from the following files:
Generated on Tue Dec 18 17:05:52 2007 for fastjet by  doxygen 1.5.2