00001 // ================================================ 00002 // AtlfastB class description 00003 // ================================================ 00004 // 00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT 00006 // 00007 // 00008 // This version.... 00009 // 00010 // 00011 // Namespace Atlfast:: 00012 // 00013 // class: AtlfastB 00014 // 00015 //It is based upon atlfastb.f by E.Richter-Was 00016 // 00017 // Author : Mireia Dosil 00018 // 00019 // 00020 // Description: 00021 // 00022 // Algorithm for jet tagging and jet tagging efficiencies computation 00023 // Translated into c++ athena from the fortran code atlfastb.f 00024 // 00025 // 00026 // ................................................................ 00027 // 00028 00029 #ifndef ATLFAST_B 00030 #define ATLFAST__B 00031 00032 // STL 00033 #ifndef STD_VECTOR_H 00034 #include <vector> 00035 #define STD_VECTOR_H 00036 #endif 00037 00038 #ifndef STD_STRING_H 00039 #include <string> 00040 #define STD_STRING_H 00041 #endif 00042 00043 // Gaudi 00044 #ifndef GAUDIKERNEL_ALGORITHM_H 00045 #include "GaudiKernel/Algorithm.h" 00046 #define GAUDIKERNEL_ALGORITHM_H 00047 #endif 00048 //*************************************************************** 00049 // AtlfastB class declaration 00050 // 00051 // A "Gaudi algorithm" is something which gets scheduled and controlled 00052 // by the framework. In its simplest definition it is something which 00053 // - gets clled for each event 00054 // - can get anything it wants out of the Transient Event Store" 00055 // - can put anything it makes into the store. 00056 // 00057 //**************************************************************** 00058 class MsgStream; 00059 class ISvcLocator; 00060 00061 //using HepMC::GenEvent; 00062 00063 class RandFlat; 00064 class HepRandomEngine; 00065 00066 namespace Atlfast { 00073 class TesIO; 00074 class Jet; 00075 00076 using std::string; 00077 00078 class AtlfastB : public Algorithm{ 00079 00080 private: 00081 00082 00083 //-------------------------------- 00084 // Parameters of this algorithm 00085 // (descriptions above) 00086 //-------------------------------- 00087 00088 00089 // Parameters for the different atlfastB methods 00090 // parametrization prepared by E. Ros, updated November'99, low luminosity 00091 // apply randomized b-tagging with efficiencies specified 00092 // by one of given sets, pT dependent correction factors included 00093 // m_atlfBNSet=1 --> m_epsib=0.5 00094 // m_atlfBNSet=2 --> m_epsib=0.6 00095 // m_atlfBNSet=3 --> m_epsib=0.7 00096 // 00097 // canonical for low luminosity performance,no pT dependence 00098 // m_atlfBNSet=5 --> m_epsib=0.60 epsi_c=0.10, R=100 00099 // 00100 // Inner Detector TDR, April'97, low luminosity, pT dependent correction 00101 // factors included, parametrization prepared by E. Ros 00102 // m_atlfBNSet=11 --> m_epsib=0.33 00103 // m_atlfBNSet=12 --> m_epsib=0.43 00104 // m_atlfBNSet=13 --> m_epsib=0.53 00105 // m_atlfBNSet=14 --> m_epsib=0.624 00106 // 00107 00108 00109 int m_atlfBNSet; 00110 00111 //Jet tagging efficiencies 00112 float m_epsib; 00113 float m_epsic; 00114 float m_epsij; 00115 float m_epsitau; 00116 00117 //input files for jet correction factors 00118 00119 string m_corrjfile; 00120 string m_corrcfile; 00121 00122 //jet correction factors 00123 float m_corrj[5][15]; 00124 float m_corrc[5][15]; 00125 00126 // 00127 int m_indtauveto; 00128 00129 // for an analysis where you want to reject taus use atlfVeto 00130 // apply veto for tau-jet 00131 // (m_indtauveto=1): tau-background fixed to 5%, atlfVeto gives the corresponding jet-efficiency 00132 // (m_indtauveto=2): jet-efficiency fixed at 90%, atlfVeto gives the corresponding tau-background 00133 00134 00135 //switch for the different methods 00136 bool m_AtlfBJetSwitch; 00137 bool m_AtlfCalSwitch; 00138 bool m_AtlfTauSwitch; 00139 bool m_AtlfTauVetoSwitch; 00140 bool m_AtlfTrigMuoSwitch; 00141 00142 //other variables 00143 00144 bool m_notInit; 00145 TesIO* m_tesIO; 00146 HepRandomEngine* m_pRandomEngine; 00147 RandFlat* m_pRandFlatGenerator; 00148 00149 std::vector<Jet*> m_Jets; 00150 std::vector<Jet*>::const_iterator m_it; 00151 00152 00153 00154 00155 //-------------------------------------------------- 00156 // Paths in the Transient Event store to get/put things 00157 // These are currently set in member variables so that 00158 // they can be overwritten by the job options service 00159 //-------------------------------------------------- 00160 00161 std::string m_inputLocation ; 00162 std::string m_outputLocation ; 00163 00164 public: 00165 00166 //------------------------- 00167 // Constructors/Destructors 00168 // 00169 // Gaudi requires that the constructor takes certain arguments 00170 // (and passes them directly to the constructor of the base class) 00171 //------------------------- 00172 00173 AtlfastB( const std::string& name, ISvcLocator* pSvcLocator ) ; 00174 virtual ~AtlfastB(); 00175 00176 00177 00178 00179 //------------------------------- 00180 // helper 00181 //------------------------------- 00182 00183 00184 00185 StatusCode atlfBje(int nset); 00186 StatusCode atlfCal(); 00187 StatusCode atlfTau(float epsitau); 00188 StatusCode tautag(double pt, double eta, double efftau, double &rjet); 00189 StatusCode atlfTauVeto(int ind); 00190 StatusCode tauveto(double pt, int ind, double &efftau, double &effjet); 00191 StatusCode atlfTrigMuo(); 00192 00193 00194 double fitcoreb(double pt); 00195 double fitcoreu(double pt); 00196 00197 //------------------------------------------------------ 00198 // Methods used by Gaudi to run the algorithm 00199 //------------------------------------------------------ 00200 00201 StatusCode initialize() ; 00202 StatusCode execute() ; 00203 StatusCode finalize() ; 00204 }; 00205 00206 } //end of namespace bracket 00207 00208 #endif