ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/CaloTower.h
Revision: 1.5
Committed: Mon Dec 1 17:31:04 2008 UTC (16 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.4: +2 -2 lines
Log Message:
Docu lines

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.5 // $Id:$
3 sixie 1.1 //
4 loizides 1.5 // CaloTower
5 sixie 1.1 //
6     // Details to be worked out...
7     //
8     // Authors: Si Xie
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef DATATREE_CALOTOWER_H
12     #define DATATREE_CALOTOWER_H
13    
14     #include <TMath.h>
15     #include "MitAna/DataTree/interface/DataObject.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 bendavid 1.2 void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
26 bendavid 1.4 void SetPosition(Double_t x, Double_t y, Double_t z)
27     { fPosition.SetXYZ(x,y,z); }
28 bendavid 1.2 void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
29 bendavid 1.4 void SetOuterEnergy(Double_t OuterEnergy) { fOuterEnergy = OuterEnergy; }
30 sixie 1.1
31 bendavid 1.4 const FourVectorM Mom() const;
32     Double_t Eta() const { return fPosition.Eta(); }
33     Double_t Phi() const { return fPosition.Phi(); }
34     Double_t Theta() const { return fPosition.Theta(); }
35     Double_t E() const { return (fEmEnergy + fHadEnergy); }
36     Double_t Et() const { return E()*TMath::Sin(Theta()); }
37     Double_t EtWithHO() const { return EWithHO()*TMath::Sin(Theta()); }
38     Double_t EWithHO() const { return (fEmEnergy + fHadEnergy + fOuterEnergy); }
39 bendavid 1.2 Double_t EmEnergy() const { return fEmEnergy; }
40 bendavid 1.4 const ThreeVectorC Position() const { return fPosition; }
41     Double_t HadEnergy() const { return fHadEnergy; }
42 bendavid 1.2 Double_t OuterEnergy() const { return fOuterEnergy; }
43 bendavid 1.4 Double_t EmEt() const { return fEmEnergy*TMath::Sin(Theta()); }
44     Double_t HadEt() const { return fHadEnergy*TMath::Sin(Theta()); }
45     Double_t OuterEt() const { return fOuterEnergy*TMath::Sin(Theta()); }
46 sixie 1.1
47     protected:
48 bendavid 1.4 ThreeVectorC32 fPosition; //Position of Tower
49     Double32_t fEmEnergy; //tower energy in Ecal
50     Double32_t fHadEnergy; //tower energy in Hcal
51     Double32_t fOuterEnergy;
52 sixie 1.1
53     ClassDef(CaloTower, 1) // Generic particle class
54     };
55     }
56 bendavid 1.4
57     //--------------------------------------------------------------------------------------------------
58     inline const mithep::FourVectorM mithep::CaloTower::Mom() const
59     {
60     // Compute and return four momentum
61    
62     if ( E() > 0 )
63     return mithep::FourVectorM(Et(),Eta(),Phi(),0.0);
64     else
65     return mithep::FourVectorM();
66     }
67 sixie 1.1 #endif