PandaTree
Met.h
1 #ifndef PandaTree_Objects_Met_h
2 #define PandaTree_Objects_Met_h
3 #include "Constants.h"
4 #include "../../Framework/interface/Singlet.h"
5 #include "../../Framework/interface/Array.h"
6 #include "../../Framework/interface/Collection.h"
7 #include "../../Framework/interface/Ref.h"
8 #include "../../Framework/interface/RefVector.h"
9 
10 namespace panda {
11 
12  class Met : public Singlet {
13  public:
14  typedef Singlet base_type;
15 
16  Met(char const* name = "");
17  Met(Met const&);
18  ~Met();
19  Met& operator=(Met const&);
20 
21  static char const* typeName() { return "Met"; }
22 
23  void print(std::ostream& = std::cout, UInt_t level = 1) const override;
24  void dump(std::ostream& = std::cout) const override;
25 
26  virtual TVector2 v() const { TVector2 vec; vec.SetMagPhi(pt, phi); return vec; }
27  void setXY(double x, double y) { pt = std::sqrt(x * x + y * y); phi = std::atan2(y, x); }
28 
29  Float_t pt{};
30  Float_t phi{};
31 
32  /* BEGIN CUSTOM Met.h.classdef */
33  /* END CUSTOM */
34 
35  static utils::BranchList getListOfBranches();
36 
37  protected:
38  void doSetStatus_(TTree&, utils::BranchList const&) override;
39  utils::BranchList doGetStatus_(TTree&) const override;
40  utils::BranchList doGetBranchNames_(Bool_t) const override;
41  void doSetAddress_(TTree&, utils::BranchList const& = {"*"}, Bool_t setStatus = kTRUE) override;
42  void doBook_(TTree&, utils::BranchList const& = {"*"}) override;
43  void doInit_() override;
44  };
45 
46  /* BEGIN CUSTOM Met.h.global */
47  /* END CUSTOM */
48 
49 }
50 
51 #endif
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: Met.cc:94
List of branch names.
Definition: IOUtils.h:64
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: Met.cc:103
Base class for singlet objects.
Definition: Singlet.h:16
void setStatus(TTree &, utils::BranchList const &blist) final
Set status of branches to true (matching branch) or false (vetoed branch)
Definition: Singlet.cc:4
Definition: Met.h:12
Definition: Array.h:11