//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
//             LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION   Geant4 SIMULATION
//  ID    : LEMuSRMuonDecayChannel.hh , v 1.0
//  AUTHOR: Taofiq PARAISO based on G4MuonDecayChannel $Id$
//  DATE  : 2004-07-13 11:15
//                   
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
//
//  &           &&&&&&&&&&                            &&&&&&&         &&&&&&&&
//  &           &                                   &&      &&       &       &&
//  &           &                   &      &       &                &       &&
//  &           &&&&&&&            &      &         &&&&&&         &&&&&&&&  
//  &           &                 &      &&                &      &      &&
//  &           &                &&     &  &     &&      &&      &        &
//  &&&&&&&&&&  &&&&&&&&&&      &  &&&&&    &&    &&&&&&&       &        &&   
//                             &
//                            &
//                           &
//                         &  
//                          MUON DECAY CHANNEL.HH
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§////

 

#ifndef LEMuSRMuonDecayChannel_h
#define LEMuSRMuonDecayChannel_h 1


#include "G4ios.hh"
#include "globals.hh"
#include "G4VDecayChannel.hh"
#include "G4DynamicParticle.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"

class LEMuSRMuonDecayChannel : public G4VDecayChannel
{

  // Class Decription
  // 
  // To do list::
  //  Find muon polarization  
  //  Compute the positron angle distribution
  //  Compute the positron energy as a function of angle distribution
  //  Remove G4MuonDecayChannel in decay table and add this new one

public:  
  //Constructors 
  LEMuSRMuonDecayChannel(const G4String& theParentName,
		     G4double        theBR);
  //  Destructor
  ~LEMuSRMuonDecayChannel();
  
 static LEMuSRMuonDecayChannel* pointer;
 static LEMuSRMuonDecayChannel* GetInstance();


void   finalize();

public:  // With Description
  virtual G4DecayProducts *DecayIt(G4double);     
  HepRandomEngine* theEngine;
  G4ThreeVector emomdir;  

  G4double alpha,sinalpha, cosalpha, delta, sindelta, cosdelta;
  G4double costheta, sintheta, phi, sinphi, cosphi, theta; 

  inline G4double GetTheta(){return theta;};
  inline G4double GetPhi(){return phi;};
 


  G4DecayProducts *DecayItPolarized(G4double,G4ThreeVector polar);


private:

 
};

#endif
