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 Types

typedef std::vector< IKinematic * > localCellCollection
typedef localCellCollection::iterator localCellCollectionIterator

Public Methods

 SharedConeStrategy (double rConeBarrel, double rConeForward, double minInitiatorET, double minClusterET, double barrelForwardEta)
virtual ~SharedConeStrategy ()
virtual void makeClusters (MsgStream &log, const std::vector< IKinematic * > &storedCells, std::vector< IKinematic * > &unusedCells, ClusterCollection *clusters) 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.


Member Typedef Documentation

typedef std::vector<IKinematic*> Atlfast::SharedConeStrategy::localCellCollection
 

Definition at line 66 of file SharedConeStrategy.h.

typedef localCellCollection::iterator Atlfast::SharedConeStrategy::localCellCollectionIterator
 

Definition at line 67 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 22 of file SharedConeStrategy.cxx.

References m_coneStrategy.

00026                                                                  : 
00027     m_rConeBarrel(rConeBarrel),
00028     m_rConeForward(rConeForward),
00029     m_minClusterET(minClusterET),
00030     m_barrelForwardEta(barrelForwardEta){
00031 
00035     m_coneStrategy = new ClusterConeStrategy( rConeBarrel,   
00036                                               rConeForward,
00037                                               minInitiatorET,
00038                                               minInitiatorET,//crazy!!!!!
00039                                               true);
00040   }

Atlfast::SharedConeStrategy::~SharedConeStrategy   [virtual]
 

Definition at line 42 of file SharedConeStrategy.cxx.

References m_coneStrategy.

00042 {delete m_coneStrategy;}

Member Function Documentation

void Atlfast::SharedConeStrategy::makeClusters MsgStream &    log,
const std::vector< IKinematic * > &    storedCells,
std::vector< IKinematic * > &    unusedCells,
ClusterCollection *    clusters
const [virtual]
 

Definition at line 101 of file SharedConeStrategy.cxx.

References Atlfast::AssocTypeRecoverer< T >::allAsIKinematics(), m_coneStrategy, m_minClusterET, m_rConeBarrel, and Atlfast::AssocTypeRecoverer< T >::vectorOfIKinematics().

00104                                                                       {
00105     //Firstly Call the bog Standard ClusterConeStrategy
00106     m_coneStrategy->makeClusters(log,  storedCells, unusedCells, clusters);
00107     //Now recalibrate those clusters
00108 
00109     std::map<Cluster*,double> aMap;
00110     ClusterCollection::iterator cluIter = clusters->begin();
00111     for(; cluIter != clusters->end(); ++cluIter) {aMap[*cluIter] = 0.0;}
00112     
00113     //Make A collection of all used cells
00114     AssocTypeRecoverer<ClusterCollection>   atr(clusters);
00115     std::vector<IKinematic*>* usedCells   = atr.vectorOfIKinematics();
00116 
00117     // find a weight for each cluster, and put into map
00118     std::for_each(usedCells->begin(), 
00119                   usedCells->end(), 
00120                   CellAssociatedClusterEnergy(                 //defined above
00121                                               clusters,
00122                                               aMap,
00123                                               m_rConeBarrel
00124                                               )
00125                   
00126                   );
00127     delete usedCells;                       //deletes container, not constents
00128 
00129     //recalculate cluster energies
00130     cluIter = clusters->begin();
00131     for(; cluIter != clusters->end(); ++cluIter){
00132       if(aMap.find(*cluIter) != aMap.end() && aMap[*cluIter] != 0.0) {
00133         double theta = ( (*cluIter)->momentum() ).theta();
00134         double t     = aMap[*cluIter];
00135         double eT    = t*sin(theta); 
00136         
00137         double x = eT * cos( (*cluIter)->phi() ) ;
00138         double y = eT * sin( (*cluIter)->phi() ) ;
00139         double z =  t * cos( theta ) ;
00140           
00141         (*cluIter)->setMomentum(HepLorentzVector(x,y,z,t));
00142       }
00143     }
00144     //Partition away clusters below eT threshold
00145     ClusterCollection::iterator part = 
00146       std::partition(
00147                      clusters->begin(),
00148                      clusters->end(),
00149                      PartitionCondition::AboveThresholdET( m_minClusterET )
00150                      );
00151     //retrieve cells from discarded clusters and delete clusters
00152     //    std::for_each(part,clusters->end(),GetBackCells(unusedCells));
00153     ClusterCollection unusedClusters(part, clusters->end());
00154     AssocTypeRecoverer<ClusterCollection> atr2(unusedClusters);
00155     IKinematicCollection* recoveredCells= atr2.allAsIKinematics();
00156     unusedCells.reserve(unusedCells.size()+recoveredCells->size());
00157 
00158     IKinematicIterator iter;
00159     for(iter = recoveredCells->begin(); iter!= recoveredCells->end(); ++iter){
00160       unusedCells.push_back(*iter);
00161     }
00162 
00163     
00164     clusters->erase(part,clusters->end());
00165     //sort clusters by eT
00166     sort( clusters->begin(),clusters->end(),SortAttribute::DescendingET());
00167     return;
00168   }

Member Data Documentation

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

Holds a pointer to a normal cone strategy.

Definition at line 86 of file SharedConeStrategy.h.

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

double Atlfast::SharedConeStrategy::m_rConeBarrel [private]
 

Definition at line 88 of file SharedConeStrategy.h.

Referenced by makeClusters().

double Atlfast::SharedConeStrategy::m_rConeForward [private]
 

Definition at line 89 of file SharedConeStrategy.h.

double Atlfast::SharedConeStrategy::m_minClusterET [private]
 

Definition at line 90 of file SharedConeStrategy.h.

Referenced by makeClusters().

double Atlfast::SharedConeStrategy::m_barrelForwardEta [private]
 

Definition at line 91 of file SharedConeStrategy.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:18:59 2003 for AtlfastAlgs by doxygen1.3-rc1