00001
00002
00003 #ifndef PFOATTRIBUTESACCESSOR_H
00004 #define PFOATTRIBUTESACCESSOR_H
00005
00006
00007
00008
00009
00010
00011 #include <iostream>
00012
00013
00014 #include "xAODPFlow/PFODefs.h"
00015
00016 #define DEFINE_PFO_ACCESSOR( NAME ) \
00017 case xAOD::PFODetails::NAME: \
00018 { \
00019 static SG::AuxElement::Accessor< T > a( #NAME ); \
00020 return &a; \
00021 } \
00022 break
00023
00024 namespace xAOD{
00025
00026 template<class T> struct PFOAttributesAccessor_v1 {
00027 static SG::AuxElement::Accessor<T>* accessor (xAOD::PFODetails::PFOAttributes variable){
00028 switch (variable){
00029 DEFINE_PFO_ACCESSOR(nPi0);
00030 DEFINE_PFO_ACCESSOR(nPi0Proto);
00031 DEFINE_PFO_ACCESSOR(eflowRec_EM_FRAC_ENHANCED);
00032 DEFINE_PFO_ACCESSOR(eflowRec_ENG_FRAC_CORE);
00033 DEFINE_PFO_ACCESSOR(eflowRec_FIRST_ENG_DENS);
00034 DEFINE_PFO_ACCESSOR(eflowRec_CENTER_LAMBDA);
00035 DEFINE_PFO_ACCESSOR(eflowRec_SECOND_R);
00036 DEFINE_PFO_ACCESSOR(eflowRec_DELTA_ALPHA);
00037 DEFINE_PFO_ACCESSOR(eflowRec_HOT_STRIP_FRAC);
00038 DEFINE_PFO_ACCESSOR(eflowRec_THREE_CELL_STRIP_FRAC);
00039 DEFINE_PFO_ACCESSOR(eflowRec_LATERAL);
00040 DEFINE_PFO_ACCESSOR(eflowRec_LONGITUDINAL);
00041 DEFINE_PFO_ACCESSOR(eflowRec_SECOND_LAMBDA);
00042 DEFINE_PFO_ACCESSOR(eflowRec_ISOLATION);
00043 DEFINE_PFO_ACCESSOR(eflowRec_ENG_FRAC_MAX);
00044 DEFINE_PFO_ACCESSOR(eflowRec_ENG_BAD_CELLS);
00045 DEFINE_PFO_ACCESSOR(eflowRec_N_BAD_CELLS);
00046 DEFINE_PFO_ACCESSOR(eflowRec_BADLARQ_FRAC);
00047 DEFINE_PFO_ACCESSOR(eflowRec_ENG_POS);
00048 DEFINE_PFO_ACCESSOR(eflowRec_SIGNIFICANCE);
00049 DEFINE_PFO_ACCESSOR(eflowRec_CELL_SIGNIFICANCE);
00050 DEFINE_PFO_ACCESSOR(eflowRec_CELL_SIG_SAMPLING);
00051 DEFINE_PFO_ACCESSOR(eflowRec_AVG_LAR_Q);
00052 DEFINE_PFO_ACCESSOR(eflowRec_AVG_TILE_Q);
00053 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EM3);
00054 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_HEC0);
00055 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_Tile0);
00056 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_HEC);
00057 DEFINE_PFO_ACCESSOR(eflowRec_TIMING);
00058 DEFINE_PFO_ACCESSOR(eflowRec_tracksExpectedEnergyDeposit);
00059 DEFINE_PFO_ACCESSOR(eflowRec_isInDenseEnvironment);
00060 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EM);
00061 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_PreSamplerB);
00062 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EMB1);
00063 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EMB2);
00064 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EMB3);
00065 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_PreSamplerE);
00066 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EME1);
00067 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EME2);
00068 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_EME3);
00069 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_HEC1);
00070 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_HEC2);
00071 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_HEC3);
00072 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileBar0);
00073 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileBar1);
00074 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileBar2);
00075 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileGap1);
00076 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileGap2);
00077 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileGap3);
00078 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileExt0);
00079 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileExt1);
00080 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_TileExt2);
00081 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_FCAL0);
00082 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_FCAL1);
00083 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_FCAL2);
00084 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_MINIFCAL0);
00085 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_MINIFCAL1);
00086 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_MINIFCAL2);
00087 DEFINE_PFO_ACCESSOR(eflowRec_LAYERENERGY_MINIFCAL3);
00088 DEFINE_PFO_ACCESSOR(cellBased_FIRST_ETA);
00089 DEFINE_PFO_ACCESSOR(cellBased_SECOND_R);
00090 DEFINE_PFO_ACCESSOR(cellBased_SECOND_LAMBDA);
00091 DEFINE_PFO_ACCESSOR(cellBased_DELTA_PHI);
00092 DEFINE_PFO_ACCESSOR(cellBased_DELTA_THETA);
00093 DEFINE_PFO_ACCESSOR(cellBased_CENTER_LAMBDA);
00094 DEFINE_PFO_ACCESSOR(cellBased_LATERAL);
00095 DEFINE_PFO_ACCESSOR(cellBased_LONGITUDINAL);
00096 DEFINE_PFO_ACCESSOR(cellBased_ENG_FRAC_EM);
00097 DEFINE_PFO_ACCESSOR(cellBased_ENG_FRAC_MAX);
00098 DEFINE_PFO_ACCESSOR(cellBased_ENG_FRAC_CORE);
00099 DEFINE_PFO_ACCESSOR(cellBased_SECOND_ENG_DENS);
00100 DEFINE_PFO_ACCESSOR(cellBased_EM1CoreFrac);
00101 DEFINE_PFO_ACCESSOR(cellBased_asymmetryInEM1WRTTrk);
00102 DEFINE_PFO_ACCESSOR(cellBased_NHitsInEM1);
00103 DEFINE_PFO_ACCESSOR(cellBased_NPosECells_PS);
00104 DEFINE_PFO_ACCESSOR(cellBased_NPosECells_EM1);
00105 DEFINE_PFO_ACCESSOR(cellBased_NPosECells_EM2);
00106 DEFINE_PFO_ACCESSOR(cellBased_firstEtaWRTClusterPosition_EM1);
00107 DEFINE_PFO_ACCESSOR(cellBased_firstEtaWRTClusterPosition_EM2);
00108 DEFINE_PFO_ACCESSOR(cellBased_secondEtaWRTClusterPosition_EM1);
00109 DEFINE_PFO_ACCESSOR(cellBased_secondEtaWRTClusterPosition_EM2);
00110 DEFINE_PFO_ACCESSOR(cellBased_energy_EM1);
00111 DEFINE_PFO_ACCESSOR(cellBased_energy_EM2);
00112 DEFINE_PFO_ACCESSOR(tauShots_nCellsInEta);
00113 DEFINE_PFO_ACCESSOR(tauShots_pt1);
00114 DEFINE_PFO_ACCESSOR(tauShots_pt3);
00115 DEFINE_PFO_ACCESSOR(tauShots_pt5);
00116 DEFINE_PFO_ACCESSOR(tauShots_ws5);
00117 DEFINE_PFO_ACCESSOR(tauShots_sdevEta5_WRTmean);
00118 DEFINE_PFO_ACCESSOR(tauShots_sdevEta5_WRTmode);
00119 DEFINE_PFO_ACCESSOR(tauShots_sdevPt5);
00120 DEFINE_PFO_ACCESSOR(tauShots_deltaPt12_min);
00121 DEFINE_PFO_ACCESSOR(tauShots_Fside_3not1);
00122 DEFINE_PFO_ACCESSOR(tauShots_Fside_5not1);
00123 DEFINE_PFO_ACCESSOR(tauShots_Fside_5not3);
00124 DEFINE_PFO_ACCESSOR(tauShots_fracSide_3not1);
00125 DEFINE_PFO_ACCESSOR(tauShots_fracSide_5not1);
00126 DEFINE_PFO_ACCESSOR(tauShots_fracSide_5not3);
00127 DEFINE_PFO_ACCESSOR(tauShots_pt1OverPt3);
00128 DEFINE_PFO_ACCESSOR(tauShots_pt3OverPt5);
00129 DEFINE_PFO_ACCESSOR(tauShots_mergedScore);
00130 DEFINE_PFO_ACCESSOR(tauShots_signalScore);
00131 DEFINE_PFO_ACCESSOR(tauShots_nPhotons);
00132 DEFINE_PFO_ACCESSOR(tauShots_seedHash);
00133 default:
00134 std::cerr << "xAOD::PFO_v1 ERROR Unknown float/double variable (" << static_cast<int>(variable) << ") requested" << std::endl;
00135 return 0;
00136 }
00137 }
00138 }
00139 ;
00140
00141 struct PFOParticleTypeMapper_v1 {
00142 bool getValue(PFODetails::PFOParticleType type, std::string& stringName){
00143 switch (type){
00144 case PFODetails::CaloCluster:
00145 stringName = "pfo_ClusterLinks";
00146 return true;
00147 case PFODetails::Track:
00148 stringName = "pfo_TrackLinks";
00149 return true;
00150
00151 case PFODetails::TauShot:
00152 stringName = "pfo_TauShotLinks";
00153 return true;
00154 case PFODetails::HadronicCalo:
00155 stringName = "pfo_TauShotLinks";
00156 }
00157 return false;
00158 }
00159
00160 };
00161
00162 }
00163
00164 #endif