/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/Pi0RecAlg/Pi0RecAlg-00-00-06/Pi0RecAlg/Criteria.h

Go to the documentation of this file.
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/*, double s, double c*/)
00029                 :First(g1), Second(g2), inv_m(m)/*, chisq(s), cos_theta(c)*/{;}
00030         EvtRecTrack* First;
00031         EvtRecTrack* Second;
00032         double inv_m;
00033 //      double chisq;
00034 //      double cos_theta;
00035 };
00036 /*struct less_chisq: public binary_function <GammaPair, GammaPair, bool>
00037 {
00038         bool operator()(const GammaPair& lgp, const GammaPair& rgp)
00039         {
00040                 return lgp.chisq < rgp.chisq;
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                 //                std::cout<<"gp.inv_m"<<gp.inv_m<<" inv_min"<<_inv_min<<std::endl;
00060                 if( gp.inv_m> _inv_min && gp.inv_m < _inv_max) return true;
00061                 else return false;
00062         }
00063 };
00064 /*struct KFitCriteria : public Criteria
00065 {
00066         KFitCriteria(double chisq_cut = 20., double costheta_cut = 0.98 ): _chisq_cut(chisq_cut),_costheta_cut(costheta_cut){;}
00067         double _chisq_cut;
00068         double _costheta_cut;
00069         virtual bool check(const GammaPair& gp) const 
00070         {
00071                 //                std::cout<<"gp.chisq"<<gp.chisq<<" chisq_cut"<<_chisq_cut<<std::endl;
00072                 if(gp.chisq > _chisq_cut) return false;
00073                 if(fabs(gp.cos_theta) > _costheta_cut) return false;
00074                 return true;
00075         }
00076 };*/
00077 /*struct helper : public Criteria
00078 {
00079         helper(){;}
00080         double mass(const GammaPair& gp) const{
00081                 EvtRecTrack* g1Trk = gp.First;
00082                 EvtRecTrack* g2Trk = gp.Second;
00083 
00084                 RecEmcShower* g1Shower = g1Trk->emcShower();
00085                 RecEmcShower* g2Shower = g2Trk->emcShower();
00086                 return (getP4(g1Shower)+getP4(g2Shower)).m();
00087         }
00088         double angle(const GammaPair& gp) const{
00089                 EvtRecTrack* g1Trk =  gp.First;
00090                 EvtRecTrack* g2Trk =  gp.Second;
00091 
00092                 RecEmcShower* g1Shower = g1Trk->emcShower();
00093                 RecEmcShower* g2Shower = g2Trk->emcShower();
00094                 return getP4(g1Shower).angle(getP4(g2Shower).vect());;
00095         }
00096 };*/
00097 #endif

Generated on Tue Nov 29 23:13:46 2016 for BOSS_7.0.2 by  doxygen 1.4.7