Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 // ================================================
002 // GlobalEventData Singleton class Implementation
003 // ================================================
004 //
005 // This file contains all the common data variables 
006 // needed by Atlfast to run
007 // They are stored as statics so that the class needs not be instantiated
008 // and they can be accesed in algorithms execute() methods.
009 //
010 // Namespace Atlfast
011 //
012 
013 #include "AtlfastAlgs/GlobalEventData.h"
014 
015 #include "AtlfastUtils/HepMC_helper/MCCuts.h"
016 #include "AtlfastUtils/HepMC_helper/AscendingEta.h"
017 #include "AtlfastUtils/HepMC_helper/SelectJetTag.h"
018 #include "AtlfastUtils/HepMC_helper/SelectTauTag.h"
019 #include "AtlfastUtils/HepMC_helper/IsCharged.h"
020 #include "AtlfastUtils/HepMC_helper/BFieldCutter.h"
021 #include "AtlfastUtils/HepMC_helper/RejectType.h"
022 #include "AtlfastUtils/HepMC_helper/Unseen.h"
023 #include "TruthHelper/GenIMCselector.h"
024 #include "TruthHelper/IsGenType.h"
025 #include "TruthHelper/IsGenStable.h"
026 #include "TruthHelper/NCutter.h"
027 
028 #include "AtlfastEvent/ParticleCodes.h"
029 
030 namespace Atlfast {
031   //declare static member variables
032   GlobalEventData* GlobalEventData::m_instance = 0;
033   //Singleton Instance method to makesure only one object instanciated
034   GlobalEventData* GlobalEventData::Instance() {
035     if(m_instance == 0){
036       m_instance = new GlobalEventData();
037     }
038     return m_instance;
039   }
040   //set values of static member variables
041   void GlobalEventData::setValues(int lumi,
042                                   bool fieldOn,
043                                   double barrelForwardEta,
044                                   int randSeed,
045                                   std::vector<int> invisibles,
046                                   std::string mcLocation,
047                                   std::vector<int> monopoleIDs,
048                                   bool justHardScatter,
049                                   std::string detEffectsFileName,
050                                   std::string muonAlignFileName,
051                                   std::string muonLinearFitAlignFileName,
052                                   double muonMisalignment){
053     /** The events Luninosity */
054     m_lumi = lumi;
055     /**On/Off switch B-field */
056     m_fieldOn = fieldOn;
057     /**Geometry info */
058     m_barrelForwardEta = barrelForwardEta;
059     /** randm seed for Smearer */
060     m_randSeed = randSeed;
061     /** ids of invis partcles */
062     m_invisibles = invisibles;
063     /** Storegate key for the mc data */
064     m_mcLocation = mcLocation;
065     /** Adjust missing ET for isolation? */
066     m_adjustMissEtForIsolation = true;
067     /** PDG ID for magnetic monopoles */
068     m_monopoleIDs = monopoleIDs;
069     /** Just consider the hard scatter GenEvent? */
070     m_justHardScatter = justHardScatter;
071     /** detector effects data file name */
072     m_detEffectsFileName = detEffectsFileName;
073     /** muon misalignment data file name */
074     m_muonAlignFileName = muonAlignFileName;
075     /** muon misalignment data file name (linear fit) */
076     m_muonLinearFitAlignFileName = muonLinearFitAlignFileName;
077     /** muon misalignment value */
078     m_muonMisalignment = muonMisalignment;
079     /** ids of invis partcles */
080     std::vector<int> temp = m_invisibles;
081     TruthHelper::GenIMCselector* selector;
082     std::vector<TruthHelper::GenIMCselector*> selectors;
083     temp.push_back(ParticleCodes::MUON);
084     /** Make a selector with particles belonging to the final state*/
085     selector = new TruthHelper::IsGenStable();
086     selectors.push_back( selector ); 
087     /** Rejects GenParticles accordimg to particle pdg id */
088     selector = new HepMC_helper::RejectType(temp);
089     selectors.push_back( selector ); 
090     
091     try{
092     /** Select GenParticles above pt threshold to reach barrel calorimeter */
093     /** Threshold is determined by the magnetic field and GenParticle charge */
094       selector = new HepMC_helper::BFieldCutter(m_fieldOn);
095     }catch(std::string errMsg){
096       std::cerr<<"GlobalEventData: error makign a BFieldCutter "
097                <<errMsg
098                <<std::endl;
099     }catch(...){
100       std::cerr<<"GlobalEventData: error makign a BFieldCutter "
101                <<std::endl;
102     }      
103     selectors.push_back(selector);
104     
105 
106     m_visibleToCal = new TruthHelper::NCutter(selectors);
107     
108     // make a selector of invisibles to Atlas
109     // neutrinos, muons out of acceptance and user selected pdg ids.
110     std::vector<TruthHelper::GenIMCselector*>::iterator iter;
111 
112     for(iter=selectors.begin(); iter!=selectors.end(); delete *iter, ++iter);
113     selectors.erase(selectors.begin(), selectors.end());
114 
115     selector = new TruthHelper::IsGenStable();
116     selectors.push_back( selector ); 
117 
118     selector = new HepMC_helper::Unseen(m_invisibles); 
119     selectors.push_back( selector );
120     /** Chain selectors together to make particles visible to Atlas */
121     m_visibleToAtlas = new TruthHelper::NCutter(selectors);
122 
123     for(iter=selectors.begin(); iter!=selectors.end(); delete *iter, ++iter);
124   }
125 
126   
127 }  //end of namespace bracket
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!