evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtSpinDensity.hh
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen 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 * EvtGen 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 EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
21 #ifndef EVTSPINDENSITY_HH
22 #define EVTSPINDENSITY_HH
23 #include "EvtGenBase/EvtComplex.hh"
24 
25 // Description: This class holds a spin density matrix, it is
26 // a complex nxn matrix.
27 
29  public:
30  EvtSpinDensity( const EvtSpinDensity& density );
31  EvtSpinDensity& operator=( const EvtSpinDensity& density );
32  virtual ~EvtSpinDensity();
33 
35  void setDim( int n );
36  int getDim() const;
37  void set( int i, int j, const EvtComplex& rhoij );
38  const EvtComplex& get( int i, int j ) const;
39  double normalizedProb( const EvtSpinDensity& d );
40  friend std::ostream& operator<<( std::ostream& s, const EvtSpinDensity& d );
41  void setDiag( int n );
42 
43  int check();
44 
45  private:
47  int dim;
48 };
49 
50 #endif
friend std::ostream & operator<<(std::ostream &s, const EvtSpinDensity &d)
void setDiag(int n)
const EvtComplex & get(int i, int j) const
EvtSpinDensity & operator=(const EvtSpinDensity &density)
virtual ~EvtSpinDensity()
int getDim() const
void set(int i, int j, const EvtComplex &rhoij)
EvtComplexPtrPtr rho
void setDim(int n)
double normalizedProb(const EvtSpinDensity &d)