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

GlobalEventData.cxx

Go to the documentation of this file.
00001 // ================================================
00002 // GlobalEventData Singleton class Implementation
00003 // ================================================
00004 //
00005 // This file contains all the common data variables 
00006 // needed by Atlfast to run
00007 // They are stored as statics so that the class needs not be instantiated
00008 // and they can be accesed in algorithms execute() methods.
00009 //
00010 // Namespace Atlfast
00011 //
00012 
00013 #include "AtlfastAlgs/GlobalEventData.h"
00014 
00015 #include "AtlfastUtils/HepMC_helper/IMCselector.h"
00016 #include "AtlfastUtils/HepMC_helper/IsFinalState.h"
00017 #include "AtlfastUtils/HepMC_helper/RejectType.h"
00018 #include "AtlfastUtils/HepMC_helper/BFieldCutter.h"
00019 #include "AtlfastUtils/HepMC_helper/NCutter.h"
00020 #include "AtlfastUtils/HepMC_helper/Unseen.h"
00021 
00022 #include "AtlfastEvent/ParticleCodes.h"
00023 
00024 namespace Atlfast {
00025   //declare static member variables
00026   GlobalEventData* GlobalEventData::m_instance = 0;
00027   //Singleton Instance method to makesure only one object instanciated
00028   GlobalEventData* GlobalEventData::Instance() {
00029     if(m_instance == 0){
00030       m_instance = new GlobalEventData();
00031     }
00032     return m_instance;
00033   }
00034   //set values of static member variables
00035   void GlobalEventData::setValues(int l,bool fo,double bfe,int rs,std::vector<int> inv){
00036     m_lumi = l;
00037     m_fieldOn = fo;
00038     m_barrelForwardEta = bfe;
00039     m_randSeed = rs;
00040     m_invisibles = inv;
00041    
00042 
00043     std::vector<int> temp = m_invisibles;
00044     HepMC_helper::IMCselector* selector;
00045     std::vector<HepMC_helper::IMCselector*> selectors;
00046     temp.push_back(ParticleCodes::MUON);
00047 
00048    
00049 
00050     selector = new HepMC_helper::IsFinalState();
00051     selectors.push_back( selector ); 
00052    
00053     
00054     selector = new HepMC_helper::RejectType(temp);
00055     selectors.push_back( selector ); 
00056     
00057     
00058     selector = new HepMC_helper::BFieldCutter(m_fieldOn);
00059     selectors.push_back(selector);
00060     
00061 
00062       
00063     m_visibleToCal = new HepMC_helper::NCutter(selectors); 
00064     
00065     // make a selector of invisibles to Atlas
00066     // neutrinos, muons out of acceptance and user selected pdg ids.
00067     std::vector<HepMC_helper::IMCselector*>::iterator iter;
00068 
00069     for(iter=selectors.begin(); iter!=selectors.end(); delete *iter, ++iter);
00070     selectors.erase(selectors.begin(), selectors.end());
00071 
00072     
00073     selector = new HepMC_helper::IsFinalState();
00074     selectors.push_back( selector ); 
00075     
00076     selector = new HepMC_helper::Unseen(m_invisibles);
00077     selectors.push_back( selector ); 
00078     
00079     m_visibleToAtlas = new HepMC_helper::NCutter(selectors); 
00080 
00081     for(iter=selectors.begin(); iter!=selectors.end(); delete *iter, ++iter);
00082   }
00083 
00084   
00085 }  //end of namespace bracket
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 

Generated on Tue Jan 28 09:57:13 2003 for AtlfastAlgs by doxygen1.3-rc1