#include <SharedConeStrategy.h>
Inheritance diagram for Atlfast::SharedConeStrategy:
Public Types | |
typedef std::vector< IKinematic * > | localCellCollection |
typedef localCellCollection::iterator | localCellCollectionIterator |
Public Member Functions | |
SharedConeStrategy (double rConeBarrel, double rConeForward, double minInitiatorET, double minClusterET, double barrelForwardEta) | |
virtual | ~SharedConeStrategy () |
virtual void | makeClusters (MsgStream &log, const std::vector< IKinematic * > &storedCells, IKinematicVector &unusedCells, IClusterCollection *clusters) const |
Private Attributes | |
IClusterStrategy * | m_coneStrategy |
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.
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.
Atlfast::SharedConeStrategy::SharedConeStrategy | ( | double | rConeBarrel, | |
double | rConeForward, | |||
double | minInitiatorET, | |||
double | minClusterET, | |||
double | barrelForwardEta | |||
) |
Definition at line 23 of file SharedConeStrategy.cxx.
00027 : 00028 m_rConeBarrel(rConeBarrel), 00029 m_rConeForward(rConeForward), 00030 m_minClusterET(minClusterET), 00031 m_barrelForwardEta(barrelForwardEta){ 00032 00036 m_coneStrategy = new ClusterConeStrategy( rConeBarrel, 00037 rConeForward, 00038 minInitiatorET, 00039 minInitiatorET,//crazy!!!!! 00040 true); 00041 }
Atlfast::SharedConeStrategy::~SharedConeStrategy | ( | ) | [virtual] |
void Atlfast::SharedConeStrategy::makeClusters | ( | MsgStream & | log, | |
const std::vector< IKinematic * > & | storedCells, | |||
IKinematicVector & | unusedCells, | |||
IClusterCollection * | clusters | |||
) | const [virtual] |
Implements Atlfast::IClusterStrategy.
Definition at line 102 of file SharedConeStrategy.cxx.
00105 { 00106 //Firstly Call the bog Standard ClusterConeStrategy 00107 m_coneStrategy->makeClusters(log, storedCells, unusedCells, clusters); 00108 //Now recalibrate those clusters 00109 00110 std::map<ICluster*,double> aMap; 00111 IClusterCollection::iterator cluIter = clusters->begin(); 00112 for(; cluIter != clusters->end(); ++cluIter) {aMap[*cluIter] = 0.0;} 00113 00114 //Make A collection of all used cells 00115 // AssocTypeRecoverer atr(clusters->begin(), clusters->end()); 00116 // std::vector<const IKinematic*>* usedCells = atr.ikinematics(); 00117 TypeVisitor atr =ContainerAssocsDispatcher( 00118 clusters->begin(), 00119 clusters->end(), 00120 TypeVisitor() 00121 ); 00122 std::vector<const IKinematic*> usedCells = atr.ikinematics(); 00123 00124 // find a weight for each cluster, and put into map 00125 std::for_each(usedCells.begin(), 00126 usedCells.end(), 00127 CellAssociatedClusterEnergy( //defined above 00128 clusters, 00129 aMap, 00130 m_rConeBarrel 00131 ) 00132 00133 ); 00134 00135 //recalculate cluster energies 00136 cluIter = clusters->begin(); 00137 for(; cluIter != clusters->end(); ++cluIter){ 00138 if(aMap.find(*cluIter) != aMap.end() && aMap[*cluIter] != 0.0) { 00139 double theta = ( (*cluIter)->momentum() ).theta(); 00140 double t = aMap[*cluIter]; 00141 double eT = t*sin(theta); 00142 00143 double x = eT * cos( (*cluIter)->phi() ) ; 00144 double y = eT * sin( (*cluIter)->phi() ) ; 00145 double z = t * cos( theta ) ; 00146 00147 (*cluIter)->setMomentum(HepLorentzVector(x,y,z,t)); 00148 } 00149 } 00150 //Partition away clusters below eT threshold 00151 IClusterCollection::iterator part = 00152 std::partition( 00153 clusters->begin(), 00154 clusters->end(), 00155 PartitionCondition::AboveThresholdET( m_minClusterET ) 00156 ); 00157 //retrieve cells from discarded clusters and delete clusters 00158 // std::for_each(part,clusters->end(),GetBackCells(unusedCells)); 00159 IClusterCollection unusedClusters(part, clusters->end()); 00160 // AssocTypeRecoverer atr2(unusedClusters.begin(), unusedClusters.end()); 00161 // IKinematicVector* recoveredCells= atr2.ikinematics(); 00162 TypeVisitor tv = 00163 ContainerAssocsDispatcher( 00164 unusedClusters.begin(), 00165 unusedClusters.end(), 00166 TypeVisitor() 00167 ); 00168 IKinematicVector recoveredCells = tv.ikinematics(); 00169 00170 unusedCells.reserve(unusedCells.size()+recoveredCells.size()); 00171 00172 std::copy( 00173 recoveredCells.begin(), 00174 recoveredCells.end(), 00175 back_inserter(unusedCells) 00176 ); 00177 00178 00179 clusters->erase(part,clusters->end()); 00180 //sort clusters by eT 00181 sort( clusters->begin(),clusters->end(),SortAttribute::DescendingET()); 00182 return; 00183 }
Holds a pointer to a normal cone strategy
Definition at line 86 of file SharedConeStrategy.h.
double Atlfast::SharedConeStrategy::m_rConeBarrel [private] |
Definition at line 88 of file SharedConeStrategy.h.
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.
double Atlfast::SharedConeStrategy::m_barrelForwardEta [private] |
Definition at line 91 of file SharedConeStrategy.h.