ROOTPWA
FSParticle.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 // Final state particle
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 FSPARTICLE_HH
39 #define FSPARTICLE_HH
40 
41 // Collaborating Class Headers -------
42 #include "TLorentzVector.h"
43 #include "TLorentzRotation.h"
44 #include "TVector3.h"
45 #include <assert.h>
46 
47 // Collaborating Class Declarations --
48 
49 class FSParticle {
50 public:
51 
52  // Constructors/Destructors ---------
53  FSParticle();
54  FSParticle(const TLorentzVector& p,
55  const TVector3& v,
56  int q);
57 
58  virtual ~FSParticle(){}
59 
60  // Operators
61  friend bool operator== (const FSParticle& lhs, const FSParticle& rhs);
62 
63  // Accessors -----------------------
64  const TLorentzVector& p() const {return _p;}
65  const TVector3& v() const {return _v;}
66  int q() const {return _q;}
67 
68  bool IsEqual(FSParticle* pi) {return (*this)==(*pi);}
69 
70  void Transform(const TLorentzRotation& L){_p*=L;}
71 
72 
73 private:
74 
75  // Private Data Members ------------
76  TLorentzVector _p; // 4-momentum
77  TVector3 _v; // vertex
78  int _q; // charge
79 
80 
81  // Private Methods -----------------
82 };
83 
84 #endif
85 
86 //--------------------------------------------------------------
87 // $Log$
88 //--------------------------------------------------------------