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.3 2012/09/11 11:40:12 veelken 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.3 2012/09/11 11:40:12 veelken Exp $ 00045 // 00046 // Revision history 00047 // 00048 // $Log: significanceAlgo.h,v $ 00049 // Revision 1.3 2012/09/11 11:40:12 veelken 00050 // SigInputObj moved to DataFormats/METReco 00051 // 00052 // Revision 1.2 2009/10/21 11:27:11 fblekman 00053 // 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. 00054 // 00055 // Revision 1.1 2008/04/18 10:12:55 fblekman 00056 // First implementation (very preliminary) of missing ET significance algorithm. 00057 // This code is currently still heavily under development so please bear with us. 00058 // 00059 // cheers, 00060 // 00061 // Freya (for the Cornell MET significance group) 00062 // 00063 // Revision 1.2 2008/03/26 17:52:19 kstory 00064 // Tower Based Algorithm. significanceAlgo now using matrix operations. 00065 // 00066 // Revision 1.1.1.1 2008/02/29 22:25:02 kstory 00067 // Tower-Based Algorithm 00068 // 00069 // Revision 1.2 2008/02/13 13:14:37 fblekman 00070 // updated version with electrons 00071 // 00072 // Revision 1.3 2007/12/07 00:20:10 kstory 00073 // MET phi was changed to have a range of [-pi, pi] 00074 // 00075 // Revision 1.2 2007/11/30 22:02:33 kstory 00076 // Changed the arguments to allow calculation of the total MET and the MET_phi. 00077 // 00078 // 00079 00080 #include <vector> 00081 #include <string> 00082 #include <iostream> 00083 #include <sstream> 00084 00085 #include "DataFormats/METReco/interface/SigInputObj.h" 00086 #include "TMatrixTBase.h" 00087 #include "TMatrixD.h" 00088 #include "TVectorD.h" 00089 00090 namespace metsig{ 00091 class significanceAlgo{ 00092 public: 00093 significanceAlgo(); 00094 ~significanceAlgo(); 00095 00096 const void addSignifMatrix(const TMatrixD &input); 00097 const void setSignifMatrix(const TMatrixD &input,const double &met_r, const double &met_phi, const double &met_set); 00098 const double significance(double& met_r, double& met_phi, double& met_set); 00099 const void addObjects(const std::vector<metsig::SigInputObj>& EventVec); 00100 const void subtractObjects(const std::vector<metsig::SigInputObj>& EventVec); 00101 TMatrixD getSignifMatrix() const {return signifmatrix_;} 00102 // const std::vector<metsig::SigInputObj> eventVec(){return eventVec_;} 00103 private: 00104 void rotateMatrix( Double_t theta, TMatrixD &v); 00105 00106 // std::vector<metsig::SigInputObj> eventVec_; 00107 TMatrixD signifmatrix_; 00108 // workers: 00109 double set_worker_; 00110 double xmet_; 00111 double ymet_; 00112 }; 00113 } 00114 00115 #endif