#include <SharedConeStrategy.h>
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 |
Note that it uses the Initiator value for minClusterET in ClusterConeStrategy then it tests against given minClusterET after sharing is done.
Definition at line 63 of file SharedConeStrategy.h.
|
Definition at line 66 of file SharedConeStrategy.h. |
|
Definition at line 67 of file SharedConeStrategy.h. |
|
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 } |
|
Definition at line 42 of file SharedConeStrategy.cxx. References m_coneStrategy.
00042 {delete m_coneStrategy;} |
|
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 } |
|
Holds a pointer to a normal cone strategy.
Definition at line 86 of file SharedConeStrategy.h. Referenced by makeClusters(), SharedConeStrategy(), and ~SharedConeStrategy(). |
|
Definition at line 88 of file SharedConeStrategy.h. Referenced by makeClusters(). |
|
Definition at line 89 of file SharedConeStrategy.h. |
|
Definition at line 90 of file SharedConeStrategy.h. Referenced by makeClusters(). |
|
Definition at line 91 of file SharedConeStrategy.h. |