00001
00002
00003 #ifndef __TFORWARDELECTRONISEMSELECTOR__
00004 #define __TFORWARDELECTRONISEMSELECTOR__
00005
00016
00017 #include <TString.h>
00018
00019 #include "PATCore/TAccept.h"
00020 #include "PATCore/TSelectorToolBase.h"
00021 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
00022 #include "AsgTools/AsgMessaging.h"
00023 #include <vector>
00024
00025 class AsgForwardElectronIsEMSelector;
00026
00027 namespace Root {
00028 class TForwardElectronIsEMSelector : public TSelectorToolBase, public asg::AsgMessaging
00029 {
00030
00031 friend class ::AsgForwardElectronIsEMSelector;
00032
00033 public:
00035 TForwardElectronIsEMSelector(const char* name="TForwardElectronIsEMSelector");
00036
00038 ~TForwardElectronIsEMSelector();
00039
00040
00041
00043 int initialize();
00044
00046 inline int finalize() { return 1 ;};
00047
00049 const Root::TAccept& accept(
00050
00051 float eta,
00052
00053 float nvtx,
00054
00055 float secondLambda,
00056
00057 float lateral,
00058
00059 float longitudinal,
00060
00061 float fracMax,
00062
00063 float centerLambda,
00064
00065 float secondR) const;
00066
00067
00068 unsigned int calcIsEm(
00069
00070 float eta,
00071
00072 float nvtx,
00073
00074 float secondLambda,
00075
00076 float lateral,
00077
00078 float longitudinal,
00079
00080 float centerLambda,
00081
00082 float fracMax,
00083
00084 float secondR) const;
00085
00086
00087
00088
00089 unsigned int calocuts_electrons(
00090
00091 float eta,
00092
00093 float nvtx,
00094
00095 float secondLambda,
00096
00097 float lateral,
00098
00099 float longitudinal,
00100
00101 float centerLambda,
00102
00103 float fracMax,
00104
00105 float secondR,
00106
00107 unsigned int iflag
00108 ) const;
00109
00110
00111
00112
00113
00114 unsigned int isEM() const {return m_isEM; };
00115
00116
00118
00120
00122 unsigned int isEMMask;
00123
00125 std::vector<float> CutBinEta_ForwardElectron;
00127 std::vector<float> CutVxp_ForwardElectron;
00129 std::vector<float> CutSECONDLAMBDA_ForwardElectron;
00131 std::vector<float> CutLATERAL_ForwardElectron;
00133 std::vector<float> CutLONGITUDINAL_ForwardElectron;
00135 std::vector<float> CutCELLMAXFRAC_ForwardElectron;
00137 std::vector<float> CutSECONDR_ForwardElectron;
00139 std::vector<float> CutCENTERLAMBDA_ForwardElectron;
00140
00141
00142 private:
00143
00144
00145 void setIsEM(unsigned int isEM) { m_isEM = isEM; };
00146 const Root::TAccept& fillAccept() const;
00147
00148 std::vector<int> FindNvtxEtaBin(float nvtx, double eta) const;
00149
00150 template<typename T>
00151 bool CheckVar(const std::vector<T>& vec, int choice) const;
00152
00153 mutable unsigned int m_isEM;
00154
00155
00156
00158 int m_cutPositionBinEta_ForwardElectron;
00159
00160
00161
00162 int m_cutPositionSECONDLAMBDA_ForwardElectron;
00163 int m_cutPositionLATERAL_ForwardElectron;
00164 int m_cutPositionLONGITUDINAL_ForwardElectron;
00165 int m_cutPositionCELLMAXFRAC_ForwardElectron;
00166 int m_cutPositionSECONDR_ForwardElectron;
00167 int m_cutPositionCENTERLAMBDA_ForwardElectron;
00168
00169
00170
00171
00172 const TString m_cutNameBinEta_ForwardElectron;
00173 const TString m_cutNameVxp_ForwardElectron;
00174 const TString m_cutNameSECONDLAMBDA_ForwardElectron;
00175 const TString m_cutNameLATERAL_ForwardElectron;
00176 const TString m_cutNameLONGITUDINAL_ForwardElectron;
00177 const TString m_cutNameCELLMAXFRAC_ForwardElectron;
00178 const TString m_cutNameSECONDR_ForwardElectron;
00179 const TString m_cutNameCENTERLAMBDA_ForwardElectron;
00180
00181
00182 };
00183
00184 }
00185
00186 #endif
00187