ParisiTensor.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #include "Rivet/Projections/ParisiTensor.hh"
00004 #include "Rivet/Cmp.hh"
00005 #include "Rivet/RivetCLHEP.hh"
00006 
00007 using namespace Rivet;
00008 using namespace std;
00009 
00010 
00011 int ParisiTensor::compare(const Projection& p) const {
00012   const ParisiTensor& other = dynamic_cast<const ParisiTensor&>(p);
00013   int sphcmp = pcmp(_sphproj, other._sphproj);
00014   return sphcmp;
00015 }
00016 
00017 
00018 void ParisiTensor::project(const Event & e) {
00019   // Apply sphericity projection to event
00020   Sphericity sph = e.applyProjection(_sphproj);
00021 
00022   // Set parameters
00023   _lambda[0] = sph.lambda1();
00024   _lambda[1] = sph.lambda2();
00025   _lambda[2] = sph.lambda3();
00026   _C = 3 * ( lambda1()*lambda2() + lambda1()*lambda3() + lambda2()*lambda3() );
00027   _D = 27 * lambda1() * lambda2() * lambda3();
00028 
00029 }