ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

//-----------------------------------------------------------------------------
// Class AliMUONMathieson
// -----------------------
// Implementation of Mathieson response
// Separated from other classes by CH. Finck with removing circular
// dependencies 
//-----------------------------------------------------------------------------

#include "AliMUONMathieson.h"

#include "AliLog.h"

#include <TClass.h>
#include <TMath.h>
#include <TRandom.h>

/// \cond CLASSIMP
ClassImp(AliMUONMathieson)
/// \endcond
	
//__________________________________________________________________________
AliMUONMathieson::AliMUONMathieson() :
    fSqrtKx3(0.),
    fKx2(0.),
    fKx4(0.),
    fSqrtKy3(0.),
    fKy2(0.),
    fKy4(0.),
    fPitch(0.),
    fInversePitch(0.)
{
/// Default constructor

}

//__________________________________________________________________________
AliMUONMathieson::~AliMUONMathieson()
{
/// Destructor
}

  //__________________________________________________________________________
void AliMUONMathieson::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3)
{
/// Set to "SqrtKx3" the Mathieson parameter K3 ("fSqrtKx3")
/// in the X direction, perpendicular to the wires,
/// and derive the Mathieson parameters K2 ("fKx2") and K4 ("fKx4")
/// in the same direction
  fSqrtKx3 = SqrtKx3;
  fKx2 = TMath::Pi() / 2. * (1. - 0.5 * fSqrtKx3);
  Float_t cx1 = fKx2 * fSqrtKx3 / 4. / TMath::ATan(Double_t(fSqrtKx3));
  fKx4 = cx1 / fKx2 / fSqrtKx3;
}
	
  //__________________________________________________________________________
void AliMUONMathieson::SetSqrtKy3AndDeriveKy2Ky4(Float_t SqrtKy3)
{
/// Set to "SqrtKy3" the Mathieson parameter K3 ("fSqrtKy3")
/// in the Y direction, along the wires,
/// and derive the Mathieson parameters K2 ("fKy2") and K4 ("fKy4")
/// in the same direction
  fSqrtKy3 = SqrtKy3;
  fKy2 = TMath::Pi() / 2. * (1. - 0.5 * fSqrtKy3);
  Float_t cy1 = fKy2 * fSqrtKy3 / 4. / TMath::ATan(Double_t(fSqrtKy3));
  fKy4 = cy1 / fKy2 / fSqrtKy3;
}

//_____________________________________________________________________________
Float_t
AliMUONMathieson::IntXY(Float_t xi1, Float_t yi1, Float_t xi2, Float_t yi2) const
{
/// Integrate the Mathieson over x and y

  xi1 *= fInversePitch;
  xi2 *= fInversePitch;
  yi1 *= fInversePitch;
  yi2 *= fInversePitch;
  //
  // The Mathieson function 
  Double_t ux1=fSqrtKx3*TMath::TanH(fKx2*xi1);
  Double_t ux2=fSqrtKx3*TMath::TanH(fKx2*xi2);
  
  Double_t uy1=fSqrtKy3*TMath::TanH(fKy2*yi1);
  Double_t uy2=fSqrtKy3*TMath::TanH(fKy2*yi2);
  
  
  return Float_t(4.*fKx4*(TMath::ATan(ux2)-TMath::ATan(ux1))*
                 fKy4*(TMath::ATan(uy2)-TMath::ATan(uy1)));
}

//______________________________________________________________________________
void 
AliMUONMathieson::SetPitch(Float_t p1)
{
/// Defines the pitch, and store its inverse, which is what is used in fact.

  fPitch = p1;
  if ( fPitch )
  {
    fInversePitch = 1/fPitch;
  }
  else
  {
    AliError(Form("Invalid pitch %e",p1));
    fInversePitch = 0.0;
  }
}

 AliMUONMathieson.cxx:1
 AliMUONMathieson.cxx:2
 AliMUONMathieson.cxx:3
 AliMUONMathieson.cxx:4
 AliMUONMathieson.cxx:5
 AliMUONMathieson.cxx:6
 AliMUONMathieson.cxx:7
 AliMUONMathieson.cxx:8
 AliMUONMathieson.cxx:9
 AliMUONMathieson.cxx:10
 AliMUONMathieson.cxx:11
 AliMUONMathieson.cxx:12
 AliMUONMathieson.cxx:13
 AliMUONMathieson.cxx:14
 AliMUONMathieson.cxx:15
 AliMUONMathieson.cxx:16
 AliMUONMathieson.cxx:17
 AliMUONMathieson.cxx:18
 AliMUONMathieson.cxx:19
 AliMUONMathieson.cxx:20
 AliMUONMathieson.cxx:21
 AliMUONMathieson.cxx:22
 AliMUONMathieson.cxx:23
 AliMUONMathieson.cxx:24
 AliMUONMathieson.cxx:25
 AliMUONMathieson.cxx:26
 AliMUONMathieson.cxx:27
 AliMUONMathieson.cxx:28
 AliMUONMathieson.cxx:29
 AliMUONMathieson.cxx:30
 AliMUONMathieson.cxx:31
 AliMUONMathieson.cxx:32
 AliMUONMathieson.cxx:33
 AliMUONMathieson.cxx:34
 AliMUONMathieson.cxx:35
 AliMUONMathieson.cxx:36
 AliMUONMathieson.cxx:37
 AliMUONMathieson.cxx:38
 AliMUONMathieson.cxx:39
 AliMUONMathieson.cxx:40
 AliMUONMathieson.cxx:41
 AliMUONMathieson.cxx:42
 AliMUONMathieson.cxx:43
 AliMUONMathieson.cxx:44
 AliMUONMathieson.cxx:45
 AliMUONMathieson.cxx:46
 AliMUONMathieson.cxx:47
 AliMUONMathieson.cxx:48
 AliMUONMathieson.cxx:49
 AliMUONMathieson.cxx:50
 AliMUONMathieson.cxx:51
 AliMUONMathieson.cxx:52
 AliMUONMathieson.cxx:53
 AliMUONMathieson.cxx:54
 AliMUONMathieson.cxx:55
 AliMUONMathieson.cxx:56
 AliMUONMathieson.cxx:57
 AliMUONMathieson.cxx:58
 AliMUONMathieson.cxx:59
 AliMUONMathieson.cxx:60
 AliMUONMathieson.cxx:61
 AliMUONMathieson.cxx:62
 AliMUONMathieson.cxx:63
 AliMUONMathieson.cxx:64
 AliMUONMathieson.cxx:65
 AliMUONMathieson.cxx:66
 AliMUONMathieson.cxx:67
 AliMUONMathieson.cxx:68
 AliMUONMathieson.cxx:69
 AliMUONMathieson.cxx:70
 AliMUONMathieson.cxx:71
 AliMUONMathieson.cxx:72
 AliMUONMathieson.cxx:73
 AliMUONMathieson.cxx:74
 AliMUONMathieson.cxx:75
 AliMUONMathieson.cxx:76
 AliMUONMathieson.cxx:77
 AliMUONMathieson.cxx:78
 AliMUONMathieson.cxx:79
 AliMUONMathieson.cxx:80
 AliMUONMathieson.cxx:81
 AliMUONMathieson.cxx:82
 AliMUONMathieson.cxx:83
 AliMUONMathieson.cxx:84
 AliMUONMathieson.cxx:85
 AliMUONMathieson.cxx:86
 AliMUONMathieson.cxx:87
 AliMUONMathieson.cxx:88
 AliMUONMathieson.cxx:89
 AliMUONMathieson.cxx:90
 AliMUONMathieson.cxx:91
 AliMUONMathieson.cxx:92
 AliMUONMathieson.cxx:93
 AliMUONMathieson.cxx:94
 AliMUONMathieson.cxx:95
 AliMUONMathieson.cxx:96
 AliMUONMathieson.cxx:97
 AliMUONMathieson.cxx:98
 AliMUONMathieson.cxx:99
 AliMUONMathieson.cxx:100
 AliMUONMathieson.cxx:101
 AliMUONMathieson.cxx:102
 AliMUONMathieson.cxx:103
 AliMUONMathieson.cxx:104
 AliMUONMathieson.cxx:105
 AliMUONMathieson.cxx:106
 AliMUONMathieson.cxx:107
 AliMUONMathieson.cxx:108
 AliMUONMathieson.cxx:109
 AliMUONMathieson.cxx:110
 AliMUONMathieson.cxx:111
 AliMUONMathieson.cxx:112
 AliMUONMathieson.cxx:113
 AliMUONMathieson.cxx:114
 AliMUONMathieson.cxx:115
 AliMUONMathieson.cxx:116
 AliMUONMathieson.cxx:117
 AliMUONMathieson.cxx:118
 AliMUONMathieson.cxx:119
 AliMUONMathieson.cxx:120
 AliMUONMathieson.cxx:121
 AliMUONMathieson.cxx:122
 AliMUONMathieson.cxx:123
 AliMUONMathieson.cxx:124
 AliMUONMathieson.cxx:125