Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::ClusterMaker Class Reference

ClusterMaking is currently defined as a process which uses Cells from the TES and forms Clusters from them. More...

#include <ClusterMaker.h>

Collaboration diagram for Atlfast::ClusterMaker:

Collaboration graph
[legend]
List of all members.

Public Methods

 ClusterMaker (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Atlfast Constructor.

virtual ~ClusterMaker ()
 Default Destructor.

StatusCode initialize ()
 Standard Athena-Algorithm method.

StatusCode execute ()
 Standard Athena-Algorithm method.

StatusCode finalize ()
 Standard Athena-Algorithm method.


Private Methods

double rCone ()
 Looks up R-cone size according to position of initiator.


Private Attributes

double m_rConeBarrel
 R-cone size for summation of Cells within barrel region.

double m_rConeForward
 R-cone size for summation of Cells within forward regions.

double m_minInitiatorET
 Minimun eT needed for a Cell to initiate a new Cluster.

double m_minClusterET
 Minimum eT which a candidate cluster must have to be retained.

bool m_masslessJets
 Whether to construct Clusters (jets) as massless or not.

std::string m_strategy
 Cluster Strategy.

IClusterStrategy * m_clusterStrategy
bool m_processTracks
 What to process.

bool m_processCells
std::string m_inputCellLocation
 TES input locations.

std::string m_inputTrackLocation
std::string m_outputLocation
 TES output Cluster location.

std::string m_unusedCellLocation
 TES output unused tracks and clusters location.

std::string m_unusedTrackLocation
KinematicHelper m_kinehelp
 Help with common kinematic operations.

TesIO * m_tesIO
 helper class to deal with TES I/O 1


Detailed Description

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.]

Definition at line 113 of file ClusterMaker.h.


Constructor & Destructor Documentation

Atlfast::ClusterMaker::ClusterMaker const std::string &    name,
ISvcLocator *    pSvcLocator
 

Standard Athena-Atlfast Constructor.

Definition at line 49 of file ClusterMaker.cxx.

00050     : Algorithm( name, pSvcLocator ){
00051     
00052     // Setting the parameter defaults.
00053     m_rConeBarrel         = 0.401; //+.001 avoids grid problem
00054     m_rConeForward        = 0.401;
00055     m_minInitiatorET      = 1.5;
00056     m_minClusterET        = 5.;
00057     m_processCells        = true;
00058     m_processTracks       = false;
00059     m_inputCellLocation   = "/Event/AtlfastCells" ;
00060     m_inputTrackLocation  = "/Event/AtlfastTracks" ;
00061     m_outputLocation      = "/Event/AtlfastClusters";
00062     m_unusedCellLocation  = "/Event/AtlfastUnusedCells";
00063     m_unusedTrackLocation = "/Event/AtlfastUnusedTracks";
00064     m_masslessJets        = true;
00065     m_strategy            = "Cone";
00066     // Declare the paramemters to Gaudi so that
00067     // they can be over-written via the job options file
00068     
00069     declareProperty( "RConeBarrel",         m_rConeBarrel ) ;
00070     declareProperty( "RConeForward",        m_rConeForward ) ;
00071     declareProperty( "minInitiatorET",      m_minInitiatorET ) ;
00072     declareProperty( "minClusterET",        m_minClusterET ) ;
00073     declareProperty( "Strategy",            m_strategy ) ;
00074     declareProperty( "ProcessCells",        m_processCells ) ;
00075     declareProperty( "ProcessTracks",       m_processTracks ) ;
00076     declareProperty( "InputCellLocation",   m_inputCellLocation ) ;
00077     declareProperty( "InputTrackLocation",  m_inputTrackLocation ) ;
00078     declareProperty( "OutputLocation",      m_outputLocation ) ;
00079     declareProperty( "UnusedCellLocation",  m_unusedCellLocation ) ;
00080     declareProperty( "UnusedTrackLocation", m_unusedTrackLocation ) ;
00081     declareProperty( "MasslessJets",        m_masslessJets ) ;
00082     
00083   }

Atlfast::ClusterMaker::~ClusterMaker   [virtual]
 

Default Destructor.

Definition at line 86 of file ClusterMaker.cxx.

References m_clusterStrategy, and m_tesIO.

00086                               {
00087     if(m_tesIO){ 
00088       delete m_tesIO;
00089     }
00090     if(m_clusterStrategy){ 
00091       delete m_clusterStrategy;
00092     }
00093   } 

Member Function Documentation

StatusCode Atlfast::ClusterMaker::initialize  
 

Standard Athena-Algorithm method.

Definition at line 100 of file ClusterMaker.cxx.

References m_clusterStrategy, m_inputCellLocation, m_inputTrackLocation, m_masslessJets, m_minClusterET, m_minInitiatorET, m_outputLocation, m_processCells, m_processTracks, m_rConeBarrel, m_rConeForward, m_strategy, m_tesIO, m_unusedCellLocation, and m_unusedTrackLocation.

00100                                      {
00101  
00102    MsgStream log( messageService(), name() ) ;
00103    log << MSG::DEBUG<< "Cluster Maker initialising " << endreq;
00104  
00105 
00106    //    m_tesIO = new TesIO( eventDataService() );
00107    m_tesIO = new TesIO();
00108     if(m_strategy == "Cone"){
00109       m_clusterStrategy = new ClusterConeStrategy(
00110                                                   m_rConeBarrel,   
00111                                                   m_rConeForward,
00112                                                   m_minInitiatorET,
00113                                                   m_minClusterET,
00114                                                   m_masslessJets);
00115 
00116     } else if(m_strategy == "Kt"){
00117       m_clusterStrategy = new ClusterKtStrategy(m_minClusterET);
00118     } else if(m_strategy == "Shared"){
00119       GlobalEventData* ged = GlobalEventData::Instance();
00120       double barrelForwardEta = ged -> barrelForwardEta();
00121       m_clusterStrategy = new SharedConeStrategy(m_rConeBarrel,   
00122                                                  m_rConeForward,
00123                                                  m_minInitiatorET,
00124                                                  m_minClusterET,
00125                                                  barrelForwardEta);
00126     }else{
00127       m_clusterStrategy = new ClusterConeStrategy(
00128                                                   m_rConeBarrel,   
00129                                                   m_rConeForward,
00130                                                   m_minInitiatorET,
00131                                                   m_minClusterET,
00132                                                   m_masslessJets);
00133       
00134       m_strategy = "Cone";
00135     }
00136 
00137     HeaderPrinter hp("Atlfast Cluster Maker:", log);
00138     hp.add("Endcap Cone Size            ", m_rConeForward);
00139     hp.add("Barrel Cone Size            ", m_rConeBarrel);
00140     hp.add("Min ET for Cell initiator   ", m_minInitiatorET);
00141     hp.add("Min ET for cluster          ", m_minClusterET);
00142     hp.add("Cluster Strategy            ", m_strategy);  
00143     hp.add("Process Cells               ", m_processCells);
00144     hp.add("Process Tracks              ", m_processTracks);
00145     if(m_processCells){
00146       hp.add("Input CellLocation          ", m_inputCellLocation);
00147     }
00148     if(m_processTracks) {
00149       hp.add("Input TrackLocation         ", m_inputTrackLocation);
00150     }
00151     hp.add("Output Location             ", m_outputLocation);    
00152     hp.add("Unused Cell Location        ", m_unusedCellLocation);    
00153     hp.add("Unused Track Location       ", m_unusedTrackLocation);    
00154     hp.add("Massless Jets               ", m_masslessJets);    
00155     hp.print();
00156 
00157     return StatusCode::SUCCESS ;
00158   }

StatusCode Atlfast::ClusterMaker::execute  
 

Standard Athena-Algorithm method.

Definition at line 181 of file ClusterMaker.cxx.

References Atlfast::AssocTypeConverter< T >::cells(), m_clusterStrategy, m_inputCellLocation, m_inputTrackLocation, m_outputLocation, m_tesIO, m_unusedCellLocation, m_unusedTrackLocation, and Atlfast::AssocTypeConverter< T >::tracks().

00181                                    {
00182     MsgStream log( messageService(), name() ) ;
00183     std::string message;
00184     //.........................................................
00185     // Extract the elements (cells, tracks..) from the TES 
00186     //
00187     //copy to vector -cannot use DataVector fo r type change!
00188     std::vector<IKinematic*> elements;  
00189 
00190     TesIoStat stat;
00191     if(m_processCells){
00192       stat = m_tesIO->copy<ITwoCptCellCollection>(elements, 
00193                                                   m_inputCellLocation);
00194       message = stat?  "Found Cells in TES":"No Cells found in TES";
00195       log<<MSG::DEBUG << message <<" "<<elements.size()<<endreq;
00196     }
00197     if(m_processTracks){
00198       stat = m_tesIO->copy<TrackCollection>(elements, m_inputTrackLocation);
00199       message = stat?  "Found Tracks in TES":"No Tracks found in TES";
00200       log<<MSG::DEBUG << message <<" "<<elements.size()<<endreq;
00201     }
00202     // ......................
00203     // Make a containers to store the new Cluster pointers,
00204     // and unused elements
00205     
00206     ClusterCollection* clusters = new ClusterCollection ;
00207     std::vector<IKinematic*> unusedLocalElements;
00208 
00209     log << MSG::DEBUG << "Starting Clustering Strategy"  << endreq ;
00210     
00211     m_clusterStrategy->makeClusters( 
00212                                     log, 
00213                                     elements, 
00214                                     unusedLocalElements, 
00215                                     clusters
00216                                     ) ;
00217     
00218     //......................................
00219     // Set up for conversions of unused IKinematics back to concrete types
00220     //
00221     AssocTypeConverter<std::vector<IKinematic*> > atr(unusedLocalElements);
00222     log<<MSG::DEBUG<<"Number Of Unused Local Elements "<< unusedLocalElements.size()<<endreq;
00223 
00224     //Register the newly made clusters
00225     stat = m_tesIO -> store(clusters, m_outputLocation);
00226     message = stat ?  "Clusters stored":"Failed to store Clusters ";
00227     log<<MSG::DEBUG<<message<<endreq;
00228     //  Register the any unused IKs if they are Cells
00229     stat = m_tesIO -> store(atr.cells(), m_unusedCellLocation);
00230     message =stat? "unused cells stored":"unused cells store failed";
00231     log<<MSG::DEBUG<<message<<endreq;
00232     //log<<MSG::DEBUG<<"Number Of Unused Cells "<< atr.cells()->size()<<endreq;
00233     //  Register the any unused IKs if they are Tracks
00234     stat = m_tesIO -> store(atr.tracks(), m_unusedTrackLocation);
00235     message =stat? "unused tracks stored":"unused cells store failed";
00236     log<<MSG::DEBUG<<message<<endreq;
00237     //log<<MSG::DEBUG<<"Number Of Unused Tracks "<< atr.tracks()->size()<<endreq;
00238     return stat ;
00239     
00240   }

StatusCode Atlfast::ClusterMaker::finalize  
 

Standard Athena-Algorithm method.

Definition at line 164 of file ClusterMaker.cxx.

00164                                    {
00165     return StatusCode::SUCCESS ;
00166   }

double Atlfast::ClusterMaker::rCone   [private]
 

Looks up R-cone size according to position of initiator.


Member Data Documentation

double Atlfast::ClusterMaker::m_rConeBarrel [private]
 

R-cone size for summation of Cells within barrel region.

Definition at line 155 of file ClusterMaker.h.

Referenced by initialize().

double Atlfast::ClusterMaker::m_rConeForward [private]
 

R-cone size for summation of Cells within forward regions.

Definition at line 157 of file ClusterMaker.h.

Referenced by initialize().

double Atlfast::ClusterMaker::m_minInitiatorET [private]
 

Minimun eT needed for a Cell to initiate a new Cluster.

Definition at line 160 of file ClusterMaker.h.

Referenced by initialize().

double Atlfast::ClusterMaker::m_minClusterET [private]
 

Minimum eT which a candidate cluster must have to be retained.

Definition at line 163 of file ClusterMaker.h.

Referenced by initialize().

bool Atlfast::ClusterMaker::m_masslessJets [private]
 

Whether to construct Clusters (jets) as massless or not.

Definition at line 166 of file ClusterMaker.h.

Referenced by initialize().

std::string Atlfast::ClusterMaker::m_strategy [private]
 

Cluster Strategy.

Definition at line 169 of file ClusterMaker.h.

Referenced by initialize().

IClusterStrategy* Atlfast::ClusterMaker::m_clusterStrategy [private]
 

Definition at line 170 of file ClusterMaker.h.

Referenced by execute(), initialize(), and ~ClusterMaker().

bool Atlfast::ClusterMaker::m_processTracks [private]
 

What to process.

Definition at line 172 of file ClusterMaker.h.

Referenced by initialize().

bool Atlfast::ClusterMaker::m_processCells [private]
 

Definition at line 173 of file ClusterMaker.h.

Referenced by initialize().

std::string Atlfast::ClusterMaker::m_inputCellLocation [private]
 

TES input locations.

Definition at line 175 of file ClusterMaker.h.

Referenced by execute(), and initialize().

std::string Atlfast::ClusterMaker::m_inputTrackLocation [private]
 

Definition at line 176 of file ClusterMaker.h.

Referenced by execute(), and initialize().

std::string Atlfast::ClusterMaker::m_outputLocation [private]
 

TES output Cluster location.

Definition at line 178 of file ClusterMaker.h.

Referenced by execute(), and initialize().

std::string Atlfast::ClusterMaker::m_unusedCellLocation [private]
 

TES output unused tracks and clusters location.

Definition at line 180 of file ClusterMaker.h.

Referenced by execute(), and initialize().

std::string Atlfast::ClusterMaker::m_unusedTrackLocation [private]
 

Definition at line 181 of file ClusterMaker.h.

Referenced by execute(), and initialize().

KinematicHelper Atlfast::ClusterMaker::m_kinehelp [private]
 

Help with common kinematic operations.

Definition at line 190 of file ClusterMaker.h.

TesIO* Atlfast::ClusterMaker::m_tesIO [private]
 

helper class to deal with TES I/O 1

Definition at line 212 of file ClusterMaker.h.

Referenced by execute(), initialize(), and ~ClusterMaker().


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