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

Atlfast::GlobalEventDataMaker Class Reference

This Algorithm sets all the Static GlobalEventData values in the Singleton class GlobalEventData.h in it initialize method. More...

#include <GlobalEventDataMaker.h>

Collaboration diagram for Atlfast::GlobalEventDataMaker:

Collaboration graph
[legend]
List of all members.

Public Methods

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

 ~GlobalEventDataMaker ()
 Default Destructor.

StatusCode initialize ()
 standard Athena-Algorithm method

StatusCode execute ()
 standard Athena-Algorithm method

StatusCode finalize ()
 standard Athena-Algorithm method


Private Attributes

int m_lumi
 Lumonosity low=1 high=2.

bool m_fieldOn
 Magnetic field on/off.

std::vector< int > m_invisibles
 Invisible partices neutrinos etc.

int m_randSeed
 Random seed.

double m_barrelForwardEta
 eta transition between barrel and forward detectors


Static Private Attributes

const int DEFAULT_lumi
const int DEFAULT_randSeed
const bool DEFAULT_fieldOn
const double DEFAULT_barrelForwardEta

Detailed Description

This Algorithm sets all the Static GlobalEventData values in the Singleton class GlobalEventData.h in it initialize method.

Author:
Jon Couchman

Definition at line 20 of file GlobalEventDataMaker.h.


Constructor & Destructor Documentation

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

Standard Athena-Algorithm Constructor.

Definition at line 27 of file GlobalEventDataMaker.cxx.

References m_barrelForwardEta, m_fieldOn, m_invisibles, m_lumi, and m_randSeed.

00031     : Algorithm( name, pSvcLocator )
00032   {
00033     // Set the parameter defaults.
00034     m_lumi              = 1;
00035     m_fieldOn           = true;
00036     m_barrelForwardEta  = 3.2;
00037     m_randSeed          = 12345;
00038     // Declare the paramemters to Gaudi so that
00039     // they can be over-written via the job options file
00040     declareProperty( "Luminosity",       m_lumi );
00041     declareProperty( "Invisibles",       m_invisibles );
00042     declareProperty( "BFieldOn",         m_fieldOn ) ;
00043     declareProperty( "RandomSeed",       m_randSeed ) ;
00044     declareProperty( "BarrelForwardEta", m_barrelForwardEta ) ;
00045   }

Atlfast::GlobalEventDataMaker::~GlobalEventDataMaker  
 

Default Destructor.

Definition at line 51 of file GlobalEventDataMaker.cxx.

00051                                               {
00052     MsgStream log( messageService(), name() ) ;
00053     log << MSG::INFO << "destructor, Global Event Data" << endreq;
00054  
00055     
00056   }

Member Function Documentation

StatusCode Atlfast::GlobalEventDataMaker::initialize  
 

standard Athena-Algorithm method

Definition at line 62 of file GlobalEventDataMaker.cxx.

References m_barrelForwardEta, m_fieldOn, m_invisibles, m_lumi, m_randSeed, and Atlfast::GlobalEventData::setValues().

00063   {
00064     MsgStream log( messageService(), name() ) ;
00065     log << MSG::DEBUG << "Initialising" << endreq; 
00066     log << MSG::DEBUG << "Making Invisibles" << endreq; 
00067     m_invisibles.push_back(ParticleCodes::NU_E);
00068     m_invisibles.push_back(ParticleCodes::NU_MU);
00069     m_invisibles.push_back(ParticleCodes::NU_TAU);
00070     std::vector<int>::iterator ibe = m_invisibles.begin();
00071     std::vector<int>::iterator originalEnd = m_invisibles.end();
00072     std::vector<int>::iterator ien;
00073     sort(ibe, originalEnd);
00074     ien=unique(ibe, originalEnd);
00075     m_invisibles.erase(ien, originalEnd);
00076 
00077     if(m_lumi != 1 && m_lumi != 2){
00078       log << MSG::WARNING << "Luminosity set to unknown value: " << m_lumi << endreq; 
00079       log << MSG::WARNING << "Luminosity reset to Low-Lumi == 1" << endreq;
00080       m_lumi = 1;
00081     }
00082     log << MSG::DEBUG << "Making Header" << endreq; 
00083     HeaderPrinter hp("Atlfast GlobalEventData Maker:", log);
00084     hp.add("Invisibles (Neutrinos hardwired invisible): ", ibe, ien);
00085     hp.add("Luminosity:                                 ", m_lumi);
00086     hp.add("Initial Random Number Seed:                 ", m_randSeed);
00087     hp.add("B-field On:                                 ", m_fieldOn);
00088     hp.add("Barrel Forward Eta:                         ", m_barrelForwardEta);
00089     hp.print();
00090     log << MSG::DEBUG << "Calling ged instance" << endreq; 
00091 
00092     //set values of GlobalEventVariables
00093 
00094     
00095     GlobalEventData* ged = GlobalEventData::Instance();
00096 
00097     log << MSG::DEBUG << "Calling ged setValues" << endreq; 
00098     ged->setValues(m_lumi,m_fieldOn,m_barrelForwardEta,m_randSeed,m_invisibles) ;
00099     log << MSG::DEBUG << "Everythng Completed" << endreq;
00100     return StatusCode::SUCCESS ;
00101   }

StatusCode Atlfast::GlobalEventDataMaker::execute  
 

standard Athena-Algorithm method

Definition at line 120 of file GlobalEventDataMaker.cxx.

00120                                            {
00121     // do nothing in execute
00122     return StatusCode::SUCCESS;
00123   }

StatusCode Atlfast::GlobalEventDataMaker::finalize  
 

standard Athena-Algorithm method

Definition at line 107 of file GlobalEventDataMaker.cxx.

00108   {
00109     
00110     MsgStream log( messageService(), name() ) ;
00111     log << MSG::INFO << "Finalizing" << endreq;  
00112     return StatusCode::SUCCESS ;
00113   }

Member Data Documentation

int Atlfast::GlobalEventDataMaker::m_lumi [private]
 

Lumonosity low=1 high=2.

Definition at line 35 of file GlobalEventDataMaker.h.

Referenced by GlobalEventDataMaker(), and initialize().

bool Atlfast::GlobalEventDataMaker::m_fieldOn [private]
 

Magnetic field on/off.

Definition at line 37 of file GlobalEventDataMaker.h.

Referenced by GlobalEventDataMaker(), and initialize().

std::vector<int> Atlfast::GlobalEventDataMaker::m_invisibles [private]
 

Invisible partices neutrinos etc.

Definition at line 39 of file GlobalEventDataMaker.h.

Referenced by GlobalEventDataMaker(), and initialize().

int Atlfast::GlobalEventDataMaker::m_randSeed [private]
 

Random seed.

Definition at line 41 of file GlobalEventDataMaker.h.

Referenced by GlobalEventDataMaker(), and initialize().

double Atlfast::GlobalEventDataMaker::m_barrelForwardEta [private]
 

eta transition between barrel and forward detectors

Definition at line 43 of file GlobalEventDataMaker.h.

Referenced by GlobalEventDataMaker(), and initialize().

const int Atlfast::GlobalEventDataMaker::DEFAULT_lumi [static, private]
 

Definition at line 48 of file GlobalEventDataMaker.h.

const int Atlfast::GlobalEventDataMaker::DEFAULT_randSeed [static, private]
 

Definition at line 48 of file GlobalEventDataMaker.h.

const bool Atlfast::GlobalEventDataMaker::DEFAULT_fieldOn [static, private]
 

Definition at line 52 of file GlobalEventDataMaker.h.

const double Atlfast::GlobalEventDataMaker::DEFAULT_barrelForwardEta [static, private]
 

Definition at line 54 of file GlobalEventDataMaker.h.


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