#include <ClusterConeStrategy.h>
Inheritance diagram for Atlfast::ClusterConeStrategy:
Public Member Functions | |
ClusterConeStrategy (double rConeBarrel, double rConeForward, double minInitiatorET, double minClusterET, bool masslessJets) | |
virtual void | makeClusters (MsgStream &log, const std::vector< IKinematic * > &storedCells, IKinematicVector &unusedCells, IClusterCollection *clusters) const |
Private Member Functions | |
double | rCone () const |
Private Attributes | |
double | m_rConeBarrel |
double | m_rConeForward |
double | m_minInitiatorET |
double | m_minClusterET |
bool | m_masslessJets |
KinematicHelper | m_kinehelp |
Cluster * | lnkCluster |
Classes | |
class | PreCluster |
Default R-cone value is 0.401. The 0.001 avoids problems with the 0.1x0.1 grid when running on Atlfast calorimeter cells. This strategy has been shown to produce different results than the JetRec cone jet finder and should be superseded soon.
Definition at line 62 of file ClusterConeStrategy.h.
Atlfast::ClusterConeStrategy::ClusterConeStrategy | ( | double | rConeBarrel, | |
double | rConeForward, | |||
double | minInitiatorET, | |||
double | minClusterET, | |||
bool | masslessJets | |||
) | [inline] |
Constructor initialises R-cone and min ET values, and massless jets switch.
Definition at line 66 of file ClusterConeStrategy.h.
00072 : 00073 m_rConeBarrel(rConeBarrel), 00074 m_rConeForward(rConeForward), 00075 m_minInitiatorET(minInitiatorET), 00076 m_minClusterET(minClusterET), 00077 m_masslessJets(masslessJets){}
void Atlfast::ClusterConeStrategy::makeClusters | ( | MsgStream & | log, | |
const std::vector< IKinematic * > & | storedCells, | |||
IKinematicVector & | unusedCells, | |||
IClusterCollection * | clusters | |||
) | const [virtual] |
Performs the cone clustering
Implements Atlfast::IClusterStrategy.
Definition at line 34 of file ClusterConeStrategy.cxx.
00038 { 00039 log << MSG::DEBUG << storedCells.size() << "cells to start with"<<endreq; 00040 // The cell collection suppplied is not mutable as it contains items 00041 // (or pointers to items) in the TES. 00042 // Therefore we copy pointers to two local mutable collections as we want 00043 // to manipulate them as part of the clustering strategy 00044 00045 // This is to hold cells remaining available for cluster formation. 00046 localCellCollection availableCells(storedCells.begin(), 00047 storedCells.end() ); 00048 localCellIterator firstAvailableCell = availableCells.begin() ; 00049 localCellIterator lastAvailableCell = availableCells.end() ; 00050 00051 // This is to keep remaining candidate initiators. 00052 localCellCollection availableInitiators( storedCells.begin(), 00053 storedCells.end() ) ; 00054 localCellIterator firstAvailableInitiator = availableInitiators.begin() ; 00055 localCellIterator lastAvailableInitiator = availableInitiators.end() ; 00056 00057 // Partition the inititator candidates to retain only those above threshold 00058 lastAvailableInitiator 00059 = partition( firstAvailableInitiator, 00060 lastAvailableInitiator, 00061 PartitionCondition::AboveThresholdET( m_minInitiatorET ) 00062 ); 00063 00064 // Sort the remaining initiator candidates into descending order of eT 00065 // This means the first available initiator will always be the highest eT 00066 sort( firstAvailableInitiator, 00067 lastAvailableInitiator, 00068 SortAttribute::DescendingET() 00069 ); 00070 00071 00072 // Iterate over all initiator candidates 00073 00074 while( firstAvailableInitiator != lastAvailableInitiator ) { 00075 00076 // Partition the cells to find those within the required R-cone 00077 00078 //substitute an rCone with no args to stop the compiler wingeing 00079 // about unused parameters 00080 // double rCone = this->rCone( *firstAvailableInitiator ) ; 00081 double rCone = this->rCone( ) ; 00082 00083 localCellIterator endCellInCone = partition 00084 ( 00085 firstAvailableCell, 00086 lastAvailableCell, 00087 PartitionCondition::BelowThresholdDeltaR( *firstAvailableInitiator, 00088 rCone ) 00089 ); 00090 00091 // Accumulate all cells in cone to get weighted kinematic centre 00092 // We use a PreCluster helper object for this 00093 PreCluster preclus( firstAvailableCell, endCellInCone, m_masslessJets); 00094 00095 // Test if sum eT is above minumum. 00096 if( preclus.eT() > m_minClusterET ){ 00097 // Make a cluster and add to the collection 00098 HepLorentzVector temp=preclus; 00099 ICluster* newclus = 00100 new Cluster( temp, firstAvailableCell, endCellInCone ) ; 00101 // Cluster* newclus = 00102 // new Cluster( preclus, firstAvailableCell, endCellInCone ) ; 00103 clusters->push_back( newclus ) ; 00104 00105 //log << MSG::DEBUG << "New Cluster created " << newclus << endreq ; 00106 00107 // Remove all used cells from the available initiator range 00108 localCellIterator cell= firstAvailableCell; 00109 for(; cell != endCellInCone; ++cell ){ 00110 lastAvailableInitiator = 00111 std::remove( firstAvailableInitiator, 00112 lastAvailableInitiator, *cell ); 00113 } 00114 00115 // Remove all used cells from the available cell range 00116 firstAvailableCell = endCellInCone ; 00117 00118 }else{ 00119 //log << MSG::DEBUG << "Failed to form new cluster" 00120 // << *firstAvailableInitiator << endreq ; 00121 00122 // This initiator didnt lead to a good cluster. 00123 // Remove it from the available initiator range 00124 ++firstAvailableInitiator ; 00125 } 00126 00127 } 00128 00129 localCellIterator cellIter = firstAvailableCell; 00130 for(; cellIter!=lastAvailableCell; ++cellIter){ 00131 // unusedCells.push_back(new Cell(**cellIter)); 00132 //PS 24/01/03 00133 //the next line replaces the previous line 00134 // but why was it there in the first place? 00135 // unusedCells.push_back( (*cellIter)->clone() ); 00136 unusedCells.push_back(*cellIter); 00137 } 00138 return; 00139 }
double Atlfast::ClusterConeStrategy::rCone | ( | ) | const [private] |
Strategy for making clusters from cells
Definition at line 147 of file ClusterConeStrategy.cxx.
00147 { 00148 // Temporary: return barrel always as we dont have mechanism 00149 // to determine calorimeter geometry yet. 00150 return m_rConeBarrel ; 00151 }
double Atlfast::ClusterConeStrategy::m_rConeBarrel [private] |
R-cone size for summation of Cells within barrel region
Definition at line 102 of file ClusterConeStrategy.h.
double Atlfast::ClusterConeStrategy::m_rConeForward [private] |
R-cone size for summation of Cells within forward regions
Definition at line 104 of file ClusterConeStrategy.h.
double Atlfast::ClusterConeStrategy::m_minInitiatorET [private] |
Minimun eT needed for a Cell to initiate a new Cluster
Definition at line 107 of file ClusterConeStrategy.h.
double Atlfast::ClusterConeStrategy::m_minClusterET [private] |
Minimum eT which a candidate cluster must have to be retained
Definition at line 110 of file ClusterConeStrategy.h.
bool Atlfast::ClusterConeStrategy::m_masslessJets [private] |
Definition at line 111 of file ClusterConeStrategy.h.
Help with common kinematic operations
Definition at line 118 of file ClusterConeStrategy.h.
Cluster* Atlfast::ClusterConeStrategy::lnkCluster [private] |
0..* output
Definition at line 164 of file ClusterConeStrategy.h.