00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ATLFAST_FINALSTATERPARTICLEHISTOGRAMMAKER_H
00023 #define ATLFAST_FINALSTATERPARTICLEHISTOGRAMMAKER_H
00024
00025
00026 #include <vector>
00027 #include <string>
00028 #include <utility>
00029 #include <map>
00030
00031
00032 #include "GaudiKernel/ISvcLocator.h"
00033 #include "GaudiKernel/IAlgorithm.h"
00034 #include "GaudiKernel/Algorithm.h"
00035 #include "GaudiKernel/MsgStream.h"
00036 #include "GaudiKernel/DataObject.h"
00037
00038 #include "AIDA/IHistogram1D.h"
00039
00040
00041 #include "CLHEP/Vector/LorentzVector.h"
00042 #include "HepMC/GenVertex.h"
00043
00044
00045 #include "AtlfastEvent/Cell.h"
00046 #include "AtlfastEvent/Cell.h"
00047 #include "AtlfastEvent/CollectionDefs.h"
00048 #include "AtlfastEvent/SimpleKinematic.h"
00049 #include "AtlfastEvent/ParticleCodes.h"
00050
00051 #include "AtlfastUtils/TesIO.h"
00052 #include "AtlfastUtils/FunctionObjects.h"
00053 #include "AtlfastUtils/HepMC_helper/HepMC_helper.h"
00054
00055 #include "AtlfastAlgs/GlobalEventData.h"
00056
00057
00058 namespace HepMC_helper{
00059 class IMCselector;
00060 class MCselectorWrapper;
00061 }
00062
00063 namespace Atlfast {
00064
00065 using std::string;
00066 using std::pair;
00067 using std::vector;
00068 using std::map;
00069
00073 class FillHistograms{
00074
00075 public:
00076 FillHistograms(TesIO* tesIOPtr,
00077 MsgStream &log,
00078 map< string, vector<IHistogram1D*> > &histContainer):
00079 m_tesIO(tesIOPtr),
00080 m_log(log),
00081 m_histogramContainer(histContainer){}
00082 void operator()(pair< string, HepMC_helper::MCselectorWrapper*> &pairPtr);
00083
00084 private:
00085
00086 void Fill(MCparticleCollection&, string&);
00087
00088 TesIO* m_tesIO;
00089 MsgStream &m_log;
00090 map< string, vector<IHistogram1D*> > &m_histogramContainer;
00091
00092 };
00093
00100 class FinalStateParticleHistogramMaker : public Algorithm {
00101
00102 public:
00103
00104
00105
00106
00107
00108
00109
00111 FinalStateParticleHistogramMaker( const std::string& name, ISvcLocator* pSvcLocator ) ;
00113 virtual ~FinalStateParticleHistogramMaker();
00114
00115
00116
00117
00118
00120 virtual StatusCode initialize() ;
00122 virtual StatusCode execute() ;
00124 virtual StatusCode finalize() ;
00125
00126
00127
00128 private:
00129
00130 void PutIntoContainer(string&, HepMC_helper::MCselectorWrapper*);
00131 void BookHistograms(string&);
00132 void SetHistogramLimits();
00133
00134 void AllSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00135 void Z0SelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00136 void VisibleToCalSelectorSetups(string&,HepMC_helper::MCselectorWrapper*,GlobalEventData*);
00137 void InvisibleToAtlasSelectorSetups(string &,HepMC_helper::MCselectorWrapper*,GlobalEventData*);
00138 void IsFinalStateSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00139 void BSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00140 void ElectronSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00141 void PhotonSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00142 void MuonSelectorSetups(string&,HepMC_helper::MCselectorWrapper*);
00143 void DefaultReconstructedParticleSelectorSetups(HepMC_helper::MCselectorWrapper*&,
00144 int particleType, double ptMin, double etaMax);
00145
00147 std::string m_inputLocation ;
00148 TesIO* m_tesIO;
00149
00150 std::string m_mcLocation;
00151
00152
00153 int m_multBins; double m_multLow, m_multHigh;
00154 int m_eBins; double m_eLow, m_eHigh;
00155 int m_pxBins; double m_pxLow, m_pxHigh;
00156 int m_pyBins; double m_pyLow, m_pyHigh;
00157 int m_pzBins; double m_pzLow, m_pzHigh;
00158 int m_eSumBins; double m_eSumLow, m_eSumHigh;
00159 int m_pxSumBins; double m_pxSumLow, m_pxSumHigh;
00160 int m_pySumBins; double m_pySumLow, m_pySumHigh;
00161 int m_pzSumBins; double m_pzSumLow, m_pzSumHigh;
00162
00164 vector< pair< string, HepMC_helper::MCselectorWrapper* > > m_selectorContainer;
00165 map< string, vector<IHistogram1D*> > m_histogramContainer;
00166
00167
00168
00169
00170 };
00171
00172 }
00173
00174 #endif
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187