G4StokesVector.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id: G4StokesVector.hh 69847 2013-05-16 09:36:18Z gcosmo $
00027 //
00028 // GEANT4 Class header file
00029 //
00030 // File name:     G4StokesVector
00031 //
00032 // Author:        Andreas Schaelicke
00033 //
00034 // Creation date: 01.05.2005
00035 //
00036 // Modifications:
00037 // 27-07-06 added some test routines (P.Starovoitov)
00038 // 25-08-06 modified name of test routines (A.Schaelicke)
00039 //
00040 // Class Description:
00041 //
00042 // Provides Stokesvector representation employed in implementation of
00043 // polarized processes.
00044 //
00045 // aim:
00046 //   - store three components of a stokesvector
00047 //   - distinguish between boson or fermion state (different transformations)
00048 //   - provide unique definition of reference frame (cf. G4PolarizationHelper)
00049 //
00050 
00051 #ifndef G4StokesVector_h
00052 #define G4StokesVector_h 1
00053 
00054 #include "G4ThreeVector.hh"
00055 #include "G4RotationMatrix.hh"
00056 
00057 
00058 class G4StokesVector: public G4ThreeVector
00059 {
00060  public:
00061   // standard vectors:
00062   static const G4StokesVector ZERO;
00063   static const G4StokesVector P1;
00064   static const G4StokesVector P2;
00065   static const G4StokesVector P3;
00066   static const G4StokesVector M1;
00067   static const G4StokesVector M2;
00068   static const G4StokesVector M3;
00069 public:
00070   G4StokesVector();
00071   G4StokesVector(const G4ThreeVector & v);
00072   virtual ~G4StokesVector();
00073 public:
00074   inline G4double p1() const { return x(); }
00075   inline G4double p2() const { return y(); }
00076   inline G4double p3() const { return z(); }
00077 
00078   inline G4bool IsZero() const { return *this==ZERO; } 
00079   inline G4double Transverse() const { return perp(); } 
00080 
00081   inline G4ThreeVector PolSqr() const { 
00082     return G4ThreeVector(x()*x(),y()*y(),z()*z()); 
00083   }
00084   inline G4ThreeVector PolSqrt() const { 
00085     return G4ThreeVector(std::sqrt(x()),std::sqrt(y()),std::sqrt(z())); 
00086   }
00087   G4ThreeVector PolError(const G4StokesVector & sum2, long n);
00088 
00089   // Ratio of 3-vectors.
00090   G4ThreeVector PolDiv( const G4StokesVector & );
00091 
00092   inline void SetPhoton() { isPhoton=true; }
00093 
00094   void RotateAz(G4ThreeVector nInteractionFrame, 
00095                 G4ThreeVector particleDirection);
00096   void InvRotateAz(G4ThreeVector nInteractionFrame, 
00097                    G4ThreeVector particleDirection);
00098   void RotateAz(G4double cosphi, G4double sinphi);
00099   G4double GetBeta();
00100 
00101   void DiceUniform();
00102   void DiceP1();
00103   void DiceP2();
00104   void DiceP3();
00105 
00106   void FlipP3();
00107 private:
00108   G4bool isPhoton;
00109 };
00110 
00111 
00112 #endif

Generated on Mon May 27 17:49:55 2013 for Geant4 by  doxygen 1.4.7