ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/CaloTower.h
Revision: 1.7
Committed: Thu Jan 22 14:21:32 2009 UTC (16 years, 3 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.6: +3 -3 lines
Log Message:
Cosmetics.

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.7 // $Id: CaloTower.h,v 1.6 2008/12/09 17:46:59 loizides Exp $
3 sixie 1.1 //
4 loizides 1.5 // CaloTower
5 sixie 1.1 //
6 loizides 1.6 // This class holds calo tower information.
7 sixie 1.1 //
8 loizides 1.6 // Authors: S.Xie
9 sixie 1.1 //--------------------------------------------------------------------------------------------------
10    
11 loizides 1.7 #ifndef MITANA_DATATREE_CALOTOWER_H
12     #define MITANA_DATATREE_CALOTOWER_H
13 sixie 1.1
14 loizides 1.6 #include "MitAna/DataTree/interface/DataObject.h"
15 sixie 1.1 #include <TMath.h>
16    
17     namespace mithep
18     {
19     class CaloTower : public DataObject
20     {
21     public:
22     CaloTower() {}
23 loizides 1.3 ~CaloTower() {}
24 sixie 1.1
25    
26 loizides 1.6 Double_t E() const { return (fEmEnergy + fHadEnergy); }
27     Double_t EmEt() const { return fEmEnergy*TMath::Sin(Theta()); }
28     Double_t Eta() const { return fPosition.Eta(); }
29     Double_t Et() const { return E()*TMath::Sin(Theta()); }
30     Double_t EtWithHO() const { return EWithHO()*TMath::Sin(Theta()); }
31     Double_t EWithHO() const { return (fEmEnergy + fHadEnergy + fOuterEnergy); }
32     Double_t EmEnergy() const { return fEmEnergy; }
33     Double_t HadEnergy() const { return fHadEnergy; }
34     Double_t HadEt() const { return fHadEnergy*TMath::Sin(Theta()); }
35 bendavid 1.4 const FourVectorM Mom() const;
36 loizides 1.6 Double_t Phi() const { return fPosition.Phi(); }
37     EObjType ObjType() const { return kCaloTower; }
38     Double_t OuterEnergy() const { return fOuterEnergy; }
39     Double_t OuterEt() const { return fOuterEnergy*TMath::Sin(Theta()); }
40     const ThreeVectorC Position() const { return fPosition; }
41     Double_t Theta() const { return fPosition.Theta(); }
42    
43     void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
44     void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
45     void SetOuterEnergy(Double_t OuterEnergy) { fOuterEnergy = OuterEnergy; }
46     void SetPosition(Double_t x, Double_t y, Double_t z)
47     { fPosition.SetXYZ(x,y,z); }
48 sixie 1.1
49     protected:
50 loizides 1.6 ThreeVectorC32 fPosition; //position of tower
51 bendavid 1.4 Double32_t fEmEnergy; //tower energy in Ecal
52     Double32_t fHadEnergy; //tower energy in Hcal
53 loizides 1.6 Double32_t fOuterEnergy; //tower energy in outer Hcal
54 sixie 1.1
55 loizides 1.6 ClassDef(CaloTower, 1) // Calo tower class
56 sixie 1.1 };
57     }
58 bendavid 1.4
59     //--------------------------------------------------------------------------------------------------
60     inline const mithep::FourVectorM mithep::CaloTower::Mom() const
61     {
62 loizides 1.6 // Compute and return four momentum.
63 bendavid 1.4
64     if ( E() > 0 )
65     return mithep::FourVectorM(Et(),Eta(),Phi(),0.0);
66     else
67     return mithep::FourVectorM();
68     }
69 sixie 1.1 #endif