ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/SuperCluster.h
Revision: 1.1
Committed: Fri Aug 8 11:12:37 2008 UTC (16 years, 9 months ago) by sixie
Content type: text/plain
Branch: MAIN
Log Message:
Add BasicCluster and SuperCluster objects into the Data Tree, and their Fillers.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: $
3 //
4 // SuperCluster
5 //
6 // Details to be worked out...
7 //
8 // Authors: S.Xie
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef DATATREE_SUPERCLUSTER_H
12 #define DATATREE_SUPERCLUSTER_H
13
14 #include <TMath.h>
15 #include "MitAna/DataTree/interface/DataObject.h"
16 #include "MitAna/DataTree/interface/BasicCluster.h"
17 #include "MitAna/DataCont/interface/RefArray.h"
18
19 namespace mithep
20 {
21 class SuperCluster : public DataObject
22 {
23 public:
24 SuperCluster() : fEnergy(0.0), fPoint(0,0,0) , fRawEnergy(-1.0) {}
25 ~SuperCluster() {}
26
27 const BasicCluster *Cluster(UInt_t i) const { return fClusters.At(i); }
28 UInt_t ClusterSize() const { return fClusters.GetEntries(); }
29 Double_t Energy() const { return fEnergy; }
30 Double_t Eta() const { return fPoint.Eta(); }
31 Double_t EtaWidth() const { return fEtaWidth; }
32 Double_t Phi() const { return fPoint.Phi(); }
33 Double_t PhiWidth() const { return fPhiWidth; }
34 Double_t PreshowerEnergy() const { return fPreshowerEnergy; }
35 Double_t RawEnergy() const { return fRawEnergy; }
36 const BasicCluster *Seed() const;
37 Double_t X() const { return fPoint.X(); }
38 Double_t Y() const { return fPoint.Y(); }
39 Double_t Z() const { return fPoint.Z(); }
40 void Print(Option_t *opt="") const;
41
42 void AddCluster( BasicCluster *Cluster) { fClusters.Add(Cluster); }
43 void SetEnergy(Double_t Energy) { fEnergy = Energy; }
44 void SetEtaWidth(Double_t EtaWidth) { fEtaWidth = EtaWidth; }
45 void SetPhiWidth(Double_t PhiWidth) { fPhiWidth = PhiWidth; }
46 void SetPreshowerEnergy(Double_t PreshowerEnergy) { fPreshowerEnergy
47 = PreshowerEnergy; }
48 void SetRawEnergy(Double_t RawEnergy) { fRawEnergy = RawEnergy; }
49 void SetSeed( BasicCluster* SeedRef) { fSeedRef = SeedRef; }
50 void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); }
51
52 protected:
53
54 Double_t fEnergy; //Supercluster energy
55 Double_t fEtaWidth; //Width in Phi
56 ThreeVector fPoint; //Centroid Position
57 Double_t fPreshowerEnergy; //Energy in the preshower
58 Double_t fPhiWidth; //Width in Phi
59 Double_t fRawEnergy; //Supercluster raw energy
60 RefArray<BasicCluster> fClusters; //||BasicClusters in this SuperCluster
61 TRef fSeedRef; //the seed cluster
62
63 ClassDef(SuperCluster, 1) // Generic particle class
64 };
65 }
66
67 //--------------------------------------------------------------------------------------------------
68 inline const mithep::BasicCluster *mithep::SuperCluster::Seed() const
69 {
70 // Return tracker track.
71
72 return static_cast<const BasicCluster*>(fSeedRef.GetObject());
73 }
74 #endif