FairRoot/PandaRoot
PndEventInfo.cxx
Go to the documentation of this file.
1 // //
3 // PndEventInfo //
4 // //
5 // Contains and provides access to summary information in the event //
6 // useful for analysis //
7 // //
8 // Author List: //
9 // Marcel Kunze, RUB, Dec. 2k //
10 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
11 // //
13 
14 #include "PndEventInfo.h"
15 #include <assert.h>
16 
18 
19 #include <iostream>
20 using namespace std;
21 
23  fAntiProtonBeam(TLorentzVector(0,0,0,0)),
24  fCmFrame(TLorentzVector(0,0,0,0)),
25  fBeamSpot(TVector3(0,0,0)),
26  fPrimaryVertex(TVector3(0,0,0)),
27  fIPTruth(TVector3(0,0,0)),
28  fNCharged(0),
29  fNNeutrals(0)
30 {}
31 
32 //--------------
33 // Destructor --
34 //--------------
35 
37 {
38 }
39 
40 //--------------
41 // Operations --
42 //--------------
43 void PndEventInfo::SetCmFrame( TLorentzVector& cmf)
44 {
45  fCmFrame=cmf;
46  fAntiProtonBeam=cmf;
47  fAntiProtonBeam.SetE(cmf.E()-0.938272);
48 }
49 
50 
51 void PndEventInfo::SetAntiProtonBeam( TLorentzVector& beam)
52 {
53  fAntiProtonBeam=beam;
54  fCmFrame=beam;
55  fCmFrame.SetE(beam.E()+0.938272);
56 }
57 
58 
60 {
61  o << "pbar beam: ("<<fAntiProtonBeam.Px()<<","<<fAntiProtonBeam.Py()
62  <<","<<fAntiProtonBeam.Pz()<<","<<fAntiProtonBeam.E()<<")"<<endl;
63  o << " pbarpSystem: ("<<fCmFrame.Px()<<","<<fCmFrame.Py()<<","<<fCmFrame.Pz()<<","<<fCmFrame.E()<<")"<<endl;
64  o << " spots: "<<BeamSpot()<<" "<<PrimaryVertex()<<endl;
65  o << " n_charg="<<fNCharged<<" n_neut="<<fNNeutrals<<endl;
66 }
67 
69 
70 
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
void SetCmFrame(TLorentzVector &cmf)
const RhoVector3Err & PrimaryVertex() const
Definition: PndEventInfo.h:49
TLorentzVector fAntiProtonBeam
Definition: PndEventInfo.h:69
Int_t a
Definition: anaLmdDigi.C:126
void SetAntiProtonBeam(TLorentzVector &beam)
virtual ~PndEventInfo()
Int_t fNNeutrals
Definition: PndEventInfo.h:75
TLorentzVector fCmFrame
Definition: PndEventInfo.h:70
Int_t fNCharged
Definition: PndEventInfo.h:74
virtual void PrintOn(std::ostream &o=std::cout) const
ClassImp(PndAnaContFact)
const RhoVector3Err & BeamSpot() const
Definition: PndEventInfo.h:48