ParisiTensor.cc

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