PandaRoot
PndEventInfo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDEVENTINFO_H
14 #define PNDEVENTINFO_H
15 // //
17 // PndEventInfo //
18 // //
19 // Contains and provides access to summary information in the event //
20 // useful for analysis //
21 // //
23 
24 //----------------------
25 // Base Class Headers --
26 //----------------------
27 #include "TObject.h"
28 #include "TVector3.h"
29 #include "TLorentzVector.h"
30 #include "RhoVector3Err.h"
31 
32 #include "RhoEventShape.h"
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class PndEventInfo : public TObject {
39 
40  //--------------------
41  // Instance Members --
42  //--------------------
43  public:
44  // Constructors
45  PndEventInfo();
46  // there should eventually be a constructor that takes all the
47  // various data items
48 
49  // Destructor
50  virtual ~PndEventInfo();
51 
52  // Operations
53  virtual void PrintOn(std::ostream &o = std::cout) const;
54 
55  // accessors to contained information
56  const TLorentzVector &AntiProtonBeam() const { return fAntiProtonBeam; }
57  const TLorentzVector &CmFrame() const { return fCmFrame; }
58  const RhoVector3Err &BeamSpot() const { return fBeamSpot; }
59  const RhoVector3Err &PrimaryVertex() const { return fPrimaryVertex; }
60  const TVector3 &IPTruth() const { return fIPTruth; }
61  // const TEventShape& EventShape() const {return fEventShape;}
62 
63  int GetCharged() { return fNCharged; }
64  int GetNeutrals() { return fNNeutrals; }
65 
66  // Function to set information
67  void SetPrimaryVertex(RhoVector3Err &inVtx) { fPrimaryVertex = inVtx; }
68  void SetIPTruth(TVector3 &inVtx) { fIPTruth = inVtx; }
69  void SetBeamSpot(RhoVector3Err &inVtx) { fBeamSpot = inVtx; }
70  void SetCmFrame(TLorentzVector &cmf);
71  void SetAntiProtonBeam(TLorentzVector &beam);
72 
73  // void SetEventShape(TEventShape &eventShape) {fEventShape=eventShape;}
74 
75  void SetCharged(int n) { fNCharged = n; }
76  void SetNeutrals(int n) { fNNeutrals = n; }
77 
78  private:
79  TLorentzVector fAntiProtonBeam; // The antiproton beam
80  TLorentzVector fCmFrame; // The CMS frame
81  RhoVector3Err fBeamSpot;
82  RhoVector3Err fPrimaryVertex;
83  TVector3 fIPTruth; // the MC truth IP
84  Int_t fNCharged;
85  Int_t fNNeutrals;
86  // TEventShape fEventShape;
87 
88  public:
89  ClassDef(PndEventInfo, 1) // Summary information in the event
90 };
91 
92 // standalone print
93 std::ostream &operator<<(std::ostream &o, const PndEventInfo &);
94 
95 #endif
const RhoVector3Err & PrimaryVertex() const
Definition: PndEventInfo.h:59
void SetNeutrals(int n)
Definition: PndEventInfo.h:76
virtual ~PndEventInfo()
void SetPrimaryVertex(RhoVector3Err &inVtx)
Definition: PndEventInfo.h:67
std::ostream & operator<<(std::ostream &o, const PndEventInfo &)
void SetCmFrame(TLorentzVector &cmf)
void SetCharged(int n)
Definition: PndEventInfo.h:75
int GetNeutrals()
Definition: PndEventInfo.h:64
void SetAntiProtonBeam(TLorentzVector &beam)
const TVector3 & IPTruth() const
Definition: PndEventInfo.h:60
void SetIPTruth(TVector3 &inVtx)
Definition: PndEventInfo.h:68
virtual void PrintOn(std::ostream &o=std::cout) const
const TLorentzVector & CmFrame() const
Definition: PndEventInfo.h:57
const TLorentzVector & AntiProtonBeam() const
Definition: PndEventInfo.h:56
const RhoVector3Err & BeamSpot() const
Definition: PndEventInfo.h:58
int GetCharged()
Definition: PndEventInfo.h:63
void SetBeamSpot(RhoVector3Err &inVtx)
Definition: PndEventInfo.h:69