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

Comparing UserCode/Morgan/interface/TRootEvent.h (file contents):
Revision 1.2 by mlethuil, Thu Jun 19 14:07:31 2008 UTC vs.
Revision 1.7 by lethuill, Mon Dec 1 15:58:05 2008 UTC

# Line 3 | Line 3
3  
4   #include <string>
5   #include <iostream>
6 + #include <vector>
7 + #include <map>
8 + #include <cmath>
9  
10   #include "Rtypes.h"
11   #include "TObject.h"
# Line 20 | Line 23 | public:
23                          ,passGlobalL1_(false)
24                          ,passGlobalHLT_(false)
25                          ,trigHLT_(0)
26 +                        ,csa07id_(0)
27 +                        ,csa07weight_(0.)
28 +                        ,csa07process_()
29                          ,nBasicClusters_()
30                          ,nSuperClusters_()
31                          ,primaryVertex_(0)
26                        ,metCalo_()
32                          {;}
33 <        
33 >
34          ~TRootEvent() {;}
35                  
36          // Event number
# Line 49 | Line 54 | public:
54                   }
55          }
56  
57 +        // CSA07 Process Id and Event Weight
58 +        Int_t csa07id() const { return csa07id_; }
59 +        Float_t csa07weight() const { return csa07weight_; }
60 +        TString csa07process() const { return csa07process_; }
61 +        
62          // Nb of primary vertices
63          unsigned nPrimaryVertices() const { return primaryVertex_.size(); }
64          
# Line 78 | Line 88 | public:
88          Double_t primaryVertex_y(unsigned i) const { return (primaryVertex_.size()>i ?  primaryVertex_.at(i).x() : 0. ); }
89          Double_t primaryVertex_z(unsigned i) const { return (primaryVertex_.size()>i ?  primaryVertex_.at(i).x() : 0. ); }
90          
81        // Missing Et as 3-vector
82        TVector3 metCaloVect() const { return metCalo_; }
83        // Missing Et magnitude
84        Double_t metCalo() const { return sqrt(metCalo_.Perp2()); }
85        
91          
92          void setNb(Int_t nb) { nb_ = nb; }
93          void setGlobalL1(Int_t passGlobalL1) { passGlobalL1_ = passGlobalL1; }
94 <        void setGlobalHLT(Bool_t passGlobalHLT) { passGlobalHLT_ = passGlobalHLT_; }
94 >        void setGlobalHLT(Bool_t passGlobalHLT) { passGlobalHLT_ = passGlobalHLT; }
95          void setTrigHLT(std::vector<Bool_t> trigHLT)
96          {
97                  trigHLT_.resize(trigHLT.size());
98                  for (unsigned int i=0; i!=trigHLT.size(); ++i) trigHLT_[i]=trigHLT[i];
99          }
100  
101 <
101 >        void setCsa07id(Int_t csa07id) { csa07id_=csa07id; }
102 >        void setCsa07weight(Float_t csa07weight)  { csa07weight_=csa07weight; }
103 >        void setCsa07process(TString csa07process)  { csa07process_=csa07process; }
104 >        void setCsa07process(char* csa07process)  { csa07process_=csa07process; }
105          
106          void setNBasicClusters(Int_t type,Int_t nBC) { nBasicClusters_[type]=nBC; }
107          void setNSuperClusters(Int_t type,Int_t nSC) { nSuperClusters_[type]=nSC; }
108                  
109          void addPrimaryVertex(TVector3 vertex) {  primaryVertex_.push_back(vertex); }
110          void clearPrimaryVertex(TVector3 vertex) {  primaryVertex_.clear(); }
103        void setMetCaloVect(TVector3 metCaloVect) { metCalo_ = metCaloVect; }
104        
111          /*
112          friend std::ostream& operator<< (std::ostream& stream, const TRootEvent& event) {
113                  stream << "Event #"<< event.nb() <<"  L1="<< event.trigL1() <<"  HLT="<< event.trigHLT()
114 <                        << "  Primary vertex x=" << event.primaryVertex_x() << "  y=" << event.primaryVertex_y() << "  z=" << event.primaryVertex_z()
109 <                        << "  CaloMET=" << event.metCalo() << endl;
114 >                        << "  Primary vertex x=" << event.primaryVertex_x() << "  y=" << event.primaryVertex_y() << "  z=" << event.primaryVertex_z();
115                  return stream;
116          };
117          */
118          
119   private:
120 <
120 >        
121          Int_t nb_;
122          Bool_t passGlobalL1_;
123          Bool_t passGlobalHLT_;
124          std::vector<Bool_t> trigHLT_;
125          
126 +        Int_t csa07id_;
127 +        Float_t csa07weight_;
128 +        TString csa07process_;
129 +        
130          map<Int_t,Int_t> nBasicClusters_;
131          map<Int_t,Int_t> nSuperClusters_;
132          std::vector<TVector3> primaryVertex_;
133  
134 <        TVector3 metCalo_;
126 <                
127 <        ClassDef (TRootEvent,2);
134 >        ClassDef (TRootEvent,1);
135   };
136  
137   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines