Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::SharedConeStrategy Class Reference

This Clustering Strategy just calls ClusterConeStrategy and then recalibrates the energy using the fortran atlfast algorithms that do a crude Cell energy sharing calculation. More...

#include <SharedConeStrategy.h>

List of all members.


Public Methods

 SharedConeStrategy (double rConeBarrel, double rConeForward, double minInitiatorET, double minClusterET, double barrelForwardEta)
virtual ~SharedConeStrategy ()
virtual void makeClusters (MsgStream &log, const localCellCollection &storedCells, localCellCollection &unusedCells, ClusterCollection *clusters) const

Private Methods

void CellAssociatedClusterEnergy (std::vector< const Cell * >::const_iterator, ClusterCollection::iterator, ClusterCollection::iterator, std::map< Cluster *, double > &) const

Private Attributes

IClusterStrategy * m_coneStrategy
 Holds a pointer to a normal cone strategy.

double m_rConeBarrel
double m_rConeForward
double m_minClusterET
double m_barrelForwardEta

Detailed Description

This Clustering Strategy just calls ClusterConeStrategy and then recalibrates the energy using the fortran atlfast algorithms that do a crude Cell energy sharing calculation.

Note that it uses the Initiator value for minClusterET in ClusterConeStrategy then it tests against given minClusterET after sharing is done.

Author:
J Couchman P Sherwood

Definition at line 63 of file SharedConeStrategy.h.


Constructor & Destructor Documentation

Atlfast::SharedConeStrategy::SharedConeStrategy double    rConeBarrel,
double    rConeForward,
double    minInitiatorET,
double    minClusterET,
double    barrelForwardEta
 

Construct a ClusterConeStrategy that will do initial clustering note the min ET value!

Definition at line 18 of file SharedConeStrategy.cxx.

References m_coneStrategy.

00022                                                                   : m_rConeBarrel(rConeBarrel),
00023                                                                     m_rConeForward(rConeForward),
00024                                                                     m_minClusterET(minClusterET),
00025                                                                     m_barrelForwardEta(barrelForwardEta)
00026   {
00028      m_coneStrategy = new ClusterConeStrategy( rConeBarrel,   
00029                                                rConeForward,
00030                                                minInitiatorET,
00031                                                minInitiatorET,//crazy!!!!!
00032                                                true);
00033   }

Atlfast::SharedConeStrategy::~SharedConeStrategy   [virtual]
 

Definition at line 35 of file SharedConeStrategy.cxx.

References m_coneStrategy.

00035 {delete m_coneStrategy;}

Member Function Documentation

void Atlfast::SharedConeStrategy::makeClusters MsgStream &    log,
const localCellCollection   storedCells,
localCellCollection   unusedCells,
ClusterCollection *    clusters
const [virtual]
 

Definition at line 37 of file SharedConeStrategy.cxx.

References CellAssociatedClusterEnergy(), Atlfast::localCellCollection, m_coneStrategy, and m_minClusterET.

00041   {
00042     //Firstly Call the bog Standard ClusterConeStrategy
00043     m_coneStrategy->makeClusters(log,  storedCells, unusedCells, clusters);
00044     
00045     //Now recalibrate those clusters
00046     //============================================================
00047     //Partition away all clusters that are more than two R away 
00048     //from other clusters
00049     // JPC: NOT DONE YET!!!!!
00050     //Copy pointers to all associated cells to local vector
00051     
00052     localCellCollection usedCells;
00053     std::map<Cluster*,double> aMap;
00054     ClusterCollection::iterator cluIter = clusters->begin();
00055     for(; cluIter != clusters->end(); ++cluIter) {
00056       aMap[*cluIter] = 0.0;
00057       Cell cell;
00058       IAssociationManager* iam = *cluIter;
00059       localCellCollection smv = iam->ikinematics();
00060       std::copy(smv.begin(), smv.end(),std::back_inserter(usedCells));
00061     }
00062     //Iterate over used cells
00063     localCellCollectionIterator cellIter = usedCells.begin();
00064     for(; cellIter != usedCells.end(); ++cellIter) {
00065       this->CellAssociatedClusterEnergy(
00066                                         cellIter,
00067                                         clusters->begin(),
00068                                         clusters->end(),
00069                                         aMap
00070                                         );
00071     }
00072     
00073     //recalculate cluster energies
00074     cluIter = clusters->begin();
00075     for(; cluIter != clusters->end(); ++cluIter){
00076       if(aMap.find(*cluIter) != aMap.end() && aMap[*cluIter] != 0.0) {
00077         double eT = aMap[*cluIter]/cosh((*cluIter)->eta());
00078         double theta = atan( exp( - (*cluIter)->eta() ) ) * 2.0 ;
00079         double t = eT / sin( theta ) ;
00080         double x = eT * cos( (*cluIter)->phi() ) ;
00081         double y = eT * sin( (*cluIter)->phi() ) ;
00082         double z = t * cos( theta ) ;
00083         (*cluIter)->setMomentum(HepLorentzVector(x,y,z,t));
00084       }
00085     }
00086     //Partition away clusters below eT threshold
00087     ClusterCollection::iterator part = std::partition(clusters->begin(),
00088                                                  clusters->end(),
00089                                                  PartitionCondition::AboveThresholdET( m_minClusterET ));
00090     //retrieve cells from discarded clusters and delete clusters
00091     std::for_each(part,clusters->end(),GetBackCells(unusedCells));
00092     clusters->erase(part,clusters->end());
00093     //sort clusters by eT
00094     sort( clusters->begin(),clusters->end(),SortAttribute::DescendingET());
00095     return;
00096   }

void Atlfast::SharedConeStrategy::CellAssociatedClusterEnergy std::vector< const Cell * >::const_iterator   ,
ClusterCollection::iterator   ,
ClusterCollection::iterator   ,
std::map< Cluster *, double > &   
const [private]
 

Definition at line 100 of file SharedConeStrategy.cxx.

Referenced by makeClusters().

00105           {
00106     double tempEnergy = 0.0;
00107     
00108     ClusterCollection::iterator endAssClu = 
00109       partition(cluStart, cluEnd, 
00110                 PartitionCondition::BelowThresholdDeltaR((*cell),m_rConeBarrel)
00111                 );
00112     
00113     //    assert(endAssClu != cluStart);
00114     
00115     //calculate the energy of clusters associated to cells 
00116     
00117     for(ClusterCollection::iterator itr = cluStart;
00118         itr != endAssClu;
00119         ++itr) tempEnergy += ((*itr)->eT()*cosh((*itr)->eta()));
00120     
00121     //calculate the shared energy fractions
00122     for(ClusterCollection::iterator itr = cluStart;itr != endAssClu;++itr){
00123       cluMap[*itr] += 
00124         ((*cell)->eT()*cosh((*cell)->eta())*(*itr)->eT()*cosh((*itr)->eta()))/
00125         tempEnergy;
00126     }
00127     return;
00128   }

Member Data Documentation

IClusterStrategy* Atlfast::SharedConeStrategy::m_coneStrategy [private]
 

Holds a pointer to a normal cone strategy.

Definition at line 90 of file SharedConeStrategy.h.

Referenced by makeClusters(), SharedConeStrategy(), and ~SharedConeStrategy().

double Atlfast::SharedConeStrategy::m_rConeBarrel [private]
 

Definition at line 92 of file SharedConeStrategy.h.

double Atlfast::SharedConeStrategy::m_rConeForward [private]
 

Definition at line 93 of file SharedConeStrategy.h.

double Atlfast::SharedConeStrategy::m_minClusterET [private]
 

Definition at line 94 of file SharedConeStrategy.h.

Referenced by makeClusters().

double Atlfast::SharedConeStrategy::m_barrelForwardEta [private]
 

Definition at line 95 of file SharedConeStrategy.h.


The documentation for this class was generated from the following files:
Generated on Tue Jan 28 09:57:39 2003 for AtlfastAlgs by doxygen1.3-rc1