ROOTPWA
NParticleState.h
Go to the documentation of this file.
1 
2 //
3 // Copyright 2009 Sebastian Neubert
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //-----------------------------------------------------------
22 // File and Version Information:
23 // $Id$
24 //
25 // Description:
26 // N-Particle state
27 //
28 //
29 // Environment:
30 // Software developed for the COMPASS Experiment at CERN
31 //
32 // Author List:
33 // Sebastian Neubert TUM (original author)
34 //
35 //
36 //-----------------------------------------------------------
37 
38 #ifndef NPARTICLESTATE_HH
39 #define NPARTICLESTATE_HH
40 
41 
42 // Collaborating Class Headers ------
43 #include "TLorentzVector.h"
44 #include "TVector3.h"
45 #include <vector>
46 
47 class FSParticle;
48 
49 
51 public:
52 
53  // Constructors/Destructors ---------
55  virtual ~NParticleState();
56 
57  // Operators
58 
59  // Accessors -----------------------
60  unsigned int n() const {return _n;}
61  int q() const {return _q;} // total charge
62  int qabs() const; // summed abs charge
63  TLorentzVector p() const; // Momentum of NParticleState
64  TLorentzVector pfs(unsigned int i) const; // Momentum of ith daughter particle;
65  FSParticle* getParticle(unsigned int i) const {return _fspart.at(i);}
66  double Q2() const; // momentum transfer to target
67  double t() const {return -Q2();} // momentum transfer to target
68  TVector3 vertex() const; // Vertex
69  const TLorentzVector& beam() const {return _beam;}
70  double rapidity() const;
71 
72  bool Exclusive(double d=10);
73 
74  // Modifiers -----------------------
75  bool addParticle(FSParticle* part); // returns false if double counting!
76  void setBeam(const TLorentzVector& beam);
77 
78  // Operations ----------------------
79  bool isSubstate(const NParticleState* motherstate) const;
80  bool isDisjunctFrom(const NParticleState* isobar) const;
81 
82 private:
83 
84  // Private Data Members ------------
85  unsigned int _n; // number of particles
86  int _q; // total charge
87  TLorentzVector _p; // total momentum
88  TLorentzVector _beam;
89  std::vector<FSParticle*> _fspart; // 4-vectors final state particles
90 
91  // Private Methods -----------------
92 
93 };
94 
95 #endif
96 
97 //--------------------------------------------------------------
98 // $Log$
99 //--------------------------------------------------------------