CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoMET/METAlgorithms/interface/significanceAlgo.h

Go to the documentation of this file.
00001 #ifndef SIGMET_ASIGNIFICANCE_H
00002 #define SIGMET_ASIGNIFICANCE_H
00003 // -*- C++ -*-
00004 //
00005 // Package:    METAlgorithms
00006 // Class:      SigInputObj
00007 // 
00025 //
00026 // Original Author:  Kyle Story, Freya Blekman (Cornell University)
00027 //         Created:  Fri Apr 18 11:58:33 CEST 2008
00028 // $Id: significanceAlgo.h,v 1.2 2009/10/21 11:27:11 fblekman Exp $
00029 //
00030 //
00031 
00032 //  
00033 //  Purpose:
00034 //  
00035 //  This subroutine takes in a vector of type SigInputObj that includes
00036 //  all of the physics objects in the event.  It then calculates
00037 //  the log significance of the MET of the event.
00038 //
00039 //  The Significance (S) is defined as:
00040 //    ln(S) = 1/2 Chisq_0
00041 //  where Chisq_0 is the value of Chi squared at MET=0.
00042 //
00043 //
00044 // $Id: significanceAlgo.h,v 1.2 2009/10/21 11:27:11 fblekman Exp $
00045 // 
00046 // Revision history
00047 // 
00048 // $Log: significanceAlgo.h,v $
00049 // Revision 1.2  2009/10/21 11:27:11  fblekman
00050 // merged version with cvs head - includes new interfaces for MET significance to make it possible to correct MET objects later and also correct the signficance.
00051 //
00052 // Revision 1.1  2008/04/18 10:12:55  fblekman
00053 // First implementation (very preliminary) of missing ET significance algorithm.
00054 // This code is currently still heavily under development so please bear with us.
00055 //
00056 // cheers,
00057 //
00058 //   Freya (for the Cornell MET significance group)
00059 //
00060 // Revision 1.2  2008/03/26 17:52:19  kstory
00061 // Tower Based Algorithm.  significanceAlgo now using matrix operations.
00062 //
00063 // Revision 1.1.1.1  2008/02/29 22:25:02  kstory
00064 // Tower-Based Algorithm
00065 //
00066 // Revision 1.2  2008/02/13 13:14:37  fblekman
00067 // updated version with electrons
00068 //
00069 // Revision 1.3  2007/12/07 00:20:10  kstory
00070 // MET phi was changed to have a range of [-pi, pi]
00071 //
00072 // Revision 1.2  2007/11/30 22:02:33  kstory
00073 // Changed the arguments to allow calculation of the total MET and the MET_phi.
00074 //
00075 //
00076 
00077 #include <vector>
00078 #include <string>
00079 #include <iostream>
00080 #include <sstream>
00081 
00082 #include "RecoMET/METAlgorithms/interface/SigInputObj.h"
00083 #include "TMatrixTBase.h"
00084 #include "TMatrixD.h"
00085 #include "TVectorD.h"
00086 
00087 namespace metsig{
00088   class significanceAlgo{
00089   public:
00090     significanceAlgo();
00091     ~significanceAlgo();
00092 
00093     const void addSignifMatrix(const TMatrixD &input);
00094     const void setSignifMatrix(const TMatrixD &input,const double &met_r, const double &met_phi, const double &met_set);
00095     const double significance(double& met_r, double& met_phi, double& met_set);
00096     const void addObjects(const std::vector<metsig::SigInputObj>& EventVec);
00097     const void subtractObjects(const std::vector<metsig::SigInputObj>& EventVec);
00098     TMatrixD getSignifMatrix() const {return signifmatrix_;}
00099     //    const std::vector<metsig::SigInputObj> eventVec(){return eventVec_;}
00100   private:
00101     void rotateMatrix( Double_t theta, TMatrixD &v);  
00102 
00103     //    std::vector<metsig::SigInputObj> eventVec_;
00104     TMatrixD signifmatrix_;
00105     // workers:
00106     double set_worker_;
00107     double xmet_;
00108     double ymet_;
00109   };
00110 }
00111 
00112 #endif