CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
significanceAlgo.h
Go to the documentation of this file.
1 #ifndef SIGMET_ASIGNIFICANCE_H
2 #define SIGMET_ASIGNIFICANCE_H
3 // -*- C++ -*-
4 //
5 // Package: METAlgorithms
6 // Class: SigInputObj
7 //
25 //
26 // Original Author: Kyle Story, Freya Blekman (Cornell University)
27 // Created: Fri Apr 18 11:58:33 CEST 2008
28 // $Id: significanceAlgo.h,v 1.2 2009/10/21 11:27:11 fblekman Exp $
29 //
30 //
31 
32 //
33 // Purpose:
34 //
35 // This subroutine takes in a vector of type SigInputObj that includes
36 // all of the physics objects in the event. It then calculates
37 // the log significance of the MET of the event.
38 //
39 // The Significance (S) is defined as:
40 // ln(S) = 1/2 Chisq_0
41 // where Chisq_0 is the value of Chi squared at MET=0.
42 //
43 //
44 // $Id: significanceAlgo.h,v 1.2 2009/10/21 11:27:11 fblekman Exp $
45 //
46 // Revision history
47 //
48 // $Log: significanceAlgo.h,v $
49 // Revision 1.2 2009/10/21 11:27:11 fblekman
50 // 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.
51 //
52 // Revision 1.1 2008/04/18 10:12:55 fblekman
53 // First implementation (very preliminary) of missing ET significance algorithm.
54 // This code is currently still heavily under development so please bear with us.
55 //
56 // cheers,
57 //
58 // Freya (for the Cornell MET significance group)
59 //
60 // Revision 1.2 2008/03/26 17:52:19 kstory
61 // Tower Based Algorithm. significanceAlgo now using matrix operations.
62 //
63 // Revision 1.1.1.1 2008/02/29 22:25:02 kstory
64 // Tower-Based Algorithm
65 //
66 // Revision 1.2 2008/02/13 13:14:37 fblekman
67 // updated version with electrons
68 //
69 // Revision 1.3 2007/12/07 00:20:10 kstory
70 // MET phi was changed to have a range of [-pi, pi]
71 //
72 // Revision 1.2 2007/11/30 22:02:33 kstory
73 // Changed the arguments to allow calculation of the total MET and the MET_phi.
74 //
75 //
76 
77 #include <vector>
78 #include <string>
79 #include <iostream>
80 #include <sstream>
81 
83 #include "TMatrixTBase.h"
84 #include "TMatrixD.h"
85 #include "TVectorD.h"
86 
87 namespace metsig{
89  public:
92 
93  const void addSignifMatrix(const TMatrixD &input);
94  const void setSignifMatrix(const TMatrixD &input,const double &met_r, const double &met_phi, const double &met_set);
95  const double significance(double& met_r, double& met_phi, double& met_set);
96  const void addObjects(const std::vector<metsig::SigInputObj>& EventVec);
97  const void subtractObjects(const std::vector<metsig::SigInputObj>& EventVec);
98  TMatrixD getSignifMatrix() const {return signifmatrix_;}
99  // const std::vector<metsig::SigInputObj> eventVec(){return eventVec_;}
100  private:
101  void rotateMatrix( Double_t theta, TMatrixD &v);
102 
103  // std::vector<metsig::SigInputObj> eventVec_;
104  TMatrixD signifmatrix_;
105  // workers:
106  double set_worker_;
107  double xmet_;
108  double ymet_;
109  };
110 }
111 
112 #endif
const void addObjects(const std::vector< metsig::SigInputObj > &EventVec)
void rotateMatrix(Double_t theta, TMatrixD &v)
const double significance(double &met_r, double &met_phi, double &met_set)
Geom::Theta< T > theta() const
const void subtractObjects(const std::vector< metsig::SigInputObj > &EventVec)
TMatrixD getSignifMatrix() const
const void addSignifMatrix(const TMatrixD &input)
const void setSignifMatrix(const TMatrixD &input, const double &met_r, const double &met_phi, const double &met_set)
reset the signficance matrix (this is the most likely case), so that the vector sum can be continued ...
mathSSE::Vec4< T > v