ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootSuperCluster.h
Revision: 1.1
Committed: Mon May 19 16:12:13 2008 UTC (16 years, 11 months ago) by mlethuil
Content type: text/plain
Branch: MAIN
CVS Tags: cmssw_1_6_12
Log Message:
*** empty log message ***

File Contents

# Content
1 #ifndef TRootSuperCluster_h
2 #define TRootSuperCluster_h
3
4 /************************************************************************************************************************************
5 SuperCluster Type: ijk
6 i = algo => 1=Island , 2=Hybrid
7 j = detector => 1=ECAL Barrel , 2=ECAL Endcap
8 k = corrections => 0=uncorrected , 1=standard CMSSW corections , 2=standard CMSSW corections + Preshower
9
10 110 => Island Barrel SuperClusters
11 120 => Island Endcap SuperClusters
12 121 => Corrected Island Endcap SuperClusters (standard CMSSW corrections)
13 122 => Corrected Island Endcap SuperClusters with Preshower (standard CMSSW corrections)
14 210 => Hybrid Barrel SuperClusters
15 211 => Corrected Hybrid Barrel SuperClusters (standard CMSSW corrections)
16
17 ************************************************************************************************************************************/
18
19 #include <string>
20 #include <iostream>
21
22 #include "Rtypes.h"
23
24 #include "../interface/TRootCluster.h"
25
26 using namespace std;
27
28 class TRootSuperCluster : public TRootCluster
29 {
30
31 public:
32
33 TRootSuperCluster() : TRootCluster(), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;}
34 TRootSuperCluster(const TRootSuperCluster& cluster) : TRootCluster(cluster), nBasicClusters_(cluster.nBasicClusters_), subClusterUID_(cluster.subClusterUID_), subClusterIndex_(cluster.subClusterIndex_) {;}
35 TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi) : TRootCluster(energy, eta, phi), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;}
36 TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z) : TRootCluster(energy, eta, phi, x, y, z), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;}
37 TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z, Int_t det) : TRootCluster(energy, eta, phi, x, y, z, det), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;}
38 ~TRootSuperCluster() {;}
39
40
41 Int_t nBasicClusters() const { return nBasicClusters_; }
42 std::vector<Int_t> subClusterUID() const { return subClusterUID_; }
43 std::vector<Int_t> subClusterIndex() const { return subClusterIndex_; }
44 Int_t seedIndex() const
45 {
46 if(subClusterIndex_.size()>0)
47 {
48 return subClusterIndex_.at(0);
49 }
50 else
51 {
52 cout << "No seed BasicCluster in this SuperCluster...." << endl;
53 return 0;
54 }
55 }
56
57 void setNBasicClusters(Int_t nBasicClusters) { nBasicClusters_ = nBasicClusters; }
58 void addSubClusterUID(Int_t uid) { subClusterUID_.push_back(uid); }
59 void clearSubClusterUID() { subClusterUID_.clear(); }
60 void addSubClusterIndex(Int_t idx) { subClusterIndex_.push_back(idx); }
61 void clearSubClusterIndex() { subClusterIndex_.clear(); }
62
63
64 friend std::ostream& operator<< (std::ostream& stream, const TRootSuperCluster& clus) {
65 stream << "TRootSuperCluster - Type=" << clus.det_ << " (E,Et,eta,phi)=(" << clus.Mag() <<"," << clus.Pt() <<"," << clus.Eta() <<"," << clus.Phi() << ")"
66 << " Calo position (x,y,z)=(" << clus.calX() << "," << clus.calY() << "," << clus.calZ() << ")"
67 << " nBasicClusters=" << clus.nBasicClusters() << " e3x3=" << clus.e3x3() << " e5x5=" << clus.e5x5() << " eMax=" << clus.eMax()<< " e2nd=" << clus.e2nd() << " nXtals=" << clus.nXtals();
68 return stream;
69 };
70
71
72
73 protected:
74
75 Int_t nBasicClusters_;
76 std::vector<Int_t> subClusterUID_;
77 std::vector<Int_t> subClusterIndex_;
78
79
80 ClassDef (TRootSuperCluster,1);
81 };
82
83 #endif