00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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
00026 GlobalEventData* GlobalEventData::m_instance = 0;
00027
00028 GlobalEventData* GlobalEventData::Instance() {
00029 if(m_instance == 0){
00030 m_instance = new GlobalEventData();
00031 }
00032 return m_instance;
00033 }
00034
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
00066
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 }
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097