00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ATLFAST_MUONACCEPTOR_H
00013 #define ATLFAST_MUONACCEPTOR_H
00014
00015 #include <sstream>
00016 #include <iostream>
00017 #include <iomanip>
00018 #include <fstream>
00019 #include <cstdio>
00020 #include <cmath>
00021 #include <algorithm>
00022 #include <iterator>
00023 #include <list>
00024 #include <vector>
00025 #include <map>
00026 #include <string>
00027 #include <utility>
00028
00029 #include "GaudiKernel/MsgStream.h"
00030
00031 #include "AtlfastAlgs/IAcceptor.h"
00032
00033 #include "CLHEP/Random/RandomEngine.h"
00034
00035 namespace Atlfast {
00036
00037 using std::vector;
00038 using std::pair;
00039
00040
00047 class muEffdata{
00048
00049 public:
00051 muEffdata();
00053 virtual ~muEffdata();
00055 muEffdata(double &pt,double &etamin,double &etamax,
00056 vector<pair<int,int> > &VecPaire);
00057
00058 public:
00060
00062 void Print(std::ostream* out);
00063
00065 void SetPt (double pt);
00067 void SetEtaMin (double etamin);
00069 void SetEtaMax (double etamax);
00071 void SetPtEtaNum(vector<int> ptEtaNum);
00073 void SetPtEtaNumeDeno(vector<pair<int,int> > VecPaire);
00074
00076 double GetPt();
00078 double GetEtaMin();
00080 double GetEtaMax();
00082 int GetPtEtaNum(vector<int> &ptEtaNum);
00084 void GetPtEtaNumeDeno(double &pt,double &etamin,double &etamax,
00085 vector<pair<int,int> > &VecPaire);
00086
00087 private:
00089
00091 double m_pt;
00093 double m_etamin;
00095 double m_etamax;
00097 vector<int> m_ptEtaNum;
00099 vector<pair<int,int> > m_VecPaire;
00100 };
00101
00102 class MuonAcceptor : virtual public IAcceptor{
00103 public:
00104
00105 MuonAcceptor( int muSmearKey, MsgStream& log);
00106 virtual ~MuonAcceptor() { };
00107
00108
00109
00110
00111 virtual bool accept( const ReconstructedParticle &particle, MsgStream &log );
00112
00113 int muReadEff(std::ifstream& InputFile,vector<muEffdata>& VectorOfmuEffdata);
00114
00115 vector<pair<int,int> > muEffGetPaire(double pt,double etamin,double etamax);
00116 pair<double,double> muGetPtLowHigh(double pt);
00117 int muGetPaireNumeDenoPosi(double pt,double etamin,double etamax);
00118
00119 pair<double,double> muEfficiency(double ptIn,double etaIn, double phi);
00120 pair<double,double> muEff(double ptIn,double etaIn, double phi);
00121
00122 int muGetEtaBin(double etaIn);
00123 int muGetPhiBin(double phi);
00124 int muGetPhiBin1(double phi);
00125
00126 pair<double,double> muPhiEff(double pt,double etamin,double etamax,
00127 double phimin,double phimax);
00128 pair<double,double> getPhiEff(double pt,double effin,double phig,
00129 double etamin,double etamax);
00130
00131 void muPhiEfficiency(double pt,double etaIn,double phi,
00132 double &eff,double &eeff);
00133
00134
00135 private:
00136 vector<muEffdata> m_muEffdataObject;
00137 vector<double> m_ptValues;
00138 vector<double> m_etaminValues;
00139 vector<double> m_etamaxValues;
00140 MsgStream& m_log;
00141 HepRandomEngine* m_randomEngine;
00142 };
00143
00144
00145 }
00146
00147 #endif