ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/CaloTower.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/CaloTower.h (file contents):
Revision 1.5 by loizides, Mon Dec 1 17:31:04 2008 UTC vs.
Revision 1.6 by loizides, Tue Dec 9 17:46:59 2008 UTC

# Line 3 | Line 3
3   //
4   // CaloTower
5   //
6 < // Details to be worked out...
6 > // This class holds calo tower information.
7   //
8 < // Authors: Si Xie
8 > // Authors: S.Xie
9   //--------------------------------------------------------------------------------------------------
10  
11   #ifndef DATATREE_CALOTOWER_H
12   #define DATATREE_CALOTOWER_H
13  
14 #include <TMath.h>
14   #include "MitAna/DataTree/interface/DataObject.h"
15 + #include <TMath.h>
16  
17   namespace mithep
18   {
# Line 22 | Line 22 | namespace mithep
22        CaloTower() {}
23        ~CaloTower() {}
24      
25      void                SetEmEnergy(Double_t EmEnergy)       { fEmEnergy    = EmEnergy;    }
26      void                SetPosition(Double_t x, Double_t y, Double_t z)
27                                                            { fPosition.SetXYZ(x,y,z);     }
28      void                SetHadEnergy(Double_t HadEnergy)     { fHadEnergy   = HadEnergy;   }
29      void                SetOuterEnergy(Double_t OuterEnergy) { fOuterEnergy = OuterEnergy; }              
25  
26 <      const FourVectorM   Mom()         const;
27 <      Double_t            Eta()         const { return fPosition.Eta();                      }
28 <      Double_t            Phi()         const { return fPosition.Phi();                      }
29 <      Double_t            Theta()       const { return fPosition.Theta();                    }
30 <      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());        }
26 >      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 <      const ThreeVectorC  Position()    const { return fPosition;                            }
34 <      Double_t            HadEnergy()   const { return fHadEnergy;                           }
35 <      Double_t            OuterEnergy() const { return fOuterEnergy;                         }
36 <      Double_t            EmEt()        const { return fEmEnergy*TMath::Sin(Theta());        }
37 <      Double_t            HadEt()       const { return fHadEnergy*TMath::Sin(Theta());       }
38 <      Double_t            OuterEt()     const { return fOuterEnergy*TMath::Sin(Theta());     }        
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 >      const FourVectorM   Mom()         const;
36 >      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  
49      protected:
50 <      ThreeVectorC32      fPosition;     //Position of Tower
50 >      ThreeVectorC32      fPosition;     //position of tower
51        Double32_t          fEmEnergy;     //tower energy in Ecal
52        Double32_t          fHadEnergy;    //tower energy in Hcal
53 <      Double32_t          fOuterEnergy;
53 >      Double32_t          fOuterEnergy;  //tower energy in outer Hcal
54  
55 <    ClassDef(CaloTower, 1) // Generic particle class
55 >    ClassDef(CaloTower, 1) // Calo tower class
56    };
57   }
58  
59   //--------------------------------------------------------------------------------------------------
60   inline const mithep::FourVectorM mithep::CaloTower::Mom() const
61   {
62 <  // Compute and return four momentum
62 >  // Compute and return four momentum.
63  
64    if ( E() > 0 )
65      return mithep::FourVectorM(Et(),Eta(),Phi(),0.0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines