//#include <Riostream.h>
#include "AliMUON.h"
#include "AliMUONTrackParam.h"
-//#include "AliMUONChamber.h"
+#include "AliMUONConstants.h"
#include "AliRun.h"
#include "AliMagF.h"
#include "AliLog.h"
// pointed to by "TrackParam" (index 0 and 1 for first and second chambers).
Double_t extZ[2], z1, z2;
Int_t i1 = -1, i2 = -1; // = -1 to avoid compilation warnings
- AliMUON *pMUON = (AliMUON*) gAlice->GetModule("MUON"); // necessary ????
// range of Station to be checked ????
- z1 = (&(pMUON->Chamber(2 * Station)))->Z(); // Z of first chamber
- z2 = (&(pMUON->Chamber(2 * Station + 1)))->Z(); // Z of second chamber
+ z1 = AliMUONConstants::DefaultChamberZ(2 * Station);
+ z2 = AliMUONConstants::DefaultChamberZ(2 * Station + 1);
// First and second Z to extrapolate at
if ((z1 > this->fZ) && (z2 > this->fZ)) {i1 = 0; i2 = 1;}
else if ((z1 < this->fZ) && (z2 < this->fZ)) {i1 = 1; i2 = 0;}
} else {
deltaP = 3.0714 + 0.011767 *pTotal;
}
+ deltaP *= 0.75; // AZ
} else {
if (pTotal < 20) {
deltaP = 2.1207 + 0.05478 * pTotal - 0.00145079 * pTotal * pTotal;
} else {
deltaP = 2.6069 + 0.0051705 * pTotal;
}
+ deltaP *= 0.9; // AZ
}
pTotalCorrected = pTotal + deltaP / TMath::Cos(theta);
return pTotalCorrected;
}
//__________________________________________________________________________
-Double_t AliMUONTrackParam::Px()
+Double_t AliMUONTrackParam::Px() const
{
// return px from track paramaters
Double_t pYZ, pZ, pX;
return pX;
}
//__________________________________________________________________________
-Double_t AliMUONTrackParam::Py()
+Double_t AliMUONTrackParam::Py() const
{
// return px from track paramaters
Double_t pYZ, pZ, pY;
return pY;
}
//__________________________________________________________________________
-Double_t AliMUONTrackParam::Pz()
+Double_t AliMUONTrackParam::Pz() const
{
// return px from track paramaters
Double_t pYZ, pZ;
return pZ;
}
//__________________________________________________________________________
-Double_t AliMUONTrackParam::P()
+Double_t AliMUONTrackParam::P() const
{
// return p from track paramaters
Double_t pYZ, pZ, p;
return;
}
+//_____________________________________________-
+void AliMUONTrackParam::Print(Option_t* opt) const
+{
+//
+ // Printing TrackParam information
+ // "full" option for printing all the information about the TrackParam
+ //
+ TString sopt(opt);
+ sopt.ToUpper();
+
+ if ( sopt.Contains("FULL") ) {
+ cout << "<AliMUONTrackParam> Bending P=" << setw(5) << setprecision(3) << 1./GetInverseBendingMomentum() <<
+ ", NonBendSlope=" << setw(5) << setprecision(3) << GetNonBendingSlope()*180./TMath::Pi() <<
+ ", BendSlope=" << setw(5) << setprecision(3) << GetBendingSlope()*180./TMath::Pi() <<
+ ", (x,y,z)_IP=(" << setw(5) << setprecision(3) << GetNonBendingCoor() <<
+ "," << setw(5) << setprecision(3) << GetBendingCoor() <<
+ "," << setw(5) << setprecision(3) << GetZ() <<
+ ") cm, (px,py,pz)=(" << setw(5) << setprecision(3) << Px() <<
+ "," << setw(5) << setprecision(3) << Py() <<
+ "," << setw(5) << setprecision(3) << Pz() << ") GeV/c" << endl;
+ }
+ else {
+ cout << "<AliMUONTrackParam>" << endl;
+ }
+
+}