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.3 2012/09/11 11:40:12 veelken 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.3 2012/09/11 11:40:12 veelken Exp $
45 //
46 // Revision history
47 //
48 // $Log: significanceAlgo.h,v $
49 // Revision 1.3 2012/09/11 11:40:12 veelken
50 // SigInputObj moved to DataFormats/METReco
51 //
52 // Revision 1.2 2009/10/21 11:27:11 fblekman
53 // 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.
54 //
55 // Revision 1.1 2008/04/18 10:12:55 fblekman
56 // First implementation (very preliminary) of missing ET significance algorithm.
57 // This code is currently still heavily under development so please bear with us.
58 //
59 // cheers,
60 //
61 // Freya (for the Cornell MET significance group)
62 //
63 // Revision 1.2 2008/03/26 17:52:19 kstory
64 // Tower Based Algorithm. significanceAlgo now using matrix operations.
65 //
66 // Revision 1.1.1.1 2008/02/29 22:25:02 kstory
67 // Tower-Based Algorithm
68 //
69 // Revision 1.2 2008/02/13 13:14:37 fblekman
70 // updated version with electrons
71 //
72 // Revision 1.3 2007/12/07 00:20:10 kstory
73 // MET phi was changed to have a range of [-pi, pi]
74 //
75 // Revision 1.2 2007/11/30 22:02:33 kstory
76 // Changed the arguments to allow calculation of the total MET and the MET_phi.
77 //
78 //
79 
80 #include <vector>
81 #include <string>
82 #include <iostream>
83 #include <sstream>
84 
86 #include "TMatrixTBase.h"
87 #include "TMatrixD.h"
88 #include "TVectorD.h"
89 
90 namespace metsig{
92  public:
95 
96  const void addSignifMatrix(const TMatrixD &input);
97  const void setSignifMatrix(const TMatrixD &input,const double &met_r, const double &met_phi, const double &met_set);
98  const double significance(double& met_r, double& met_phi, double& met_set);
99  const void addObjects(const std::vector<metsig::SigInputObj>& EventVec);
100  const void subtractObjects(const std::vector<metsig::SigInputObj>& EventVec);
101  TMatrixD getSignifMatrix() const {return signifmatrix_;}
102  // const std::vector<metsig::SigInputObj> eventVec(){return eventVec_;}
103  private:
104  void rotateMatrix( Double_t theta, TMatrixD &v);
105 
106  // std::vector<metsig::SigInputObj> eventVec_;
107  TMatrixD signifmatrix_;
108  // workers:
109  double set_worker_;
110  double xmet_;
111  double ymet_;
112  };
113 }
114 
115 #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 ...