* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.11.6.1 2002/10/11 06:56:48 hristov
-Updating VirtualMC to v3-09-02
-
-Revision 1.12 2002/09/19 10:14:00 cussonno
-Modified absorber correction. Added function FieldCorrection() to account
-for the effect of magnetic field in absorber.
-
-Revision 1.11 2002/03/08 17:25:36 cussonno
-Update absorber energy loss and Branson corrections : simplified functions
-BransonCorrection and TotalMomentumEnergyLoss.
-
-Revision 1.10 2001/04/25 14:50:42 gosset
-Corrections to violations of coding conventions
-
-Revision 1.9 2000/10/16 15:30:40 gosset
-TotalMomentumEnergyLoss:
-correction for change in the absorber composition (JP Cussonneau)
-
-Revision 1.8 2000/10/02 21:28:09 fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.7 2000/10/02 16:58:29 egangler
-Cleaning of the code :
--> coding conventions
--> void Streamers
--> some useless includes removed or replaced by "class" statement
-
-Revision 1.6 2000/09/19 09:49:50 gosset
-AliMUONEventReconstructor package
-* track extrapolation independent from reco_muon.F, use of AliMagF...
-* possibility to use new magnetic field (automatic from generated root file)
-
-Revision 1.5 2000/07/18 16:04:06 gosset
-AliMUONEventReconstructor package:
-* a few minor modifications and more comments
-* a few corrections
- * right sign for Z of raw clusters
- * right loop over chambers inside station
- * symmetrized covariance matrix for measurements (TrackChi2MCS)
- * right sign of charge in extrapolation (ExtrapToZ)
- * right zEndAbsorber for Branson correction below 3 degrees
-* use of TVirtualFitter instead of TMinuit for AliMUONTrack::Fit
-* no parameter for AliMUONTrack::Fit() but more fit parameters in Track object
-
-Revision 1.4 2000/07/03 07:53:31 morsch
-Double declaration problem on HP solved.
-
-Revision 1.3 2000/06/30 10:15:48 gosset
-Changes to EventReconstructor...:
-precision fit with multiple Coulomb scattering;
-extrapolation to vertex with Branson correction in absorber (JPC)
-
-Revision 1.2 2000/06/15 07:58:49 morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.3 2000/06/09 21:03:09 morsch
-Make includes consistent with new file structure.
-
-Revision 1.1.2.2 2000/06/09 12:58:05 gosset
-Removed comment beginnings in Log sections of .cxx files
-Suppressed most violations of coding rules
-
-Revision 1.1.2.1 2000/06/07 14:44:53 gosset
-Addition of files for track reconstruction in C++
-*/
+/* $Id$ */
///////////////////////////////////////////////////
//
//
///////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include "AliCallf77.h"
#include "AliMUON.h"
Field[0] = b[0]; Field[1] = b[1]; Field[2] = b[2];
}
}
+ //_________________________________________________________________________
+
+AliMUONTrackParam& AliMUONTrackParam::operator=(const AliMUONTrackParam& MUONTrackParam)
+{
+ if (this == &MUONTrackParam)
+ return *this;
+
+ fInverseBendingMomentum = MUONTrackParam.fInverseBendingMomentum;
+ fBendingSlope = MUONTrackParam.fBendingSlope;
+ fNonBendingSlope = MUONTrackParam.fNonBendingSlope;
+ fZ = MUONTrackParam.fZ;
+ fBendingCoor = MUONTrackParam.fBendingCoor;
+ fNonBendingCoor = MUONTrackParam.fNonBendingCoor;
+
+ return *this;
+}
+ //_________________________________________________________________________
+AliMUONTrackParam::AliMUONTrackParam(const AliMUONTrackParam& MUONTrackParam):TObject(MUONTrackParam)
+{
+ fInverseBendingMomentum = MUONTrackParam.fInverseBendingMomentum;
+ fBendingSlope = MUONTrackParam.fBendingSlope;
+ fNonBendingSlope = MUONTrackParam.fNonBendingSlope;
+ fZ = MUONTrackParam.fZ;
+ fBendingCoor = MUONTrackParam.fBendingCoor;
+ fNonBendingCoor = MUONTrackParam.fNonBendingCoor;
+}
//__________________________________________________________________________
void AliMUONTrackParam::ExtrapToZ(Double_t Z)
// replace the current track parameters.
if (this->fZ == Z) return; // nothing to be done if same Z
Double_t forwardBackward; // +1 if forward, -1 if backward
- if (Z > this->fZ) forwardBackward = 1.0;
+ if (Z < this->fZ) forwardBackward = 1.0; // spectro. z<0
else forwardBackward = -1.0;
Double_t vGeant3[7], vGeant3New[7]; // 7 in parameter ????
Int_t iGeant3, stepNumber;
Double_t stepLength = 6.0; // in parameter ????
// Extrapolation loop
stepNumber = 0;
- while (((forwardBackward * (vGeant3[2] - Z)) <= 0.0) &&
+ while (((-forwardBackward * (vGeant3[2] - Z)) <= 0.0) && // spectro. z<0
(stepNumber < maxStepNumber)) {
stepNumber++;
// Option for switching between helix and Runge-Kutta ????
// extrap_onestep_rungekutta(chargeExtrap, stepLength, vGeant3, vGeant3New);
extrap_onestep_helix(chargeExtrap, stepLength, vGeant3, vGeant3New);
- if ((forwardBackward * (vGeant3New[2] - Z)) > 0.0) break; // one is beyond Z
+ if ((-forwardBackward * (vGeant3New[2] - Z)) > 0.0) break; // one is beyond Z spectro. z<0
// better use TArray ????
for (iGeant3 = 0; iGeant3 < 7; iGeant3++)
{vGeant3[iGeant3] = vGeant3New[iGeant3];}
VGeant3[6] =
TMath::Sqrt(pYZ * pYZ +
pZ * pZ * this->fNonBendingSlope * this->fNonBendingSlope); // PTOT
- VGeant3[5] = ForwardBackward * pZ / VGeant3[6]; // PZ/PTOT
+ VGeant3[5] = -ForwardBackward * pZ / VGeant3[6]; // PZ/PTOT spectro. z<0
VGeant3[3] = this->fNonBendingSlope * VGeant3[5]; // PX/PTOT
VGeant3[4] = this->fBendingSlope * VGeant3[5]; // PY/PTOT
}
// in the current TrackParam.
// Changes parameters according to Branson correction through the absorber
- Double_t zAbsorber = 503.0; // to be coherent with the Geant absorber geometry !!!!
+ Double_t zAbsorber = -503.0; // to be coherent with the Geant absorber geometry !!!!
+ // spectro. (z<0)
// Extrapolates track parameters upstream to the "Z" end of the front absorber
ExtrapToZ(zAbsorber); // !!!
- // Makes Branson correction (multiple scattering + energy loss)
+ // Makes Branson correction (multiple scattering + energy loss)
BransonCorrection();
- // Makes a simple magnetic field correction through the absorber
+ // Makes a simple magnetic field correction through the absorber
FieldCorrection(zAbsorber);
}
if (first) {
first = kFALSE;
- zEndAbsorber = 503;
+ zEndAbsorber = -503; // spectro (z<0)
thetaLimit = 3.0 * (TMath::Pi()) / 180.;
- rLimit = zEndAbsorber * TMath::Tan(thetaLimit);
- zBP1 = 450; // values close to those calculated with EvalAbso.C
- zBP2 = 480;
+ rLimit = TMath::Abs(zEndAbsorber) * TMath::Tan(thetaLimit);
+ zBP1 = -450; // values close to those calculated with EvalAbso.C
+ zBP2 = -480;
}
pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
sign = 1;
if (fInverseBendingMomentum < 0) sign = -1;
- pZ = pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope));
+ pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro (z<0)
pX = pZ * fNonBendingSlope;
pY = pZ * fBendingSlope;
pTotal = TMath::Sqrt(pYZ *pYZ + pX * pX);
pY = pZ * yBP / zSmear;
fBendingSlope = pY / pZ;
fNonBendingSlope = pX / pZ;
+
pT = TMath::Sqrt(pX * pX + pY * pY);
- theta = TMath::ATan2(pT, pZ);
+ theta = TMath::ATan2(pT, TMath::Abs(pZ));
pTotal = TotalMomentumEnergyLoss(thetaLimit, pTotal, theta);
fInverseBendingMomentum = (sign / pTotal) *
pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
c = TMath::Sign(1.0,fInverseBendingMomentum); // particle charge
- pZ = pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope));
+ pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro. (z<0)
pX = pZ * fNonBendingSlope;
pY = pZ * fBendingSlope;
pT = TMath::Sqrt(pX*pX+pY*pY);
- if (pZ <= 0) return;
+ if (TMath::Abs(pZ) <= 0) return;
x[2] = Z/2;
x[0] = x[2]*fNonBendingSlope;
x[1] = x[2]*fBendingSlope;
// Transverse momentum rotation
// Parameterized with the study of DeltaPhi = phiReco - phiGen as a function of pZ.
- Double_t phiShift = c*0.436*0.0003*bZ*Z/pZ;
-
+ Double_t phiShift = c*0.436*0.0003*bZ*Z/pZ;
// Rotate momentum around Z axis.
pXNew = pX*TMath::Cos(phiShift) - pY*TMath::Sin(phiShift);
pYNew = pX*TMath::Sin(phiShift) + pY*TMath::Cos(phiShift);