00001 #ifndef CRITERIA__H
00002 #define CRITERAI__H
00003
00004 #include "GaudiKernel/SmartDataPtr.h"
00005
00006 #include "EventModel/EventHeader.h"
00007 #include "EvtRecEvent/EvtRecEvent.h"
00008 #include "EvtRecEvent/EvtRecTrack.h"
00009
00010 HepLorentzVector getP4(RecEmcShower* gTrk)
00011 {
00012
00013 double eraw = gTrk->energy();
00014 double phi = gTrk->phi();
00015 double the = gTrk->theta();
00016
00017 return HepLorentzVector( eraw * sin(the) * cos(phi),
00018 eraw * sin(the) * sin(phi),
00019 eraw * cos(the),
00020 eraw );
00021 }
00022 bool isGoodGamma(EvtRecTrack* gtrk)
00023 {
00024
00025 }
00026 struct GammaPair : public std::pair<EvtRecTrack*,EvtRecTrack*>
00027 {
00028 GammaPair(EvtRecTrack* g1, EvtRecTrack* g2, double m)
00029 :First(g1), Second(g2), inv_m(m){;}
00030 EvtRecTrack* First;
00031 EvtRecTrack* Second;
00032 double inv_m;
00033
00034
00035 };
00036
00037
00038
00039
00040
00041
00042
00043 struct high_momentum: public binary_function <GammaPair, GammaPair, bool>
00044 {
00045 bool operator()(const GammaPair& lgp, const GammaPair& rgp)
00046 {
00047 double p1 = (getP4(lgp.First->emcShower())+ getP4(lgp.Second->emcShower())).rho();
00048 double p2 = (getP4(rgp.First->emcShower())+ getP4(rgp.Second->emcShower())).rho();
00049 return p1 > p2;
00050 }
00051 };
00052 struct Criteria
00053 {
00054 Criteria(double inv_min = 0.10, double inv_max = 0.18):_inv_min(inv_min), _inv_max(inv_max){;}
00055 double _inv_min;
00056 double _inv_max;
00057 virtual bool check(const GammaPair& gp) const
00058 {
00059
00060 if( gp.inv_m> _inv_min && gp.inv_m < _inv_max) return true;
00061 else return false;
00062 }
00063 };
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 #endif