00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __ATLFAST_JetMaker__
00025 #define __ATLFAST_JetMaker__
00026
00027
00028 #include <vector>
00029 #include <string>
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
00039 #include "CLHEP/Vector/LorentzVector.h"
00040 #include "HepMC/GenEvent.h"
00041 #include "HepMC/GenParticle.h"
00042 #include "AtlfastCode/HepMC_helper.h"
00043
00044
00045
00046 #include "AtlfastCode/KinematicHelper.h"
00047 #include "AtlfastCode/Cluster.h"
00048 #include "AtlfastCode/ISmearer.h"
00049 #include "AtlfastCode/Jet.h"
00050 #include "AtlfastCode/JetCollection.h"
00051 #include "AtlfastCode/ReconstructedParticle.h"
00052 #include "AtlfastCode/ReconstructedParticleCollection.h"
00053 #include "AtlfastCode/MCparticleCollection.h"
00054 #include "AtlfastCode/JetSmearer.h"
00055 #include "AtlfastCode/FunctionObjects.h"
00056
00057 #include "AtlfastCode/TesIO.h"
00058
00059
00060
00061
00062 #define DEFAULT_minPT 10 // Minimum jet transverse momentum
00063 #define DEFAULT_maxEta 5 // eta range to consider
00064 #define DEFAULT_doSmearing true // Smear the jet four vector?
00065
00066 #define DEFAULT_rconeb 0.400
00067 #define DEFAULT_rconef 0.400
00068
00069
00070 #define DEFAULT_bPtMin 5.0
00071 #define DEFAULT_cPtMin 5.0
00072 #define DEFAULT_tauPtMin 10.0
00073 #define DEFAULT_bMaxDeltaR 0.2
00074 #define DEFAULT_cMaxDeltaR 0.2
00075 #define DEFAULT_tauMaxDeltaR 0.3
00076 #define DEFAULT_etaTagMax 2.5
00077 #define DEFAULT_tauJetPtRatio 0.9
00078
00079
00080
00081
00082
00083 #define DEFAULT_inputLocation "/Event/AtlfastClusters"
00084 #define DEFAULT_outputLocation "/Event/AtlfastJets"
00085 #define DEFAULT_muonLocation "/Event/AtlfastNonIsolatedMuons"
00086 #define DEFAULT_commonDataLocation "/Event/AtlfastCommonData"
00087 #define DEFAULT_mcTruthLocation "/Event/McEventCollection"
00088 #define DEFAULT_unusedCellLocation "/Event/AtlfastUnusedCells"
00089 #define DEFAULT_missingMomentumLocation "/Event/AtlfastMissingMomentum"
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 namespace Atlfast {
00107 class JetMaker : public Algorithm
00108 {
00109
00110 private:
00111
00112
00113
00114
00115
00116 typedef std::vector<Cluster*> localClusterCollection;
00117 typedef std::vector<Cluster*>::iterator localClusterIterator;
00118 typedef std::vector<ReconstructedParticle*> MuonCollection;
00119 typedef std::vector<ReconstructedParticle*>::iterator MuonIterator;
00120
00121
00122
00123
00124
00125
00126 bool m_notInit;
00127 double m_minPT;
00128 double m_maxEta;
00129 bool m_doSmearing;
00130
00131 double m_barrelForwardEta;
00132 double m_rconeb;
00133 double m_rconef;
00134
00135 double m_bPtMin;
00136 double m_bMaxDeltaR;
00137 double m_cPtMin;
00138 double m_cMaxDeltaR;
00139 double m_tauPtMin;
00140 double m_tauMaxDeltaR;
00141 double m_etaTagMax;
00142 double m_tauJetPtRatio;
00143
00144
00145
00146
00147
00148
00149
00150
00154 ISmearer* m_smearer;
00155 ISmearer* m_cellSmearer;
00156
00157
00158 TesIO* m_tesIO;
00159
00160
00161
00162
00163
00164
00165
00166 std::string m_inputLocation ;
00167 std::string m_outputLocation ;
00168 std::string m_muonLocation;
00169 std::string m_mcTruthLocation;
00170 std::string m_unusedCellLocation;
00171 std::string m_commonDataLocation;
00172 std::string m_missingMomentumLocation;
00173
00174
00175
00176
00177
00178
00179
00180 KinematicHelper m_kinehelp ;
00181
00182 int getJetTags(MCparticleCollection& mcParticles,
00183 const PartitionCondition::BelowThresholdDeltaR& tagSelector
00184 )const;
00185 int getTauTags(MCparticleCollection& mcParticles,
00186 const PartitionCondition::BelowThresholdDeltaR& tagSelector,
00187 double jetPt )const;
00188 void tag(Jet* jet,
00189 MCparticleCollection& mcParticles_b,
00190 MCparticleCollection& mcParticles_c,
00191 MCparticleCollection& mcParticles_tau) const;
00192
00193 HepLorentzVector addUnusedCells(MsgStream&) const;
00194
00195
00196
00197
00198 public:
00199
00200
00201
00202
00203
00204
00205
00206
00207 JetMaker( const std::string& name, ISvcLocator* pSvcLocator ) ;
00208 virtual ~JetMaker();
00209
00210
00211
00212
00213
00214
00215 StatusCode initialize() ;
00216 StatusCode execute() ;
00217 StatusCode finalize() ;
00218
00219
00220
00221
00222
00223
00224 Jet* create( Cluster* );
00225 bool isAcceptable( Jet* );
00226 void addMuons(Jet*, MuonCollection& );
00227 MsgStream& dumpParameters(MsgStream& ) const;
00228
00229 };
00230
00231
00232 }
00233
00234 #endif
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250