#include <ClusterMaker.h>
Collaboration diagram for Atlfast::ClusterMaker:
Public Member Functions | |
ClusterMaker (const std::string &name, ISvcLocator *pSvcLocator) | |
virtual | ~ClusterMaker () |
StatusCode | initialize () |
StatusCode | execute () |
StatusCode | finalize () |
Private Member Functions | |
double | rCone () |
Private Attributes | |
double | m_rConeBarrel |
double | m_rConeForward |
double | m_minInitiatorET |
double | m_minClusterET |
bool | m_masslessJets |
std::string | m_strategy |
IClusterStrategy * | m_clusterStrategy |
bool | m_processTracks |
bool | m_processCells |
std::string | m_inputCellLocation |
std::string | m_inputTrackLocation |
std::string | m_outputLocation |
std::string | m_unusedCellLocation |
std::string | m_unusedTrackLocation |
double | m_ktRParameter |
std::string | m_ktAngle |
std::string | m_ktRecomScheme |
int | m_ktYCut |
KinematicHelper | m_kinehelp |
TesIO * | m_tesIO |
std::string | m_mcLocation |
ClusterMaking is currently defined as a process which uses Cells from the TES and forms Clusters from them. The strategy employed is to sum all Cells in a given R-cone around an initiator.
[Note: This might be more correctly called pre-jet formation as the R-cones are of jet size and therefore this algorithm does not really correspond to the normal notion of forming clusters from,say, adjacent energy deposits.]
ClusterMaker sequence
Definition at line 117 of file ClusterMaker.h.
Atlfast::ClusterMaker::ClusterMaker | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Standard Athena-Atlfast Constructor
Definition at line 47 of file ClusterMaker.cxx.
00048 : Algorithm( name, pSvcLocator ), 00049 m_clusterStrategy(0), 00050 m_tesIO(0) 00051 { 00052 00053 // Setting the parameter defaults. 00054 m_rConeBarrel = 0.401; //+.001 avoids grid problem 00055 m_rConeForward = 0.401; 00056 m_minInitiatorET = 1.5*GeV; 00057 m_minClusterET = 5.0*GeV; 00058 m_processCells = true; 00059 m_processTracks = false; 00060 m_inputCellLocation = "/Event/AtlfastCells" ; 00061 m_inputTrackLocation = "/Event/AtlfastTracks" ; 00062 m_outputLocation = "/Event/AtlfastClusters"; 00063 m_unusedCellLocation = "/Event/AtlfastUnusedCells"; 00064 m_unusedTrackLocation = "/Event/AtlfastUnusedTracks"; 00065 m_masslessJets = true; 00066 m_strategy = "Cone"; 00067 //===================== 00068 m_ktRParameter = 1.0; 00069 m_ktAngle = "deltaR"; 00070 m_ktRecomScheme = "E"; 00071 m_ktYCut = 0; 00072 // Declare the paramemters to Gaudi so that 00073 // they can be over-written via the job options file 00074 00075 declareProperty( "RConeBarrel", m_rConeBarrel ) ; 00076 declareProperty( "RConeForward", m_rConeForward ) ; 00077 declareProperty( "minInitiatorET", m_minInitiatorET ) ; 00078 declareProperty( "minClusterET", m_minClusterET ) ; 00079 declareProperty( "Strategy", m_strategy ) ; 00080 declareProperty( "ProcessCells", m_processCells ) ; 00081 declareProperty( "ProcessTracks", m_processTracks ) ; 00082 declareProperty( "InputCellLocation", m_inputCellLocation ) ; 00083 declareProperty( "InputTrackLocation", m_inputTrackLocation ) ; 00084 declareProperty( "OutputLocation", m_outputLocation ) ; 00085 declareProperty( "UnusedCellLocation", m_unusedCellLocation ) ; 00086 declareProperty( "UnusedTrackLocation", m_unusedTrackLocation ) ; 00087 declareProperty( "MasslessJets", m_masslessJets ) ; 00088 //============================================== 00089 declareProperty( "KtRParameter", m_ktRParameter ) ; 00090 declareProperty( "KtAngle", m_ktAngle ) ; 00091 declareProperty( "KtRecomScheme", m_ktRecomScheme ) ; 00092 declareProperty( "KtYCut", m_ktYCut ) ; 00093 00094 }
Atlfast::ClusterMaker::~ClusterMaker | ( | ) | [virtual] |
Default Destructor
Definition at line 97 of file ClusterMaker.cxx.
00097 { 00098 if(m_tesIO){ 00099 delete m_tesIO; 00100 } 00101 if(m_clusterStrategy){ 00102 delete m_clusterStrategy; 00103 } 00104 }
StatusCode Atlfast::ClusterMaker::initialize | ( | ) |
Standard Athena-Algorithm method
Definition at line 111 of file ClusterMaker.cxx.
00111 { 00112 00113 MsgStream log( messageService(), name() ) ; 00114 log << MSG::DEBUG<< "Cluster Maker initialising " << endreq; 00115 00116 //moved this before TesIO 00117 GlobalEventData* ged = GlobalEventData::Instance(); 00118 m_mcLocation = ged -> mcLocation(); 00119 00120 // m_tesIO = new TesIO( eventDataService() ); 00121 m_tesIO = new TesIO(m_mcLocation, ged->justHardScatter()); 00122 00123 if(m_strategy == "Cone"){ 00124 m_clusterStrategy = new ClusterConeStrategy( 00125 m_rConeBarrel, 00126 m_rConeForward, 00127 m_minInitiatorET, 00128 m_minClusterET, 00129 m_masslessJets); 00130 00131 } else if(m_strategy == "Kt"){ 00132 m_clusterStrategy = new ClusterKtStrategy(m_minClusterET,m_ktRParameter,m_ktAngle,m_ktRecomScheme,m_ktYCut); 00133 } else if(m_strategy == "Shared"){ 00134 double barrelForwardEta = ged -> barrelForwardEta(); 00135 m_clusterStrategy = new SharedConeStrategy(m_rConeBarrel, 00136 m_rConeForward, 00137 m_minInitiatorET, 00138 m_minClusterET, 00139 barrelForwardEta); 00140 }else{ 00141 m_clusterStrategy = new ClusterConeStrategy( 00142 m_rConeBarrel, 00143 m_rConeForward, 00144 m_minInitiatorET, 00145 m_minClusterET, 00146 m_masslessJets); 00147 00148 m_strategy = "Cone"; 00149 } 00150 00151 HeaderPrinter hp("Atlfast Cluster Maker:", log); 00152 hp.add("Cluster Strategy ", m_strategy); 00153 if(m_strategy == "Kt"){ 00154 hp.add( "Kt R-Parameter ", m_ktRParameter ) ; 00155 hp.add( "Kt Angle ", m_ktAngle ) ; 00156 hp.add( "Kt Recombination Scheme ", m_ktRecomScheme ) ; 00157 hp.add( "Kt Y-Merge value ", m_ktYCut ) ; 00158 }else{ 00159 hp.add("Endcap Cone Size ", m_rConeForward); 00160 hp.add("Barrel Cone Size ", m_rConeBarrel); 00161 hp.add("Min ET for Cell initiator ", m_minInitiatorET); 00162 } 00163 hp.add("Min ET for cluster ", m_minClusterET); 00164 hp.add("Process Cells ", m_processCells); 00165 hp.add("Process Tracks ", m_processTracks); 00166 if(m_processCells){ 00167 hp.add("Input CellLocation ", m_inputCellLocation); 00168 } 00169 if(m_processTracks) { 00170 hp.add("Input TrackLocation ", m_inputTrackLocation); 00171 } 00172 hp.add("Output Location ", m_outputLocation); 00173 hp.add("Unused Cell Location ", m_unusedCellLocation); 00174 hp.add("Unused Track Location ", m_unusedTrackLocation); 00175 hp.add("Massless Jets ", m_masslessJets); 00176 hp.print(); 00177 00178 return StatusCode::SUCCESS ; 00179 }
StatusCode Atlfast::ClusterMaker::execute | ( | ) |
Standard Athena-Algorithm method
Definition at line 202 of file ClusterMaker.cxx.
00202 { 00203 MsgStream log( messageService(), name() ) ; 00204 std::string message; 00205 //......................................................... 00206 // Extract the elements (cells, tracks..) from the TES 00207 // 00208 //copy to vector -cannot use DataVector fo r type change! 00209 std::vector<IKinematic*> elements; 00210 00211 TesIoStat stat; 00212 if(m_processCells){ 00213 stat = m_tesIO->copy<ITwoCptCellCollection>(elements, 00214 m_inputCellLocation); 00215 message = stat? "Found Cells in TES":"No Cells found in TES"; 00216 log<<MSG::DEBUG << message <<" "<<elements.size()<<endreq; 00217 } 00218 if(m_processTracks){ 00219 stat = m_tesIO->copy<TrackCollection>(elements, m_inputTrackLocation); 00220 message = stat? "Found Tracks in TES":"No Tracks found in TES"; 00221 log<<MSG::DEBUG << message <<" "<<elements.size()<<endreq; 00222 } 00223 // ...................... 00224 // Make a containers to store the new Cluster pointers, 00225 // and unused elements 00226 00227 IClusterCollection* clusters = new IClusterCollection ; 00228 IKinematicVector unusedLocalElements; 00229 00230 log << MSG::DEBUG << "Starting Clustering Strategy" << endreq ; 00231 00232 m_clusterStrategy->makeClusters( 00233 log, 00234 elements, 00235 unusedLocalElements, 00236 clusters 00237 ) ; 00238 00239 //...................................... 00240 // Set up for conversions of unused IKinematics back to concrete types 00241 // 00242 log<<MSG::DEBUG 00243 <<"Number Of Unused Local Elements " 00244 << unusedLocalElements.size()<<endreq; 00245 // TypeRecoverer atr(unusedLocalElements); 00246 TypeVisitor types = ContainerDispatcher( 00247 unusedLocalElements.begin(), 00248 unusedLocalElements.end(), 00249 TypeVisitor() 00250 ); 00251 //log<<MSG::DEBUG <<"Recovered Types "<<endreq; 00252 00253 00254 //Register the newly made clusters 00255 stat = m_tesIO -> store(clusters, m_outputLocation); 00256 message = stat ? "Clusters stored":"Failed to store Clusters "; 00257 log<<MSG::DEBUG<<message<<endreq; 00258 // Register the any unused IKs if they are Cells 00259 stat = m_tesIO -> store(new TwoCptCellVector(types.typeVector(TwoCptCell())), 00260 m_unusedCellLocation); 00261 message =stat? "unused cells stored":"unused cells store failed"; 00262 log<<MSG::DEBUG<<message<<endreq; 00263 //log<<MSG::DEBUG<<"Number Of Unused Cells "<< atr.cells()->size()<<endreq; 00264 // Register the any unused IKs if they are Tracks 00265 stat = m_tesIO -> store(new TrackVector(types.typeVector(Track())), 00266 m_unusedTrackLocation); 00267 message =stat? "unused tracks stored":"unused cells store failed"; 00268 log<<MSG::DEBUG<<message<<endreq; 00269 //log<<MSG::DEBUG<<"Number Of Unused Tracks "<< atr.tracks()->size()<<endreq; 00270 return stat ; 00271 00272 }
StatusCode Atlfast::ClusterMaker::finalize | ( | ) |
double Atlfast::ClusterMaker::rCone | ( | ) | [private] |
Looks up R-cone size according to position of initiator.
double Atlfast::ClusterMaker::m_rConeBarrel [private] |
R-cone size for summation of Cells within barrel region
Definition at line 159 of file ClusterMaker.h.
double Atlfast::ClusterMaker::m_rConeForward [private] |
R-cone size for summation of Cells within forward regions
Definition at line 161 of file ClusterMaker.h.
double Atlfast::ClusterMaker::m_minInitiatorET [private] |
Minimun eT needed for a Cell to initiate a new Cluster
Definition at line 164 of file ClusterMaker.h.
double Atlfast::ClusterMaker::m_minClusterET [private] |
Minimum eT which a candidate cluster must have to be retained
Definition at line 167 of file ClusterMaker.h.
bool Atlfast::ClusterMaker::m_masslessJets [private] |
Whether to construct Clusters (jets) as massless or not
Definition at line 170 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_strategy [private] |
Cluster Strategy
Definition at line 173 of file ClusterMaker.h.
Definition at line 174 of file ClusterMaker.h.
bool Atlfast::ClusterMaker::m_processTracks [private] |
What to process
Definition at line 176 of file ClusterMaker.h.
bool Atlfast::ClusterMaker::m_processCells [private] |
Definition at line 177 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_inputCellLocation [private] |
TES input locations
Definition at line 179 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_inputTrackLocation [private] |
Definition at line 180 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_outputLocation [private] |
TES output Cluster location
Definition at line 182 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_unusedCellLocation [private] |
TES output unused tracks and clusters location
Definition at line 184 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_unusedTrackLocation [private] |
Definition at line 185 of file ClusterMaker.h.
double Atlfast::ClusterMaker::m_ktRParameter [private] |
Kt Cluster Parameters
Definition at line 188 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_ktAngle [private] |
Definition at line 189 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_ktRecomScheme [private] |
Definition at line 190 of file ClusterMaker.h.
int Atlfast::ClusterMaker::m_ktYCut [private] |
Calculates y-cut value for jet merging, if set to zero no sub-jet analysis performed
Definition at line 192 of file ClusterMaker.h.
Help with common kinematic operations
Definition at line 199 of file ClusterMaker.h.
TesIO* Atlfast::ClusterMaker::m_tesIO [private] |
helper class to deal with TES I/O 1
Definition at line 221 of file ClusterMaker.h.
std::string Atlfast::ClusterMaker::m_mcLocation [private] |
Definition at line 224 of file ClusterMaker.h.