ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/BasicCluster.h
Revision: 1.16
Committed: Thu Jun 24 13:08:45 2010 UTC (14 years, 10 months ago) by peveraer
Content type: text/plain
Branch: MAIN
Changes since 1.15: +5 -2 lines
Log Message:
//--------------------------------------------------------------------------------------------------
// $Id: BasicCluster.h,v 1.15 2010/03/26 14:31:51 sixie Exp $
//
// BasicCluster
//
// This class holds information of basic reconstructed clusters.
//
// Authors: S.Xie
//--------------------------------------------------------------------------------------------------

#ifndef MITANA_DATATREE_BASICCLUSTER_H
#define MITANA_DATATREE_BASICCLUSTER_H

#include <TMath.h>
#include "MitCommon/DataFormats/interface/Vect3C.h"
#include "MitAna/DataTree/interface/DataObject.h"

namespace mithep
{
  class BasicCluster : public DataObject
  {
    public:
      BasicCluster() : fEnergy(0) {}
      BasicCluster(Double_t e, const ThreeVector &p) :
        fEnergy(e), fPoint(p) {}

      Double_t         Energy()                  const { return  fEnergy;       }
      Double_t         Et()                      const;
      Double_t         Eta()                     const { return  fPoint.Eta();  }
      EObjType         ObjType()                 const { return  kBasicCluster; }
      Double_t         Phi()                     const { return  fPoint.Phi();  }
      ThreeVectorC     Pos()                     const { return  fPoint.V();    }
      void             Print(Option_t *opt="")   const;
      Double_t         Rho()                     const { return  fPoint.Rho();  }
      Double_t         NHits()                   const { return  fNHits;        }
      Double_t         E1x3()                    const { return  fE1x3;         }
      Double_t         E3x1()                    const { return  fE3x1;         }
      Double_t         E1x5()                    const { return  fE1x5;         }
      Double_t         E2x2()                    const { return  fE2x2;         }
      Double_t         E3x2()                    const { return  fE3x2;         }
      Double_t         E3x3()                    const { return  fE3x3;         }
      Double_t         E4x4()                    const { return  fE4x4;         }
      Double_t         E5x5()                    const { return  fE5x5;         }
      Double_t         SwissCross()              const { return  fSwissCross;   }
      Double_t         E2x5Right()               const { return  fE2x5Right;    }
      Double_t         E2x5Left()                const { return  fE2x5Left;     }
      Double_t         E2x5Top()                 const { return  fE2x5Top;      }
      Double_t         E2x5Bottom()              const { return  fE2x5Bottom;   }
      Double_t         E2x5Max()                 const { return  fE2x5Max;      }
      Double_t         ELeft()                   const { return  fELeft;        }
      Double_t         ERight()                  const { return  fERight;       }
      Double_t         ETop()                    const { return  fETop;         }
      Double_t         EBottom()                 const { return  fEBottom;      }
      Double_t         EMax()                    const { return  fEMax;         }
      Double_t         E2nd()                    const { return  fE2nd;         }
      Double_t         EtaLat()                  const { return  fEtaLat;       }
      Double_t         PhiLat()                  const { return  fPhiLat;       }
      Double_t         Lat()                     const { return  fLat;          }
      Double_t         CovEtaEta()               const { return  fCovEtaEta;    }
      Double_t         CovEtaPhi()               const { return  fCovEtaPhi;    }
      Double_t         CovPhiPhi()               const { return  fCovPhiPhi;    }
      Double_t         CoviEtaiEta()             const { return  fCoviEtaiEta;  }
      Double_t         CoviEtaiPhi()             const { return  fCoviEtaiPhi;  }
      Double_t         CoviPhiiPhi()             const { return  fCoviPhiiPhi;  }
      Double_t         Zernike20()               const { return  fZernike20;    }
      Double_t         Zernike42()               const { return  fZernike42;    }


      void	       SetEnergy(Double_t energy)                 {  fEnergy = energy;     }
      void	       SetXYZ(Double_t x, Double_t y, Double_t z) {  fPoint.SetXYZ(x,y,z); }
      void	       SetNHits(Int_t x)                          {  fNHits = x;            }
      void	       SetE1x3(Double_t x)                        {  fE1x3 = x;            }
      void	       SetE3x1(Double_t x)                        {  fE3x1 = x;            }
      void	       SetE1x5(Double_t x)                        {  fE1x5 = x;            }
      void	       SetE2x2(Double_t x)                        {  fE2x2 = x;            }
      void	       SetE3x2(Double_t x)                        {  fE3x2 = x;            }
      void	       SetE3x3(Double_t x)                        {  fE3x3 = x;            }
      void	       SetE4x4(Double_t x)                        {  fE4x4 = x;            }
      void	       SetE5x5(Double_t x)                        {  fE5x5 = x;            }
      void	       SetSwissCross(Double_t x)                  {  fSwissCross = x;      }
      void	       SetE2x5Right(Double_t x)                   {  fE2x5Right = x;       }
      void	       SetE2x5Left(Double_t x)                    {  fE2x5Left = x;        }
      void	       SetE2x5Top(Double_t x)                     {  fE2x5Top = x;         }
      void	       SetE2x5Bottom(Double_t x)                  {  fE2x5Bottom = x;      }
      void	       SetE2x5Max(Double_t x)                     {  fE2x5Max = x;         }
      void	       SetELeft(Double_t x)                       {  fELeft = x;           }
      void	       SetERight(Double_t x)                      {  fERight = x;          }
      void	       SetETop(Double_t x)                        {  fETop = x;            }
      void	       SetEBottom(Double_t x)                     {  fEBottom = x;         }
      void	       SetEMax(Double_t x)                        {  fEMax = x;            }
      void	       SetE2nd(Double_t x)                        {  fE2nd = x;            }
      void	       SetEtaLat(Double_t x)                      {  fEtaLat = x;          }
      void	       SetPhiLat(Double_t x)                      {  fPhiLat = x;          }
      void	       SetLat(Double_t x)                         {  fLat = x;             }
      void	       SetCovEtaEta(Double_t x)                   {  fCovEtaEta = x;       }
      void	       SetCovEtaPhi(Double_t x)                   {  fCovEtaPhi = x;       }
      void	       SetCovPhiPhi(Double_t x)                   {  fCovPhiPhi = x;       }
      void	       SetCoviEtaiEta(Double_t x)                 {  fCoviEtaiEta = x;     }
      void	       SetCoviEtaiPhi(Double_t x)                 {  fCoviEtaiPhi = x;     }
      void	       SetCoviPhiiPhi(Double_t x)                 {  fCoviPhiiPhi = x;     }
      void	       SetZernike20(Double_t x)                   {  fZernike20 = x;       }
      void	       SetZernike42(Double_t x)                   {  fZernike42 = x;       }


    protected:

      Double32_t       fEnergy;  //[0,0,14]assigned energy
      Vect3C           fPoint;   //centroid Position


      Int_t      fNHits;
      Double32_t fE1x3;
      Double32_t fE3x1;
      Double32_t fE1x5;
      Double32_t fE2x2;
      Double32_t fE3x2;
      Double32_t fE3x3;
      Double32_t fE4x4;
      Double32_t fE5x5;
      Double32_t fSwissCross;
      Double32_t fE2x5Right;
      Double32_t fE2x5Left;
      Double32_t fE2x5Top;
      Double32_t fE2x5Bottom;
      Double32_t fE2x5Max;
      Double32_t fELeft;
      Double32_t fERight;
      Double32_t fETop;
      Double32_t fEBottom;
      Double32_t fEMax;
      Double32_t fE2nd;
      Double32_t fEtaLat;
      Double32_t fPhiLat;
      Double32_t fLat;
      Double32_t fCovEtaEta;
      Double32_t fCovEtaPhi;
      Double32_t fCovPhiPhi;
      Double32_t fCoviEtaiEta;
      Double32_t fCoviEtaiPhi;
      Double32_t fCoviPhiiPhi;
      Double32_t fZernike20;
      Double32_t fZernike42;


      ClassDef(BasicCluster, 3)  // Basic cluster class
  };
}

//--------------------------------------------------------------------------------------------------
inline Double_t mithep::BasicCluster::Et() const
{
  // Return transverse energy.

  return fEnergy*fPoint.Rho()/fPoint.V().R();
}
#endif

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 peveraer 1.16 // $Id: BasicCluster.h,v 1.15 2010/03/26 14:31:51 sixie Exp $
3 sixie 1.1 //
4 loizides 1.7 // BasicCluster
5 sixie 1.1 //
6 loizides 1.5 // This class holds information of basic reconstructed clusters.
7 sixie 1.1 //
8     // Authors: S.Xie
9     //--------------------------------------------------------------------------------------------------
10    
11 loizides 1.2 #ifndef MITANA_DATATREE_BASICCLUSTER_H
12     #define MITANA_DATATREE_BASICCLUSTER_H
13 sixie 1.1
14     #include <TMath.h>
15 loizides 1.9 #include "MitCommon/DataFormats/interface/Vect3C.h"
16 sixie 1.1 #include "MitAna/DataTree/interface/DataObject.h"
17    
18     namespace mithep
19     {
20     class BasicCluster : public DataObject
21     {
22     public:
23 bendavid 1.8 BasicCluster() : fEnergy(0) {}
24 loizides 1.7 BasicCluster(Double_t e, const ThreeVector &p) :
25 bendavid 1.8 fEnergy(e), fPoint(p) {}
26 sixie 1.1
27 sixie 1.14 Double_t Energy() const { return fEnergy; }
28     Double_t Et() const;
29     Double_t Eta() const { return fPoint.Eta(); }
30     EObjType ObjType() const { return kBasicCluster; }
31     Double_t Phi() const { return fPoint.Phi(); }
32     ThreeVectorC Pos() const { return fPoint.V(); }
33     void Print(Option_t *opt="") const;
34     Double_t Rho() const { return fPoint.Rho(); }
35     Double_t NHits() const { return fNHits; }
36     Double_t E1x3() const { return fE1x3; }
37     Double_t E3x1() const { return fE3x1; }
38     Double_t E1x5() const { return fE1x5; }
39     Double_t E2x2() const { return fE2x2; }
40     Double_t E3x2() const { return fE3x2; }
41     Double_t E3x3() const { return fE3x3; }
42     Double_t E4x4() const { return fE4x4; }
43     Double_t E5x5() const { return fE5x5; }
44 peveraer 1.16 Double_t SwissCross() const { return fSwissCross; }
45 sixie 1.14 Double_t E2x5Right() const { return fE2x5Right; }
46     Double_t E2x5Left() const { return fE2x5Left; }
47     Double_t E2x5Top() const { return fE2x5Top; }
48     Double_t E2x5Bottom() const { return fE2x5Bottom; }
49     Double_t E2x5Max() const { return fE2x5Max; }
50     Double_t ELeft() const { return fELeft; }
51     Double_t ERight() const { return fERight; }
52     Double_t ETop() const { return fETop; }
53     Double_t EBottom() const { return fEBottom; }
54     Double_t EMax() const { return fEMax; }
55     Double_t E2nd() const { return fE2nd; }
56     Double_t EtaLat() const { return fEtaLat; }
57     Double_t PhiLat() const { return fPhiLat; }
58     Double_t Lat() const { return fLat; }
59     Double_t CovEtaEta() const { return fCovEtaEta; }
60     Double_t CovEtaPhi() const { return fCovEtaPhi; }
61     Double_t CovPhiPhi() const { return fCovPhiPhi; }
62     Double_t CoviEtaiEta() const { return fCoviEtaiEta; }
63     Double_t CoviEtaiPhi() const { return fCoviEtaiPhi; }
64     Double_t CoviPhiiPhi() const { return fCoviPhiiPhi; }
65     Double_t Zernike20() const { return fZernike20; }
66     Double_t Zernike42() const { return fZernike42; }
67    
68    
69     void SetEnergy(Double_t energy) { fEnergy = energy; }
70     void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); }
71     void SetNHits(Int_t x) { fNHits = x; }
72     void SetE1x3(Double_t x) { fE1x3 = x; }
73     void SetE3x1(Double_t x) { fE3x1 = x; }
74     void SetE1x5(Double_t x) { fE1x5 = x; }
75     void SetE2x2(Double_t x) { fE2x2 = x; }
76     void SetE3x2(Double_t x) { fE3x2 = x; }
77     void SetE3x3(Double_t x) { fE3x3 = x; }
78     void SetE4x4(Double_t x) { fE4x4 = x; }
79     void SetE5x5(Double_t x) { fE5x5 = x; }
80 peveraer 1.16 void SetSwissCross(Double_t x) { fSwissCross = x; }
81 sixie 1.14 void SetE2x5Right(Double_t x) { fE2x5Right = x; }
82     void SetE2x5Left(Double_t x) { fE2x5Left = x; }
83     void SetE2x5Top(Double_t x) { fE2x5Top = x; }
84     void SetE2x5Bottom(Double_t x) { fE2x5Bottom = x; }
85     void SetE2x5Max(Double_t x) { fE2x5Max = x; }
86     void SetELeft(Double_t x) { fELeft = x; }
87     void SetERight(Double_t x) { fERight = x; }
88     void SetETop(Double_t x) { fETop = x; }
89     void SetEBottom(Double_t x) { fEBottom = x; }
90     void SetEMax(Double_t x) { fEMax = x; }
91     void SetE2nd(Double_t x) { fE2nd = x; }
92     void SetEtaLat(Double_t x) { fEtaLat = x; }
93     void SetPhiLat(Double_t x) { fPhiLat = x; }
94     void SetLat(Double_t x) { fLat = x; }
95     void SetCovEtaEta(Double_t x) { fCovEtaEta = x; }
96     void SetCovEtaPhi(Double_t x) { fCovEtaPhi = x; }
97     void SetCovPhiPhi(Double_t x) { fCovPhiPhi = x; }
98     void SetCoviEtaiEta(Double_t x) { fCoviEtaiEta = x; }
99     void SetCoviEtaiPhi(Double_t x) { fCoviEtaiPhi = x; }
100     void SetCoviPhiiPhi(Double_t x) { fCoviPhiiPhi = x; }
101     void SetZernike20(Double_t x) { fZernike20 = x; }
102     void SetZernike42(Double_t x) { fZernike42 = x; }
103    
104 sixie 1.1
105     protected:
106 bendavid 1.8
107 loizides 1.9 Double32_t fEnergy; //[0,0,14]assigned energy
108     Vect3C fPoint; //centroid Position
109 sixie 1.1
110 sixie 1.14
111     Int_t fNHits;
112     Double32_t fE1x3;
113     Double32_t fE3x1;
114     Double32_t fE1x5;
115     Double32_t fE2x2;
116     Double32_t fE3x2;
117     Double32_t fE3x3;
118     Double32_t fE4x4;
119     Double32_t fE5x5;
120 peveraer 1.16 Double32_t fSwissCross;
121 sixie 1.14 Double32_t fE2x5Right;
122     Double32_t fE2x5Left;
123     Double32_t fE2x5Top;
124     Double32_t fE2x5Bottom;
125     Double32_t fE2x5Max;
126     Double32_t fELeft;
127     Double32_t fERight;
128     Double32_t fETop;
129     Double32_t fEBottom;
130     Double32_t fEMax;
131     Double32_t fE2nd;
132     Double32_t fEtaLat;
133     Double32_t fPhiLat;
134     Double32_t fLat;
135     Double32_t fCovEtaEta;
136     Double32_t fCovEtaPhi;
137     Double32_t fCovPhiPhi;
138     Double32_t fCoviEtaiEta;
139     Double32_t fCoviEtaiPhi;
140     Double32_t fCoviPhiiPhi;
141     Double32_t fZernike20;
142     Double32_t fZernike42;
143    
144    
145 peveraer 1.16 ClassDef(BasicCluster, 3) // Basic cluster class
146 sixie 1.1 };
147     }
148 loizides 1.13
149     //--------------------------------------------------------------------------------------------------
150     inline Double_t mithep::BasicCluster::Et() const
151     {
152     // Return transverse energy.
153    
154     return fEnergy*fPoint.Rho()/fPoint.V().R();
155     }
156 sixie 1.1 #endif