fMinBendingMomentum(0.),
fMaxBendingMomentum(0.),
fMaxNonBendingSlope(0.),
+ fMaxBendingSlope(0.),
fNonBendingVertexDispersion(0.),
fBendingVertexDispersion(0.),
fMaxNonBendingDistanceToTrack(0.),
fMinBendingMomentum = 1.;
fMaxBendingMomentum = 3000.;
fMaxNonBendingSlope = 0.3;
+ fMaxBendingSlope = 0.4;
fNonBendingVertexDispersion = 10.;
fBendingVertexDispersion = 10.;
fMaxNonBendingDistanceToTrack = 1.;
fMinBendingMomentum = 1.;
fMaxBendingMomentum = 3000.;
fMaxNonBendingSlope = 0.3;
+ fMaxBendingSlope = 0.4;
fNonBendingVertexDispersion = 10.;
fBendingVertexDispersion = 10.;
fMaxNonBendingDistanceToTrack = 1.;
fMinBendingMomentum = 1.;
fMaxBendingMomentum = 10000000.;
fMaxNonBendingSlope = 0.3;
+ fMaxBendingSlope = 0.4;
fNonBendingVertexDispersion = 10.;
fBendingVertexDispersion = 10.;
fMaxNonBendingDistanceToTrack = 10.;
cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
+ cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
+
if (strstr(fTrackingMode,"ORIGINAL"))
cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
else if (strstr(option,"FULL"))
void SetMaxNonBendingSlope(Double_t val) {fMaxNonBendingSlope = val;}
/// return the maximum value of the non bending slope
Double_t GetMaxNonBendingSlope() const {return fMaxNonBendingSlope;}
+ /// set the maximum value of the bending slope
+ void SetMaxBendingSlope(Double_t val) {fMaxBendingSlope = val;}
+ /// return the maximum value of the bending slope
+ Double_t GetMaxBendingSlope() const {return fMaxBendingSlope;}
/// set the vertex dispersion (cm) in non bending plane (used for original tracking only)
void SetNonBendingVertexDispersion(Double_t val) {fNonBendingVertexDispersion = val;}
Double32_t fMinBendingMomentum; ///< minimum value (GeV/c) of momentum in bending plane
Double32_t fMaxBendingMomentum; ///< maximum value (GeV/c) of momentum in bending plane
Double32_t fMaxNonBendingSlope; ///< maximum value of the non bending slope
+ Double32_t fMaxBendingSlope; ///< maximum value of the bending slope (used only if B = 0)
Double32_t fNonBendingVertexDispersion; ///< vertex dispersion (cm) in non bending plane (used for original tracking only)
Double32_t fBendingVertexDispersion; ///< vertex dispersion (cm) in bending plane (used for original tracking only)
void SetCosmicParam();
- ClassDef(AliMUONRecoParam,4) // MUON reco parameters
+ ClassDef(AliMUONRecoParam,5) // MUON reco parameters
};
#endif
/// \endcond
const AliMagF* AliMUONTrackExtrap::fgkField = 0x0;
+const Double_t AliMUONTrackExtrap::fgkSimpleBPosition = 0.5 * (AliMUONConstants::CoilZ() + AliMUONConstants::YokeZ());
+const Double_t AliMUONTrackExtrap::fgkSimpleBLength = 0.5 * (AliMUONConstants::CoilL() + AliMUONConstants::YokeL());
+ Double_t AliMUONTrackExtrap::fgSimpleBValue = 0.;
+ Bool_t AliMUONTrackExtrap::fgFieldON = kFALSE;
const Bool_t AliMUONTrackExtrap::fgkUseHelix = kFALSE;
const Int_t AliMUONTrackExtrap::fgkMaxStepNumber = 5000;
const Double_t AliMUONTrackExtrap::fgkHelixStepLength = 6.;
const Double_t AliMUONTrackExtrap::fgkRungeKuttaMaxResidue = 0.002;
+//__________________________________________________________________________
+void AliMUONTrackExtrap::SetField(const AliMagF* magField)
+{
+ /// set magnetic field
+
+ // set field map
+ fgkField = magField;
+ if (!fgkField) {
+ cout<<"E-AliMUONTrackExtrap::SetField: fgkField = 0x0"<<endl;
+ return;
+ }
+
+ // set field on/off flag
+ fgFieldON = (fgkField->Factor() == 0.) ? kFALSE : kTRUE;
+
+ // set field at the centre of the dipole
+ if (fgFieldON) {
+ Float_t b[3] = {0.,0.,0.}, x[3] = {50.,50.,(Float_t) fgkSimpleBPosition};
+ fgkField->Field(x,b);
+ fgSimpleBValue = (Double_t) b[0];
+ } else fgSimpleBValue = 0.;
+
+}
+
//__________________________________________________________________________
Double_t AliMUONTrackExtrap::GetImpactParamFromBendingMomentum(Double_t bendingMomentum)
{
if (bendingMomentum == 0.) return 1.e10;
- const Double_t kCorrectionFactor = 0.9; // impact parameter is 10% overestimated
- Double_t simpleBPosition = 0.5 * (AliMUONConstants::CoilZ() + AliMUONConstants::YokeZ());
- Double_t simpleBLength = 0.5 * (AliMUONConstants::CoilL() + AliMUONConstants::YokeL());
- Float_t b[3], x[3] = {50.,50.,(Float_t) simpleBPosition};
- if (fgkField) fgkField->Field(x,b);
- else {
+ if (!fgkField) {
cout<<"F-AliMUONTrackExtrap::GetField: fgkField = 0x0"<<endl;
exit(-1);
}
- Double_t simpleBValue = (Double_t) b[0];
- return kCorrectionFactor * (-0.0003 * simpleBValue * simpleBLength * simpleBPosition / bendingMomentum);
+ const Double_t kCorrectionFactor = 0.9; // impact parameter is 10% overestimated
+
+ return kCorrectionFactor * (-0.0003 * fgSimpleBValue * fgkSimpleBLength * fgkSimpleBPosition / bendingMomentum);
}
//__________________________________________________________________________
if (impactParam == 0.) return 1.e10;
- const Double_t kCorrectionFactor = 1.1; // bending momentum is 10% underestimated
- Double_t simpleBPosition = 0.5 * (AliMUONConstants::CoilZ() + AliMUONConstants::YokeZ());
- Double_t simpleBLength = 0.5 * (AliMUONConstants::CoilL() + AliMUONConstants::YokeL());
- Float_t b[3], x[3] = {50.,50.,(Float_t) simpleBPosition};
- if (fgkField) fgkField->Field(x,b);
- else {
+ if (!fgkField) {
cout<<"F-AliMUONTrackExtrap::GetField: fgkField = 0x0"<<endl;
exit(-1);
}
- Double_t simpleBValue = (Double_t) b[0];
- if (TMath::Abs(simpleBValue) > 0.01) return kCorrectionFactor * (-0.0003 * simpleBValue * simpleBLength * simpleBPosition / impactParam);
+ const Double_t kCorrectionFactor = 1.1; // bending momentum is 10% underestimated
+
+ if (fgFieldON) return kCorrectionFactor * (-0.0003 * fgSimpleBValue * fgkSimpleBLength * fgkSimpleBPosition / impactParam);
else return AliMUONReconstructor::GetRecoParam()->GetMostProbBendingMomentum();
}
//__________________________________________________________________________
-void AliMUONTrackExtrap::LinearExtrapToZ(AliMUONTrackParam* trackParam, Double_t zEnd)
+void AliMUONTrackExtrap::LinearExtrapToZ(AliMUONTrackParam* trackParam, Double_t zEnd, Bool_t updatePropagator)
{
/// Track parameters (and their covariances if any) linearly extrapolated to the plane at "zEnd".
/// On return, results from the extrapolation are updated in trackParam.
paramCov(2,3) += dZ * paramCov(3,3);
paramCov(3,2) = paramCov(2,3);
trackParam->SetCovariances(paramCov);
+
+ // Update the propagator if required
+ if (updatePropagator) {
+ TMatrixD jacob(5,5);
+ jacob.UnitMatrix();
+ jacob(0,1) = dZ;
+ jacob(2,3) = dZ;
+ trackParam->UpdatePropagator(jacob);
+ }
+
}
}
{
/// Interface to track parameter extrapolation to the plane at "Z" using Helix or Rungekutta algorithm.
/// On return, the track parameters resulting from the extrapolation are updated in trackParam.
- if (fgkUseHelix) AliMUONTrackExtrap::ExtrapToZHelix(trackParam,zEnd);
+ if (!fgFieldON) AliMUONTrackExtrap::LinearExtrapToZ(trackParam,zEnd);
+ else if (fgkUseHelix) AliMUONTrackExtrap::ExtrapToZHelix(trackParam,zEnd);
else AliMUONTrackExtrap::ExtrapToZRungekutta(trackParam,zEnd);
}
if (trackParam->GetZ() == zEnd) return; // nothing to be done if same z
+ if (!fgFieldON) { // linear extrapolation if no magnetic field
+ AliMUONTrackExtrap::LinearExtrapToZ(trackParam,zEnd,updatePropagator);
+ return;
+ }
+
// No need to propagate the covariance matrix if it does not exist
if (!trackParam->CovariancesExist()) {
cout<<"W-AliMUONTrackExtrap::ExtrapToZCov: Covariance matrix does not exist"<<endl;
/// Destructor
virtual ~AliMUONTrackExtrap(){};
- /// set field map
- static void SetField(const AliMagF* magField) {fgkField = magField;}
+ static void SetField(const AliMagF* magField);
+
+ /// return kTRUE if the field is switched ON
+ static Bool_t IsFieldON() {return fgFieldON;}
static Double_t GetImpactParamFromBendingMomentum(Double_t bendingMomentum);
static Double_t GetBendingMomentumFromImpactParam(Double_t impactParam);
// Linearly extrapolate track parameters and covariances
- static void LinearExtrapToZ(AliMUONTrackParam* trackParam, Double_t zEnd);
+ static void LinearExtrapToZ(AliMUONTrackParam* trackParam, Double_t zEnd, Bool_t updatePropagator = kFALSE);
// Extrapolate track parameters in magnetic field
static void ExtrapToZ(AliMUONTrackParam *trackParam, Double_t zEnd);
private:
static const AliMagF* fgkField; //!< field map
+ static const Double_t fgkSimpleBPosition; //!< position of the dipole
+ static const Double_t fgkSimpleBLength; //!< length of the dipole
+ static Double_t fgSimpleBValue; //!< magnetic field value at the centre
+ static Bool_t fgFieldON; //!< kTRUE if the field is switched ON
static const Bool_t fgkUseHelix; //!< Tell whether to use Helix or not (default is Runge-Kutta)
static const Int_t fgkMaxStepNumber; //!< Maximum number of steps for track extrapolation
static const Double_t fgkHelixStepLength; //!< Step lenght for track extrapolation (used in Helix)
// non bending slope
nonBendingSlope = (cluster1->GetX() - cluster2->GetX()) / (cluster1->GetZ() - cluster2->GetZ());
+ // check if non bending slope is within tolerances
+ if (TMath::Abs(nonBendingSlope) > AliMUONReconstructor::GetRecoParam()->GetMaxNonBendingSlope()) continue;
+
// bending slope
bendingSlope = (cluster1->GetY() - cluster2->GetY()) / (cluster1->GetZ() - cluster2->GetZ());
- // impact parameter
- impactParam = cluster1->GetY() - cluster1->GetZ() * bendingSlope;
-
- // absolute value of bending momentum
- bendingMomentum = TMath::Abs(AliMUONTrackExtrap::GetBendingMomentumFromImpactParam(impactParam));
-
- // check for non bending slope and bending momentum within tolerances
- if (TMath::Abs(nonBendingSlope) < AliMUONReconstructor::GetRecoParam()->GetMaxNonBendingSlope() &&
- bendingMomentum < AliMUONReconstructor::GetRecoParam()->GetMaxBendingMomentum() &&
- bendingMomentum > AliMUONReconstructor::GetRecoParam()->GetMinBendingMomentum()) {
-
- // make new segment
- segment = new ((*segments)[segments->GetLast()+1]) AliMUONObjectPair(cluster1, cluster2, kFALSE, kFALSE);
-
- // Printout for debug
- if (AliLog::GetGlobalDebugLevel() > 1) {
- cout << "segmentIndex(0...): " << segments->GetLast() << endl;
- segment->Dump();
- cout << "Cluster in first chamber" << endl;
- cluster1->Print();
- cout << "Cluster in second chamber" << endl;
- cluster2->Print();
- }
+ // check the bending momentum of the bending slope depending if the field is ON or OFF
+ if (AliMUONTrackExtrap::IsFieldON()) {
+
+ // impact parameter
+ impactParam = cluster1->GetY() - cluster1->GetZ() * bendingSlope;
+ // absolute value of bending momentum
+ bendingMomentum = TMath::Abs(AliMUONTrackExtrap::GetBendingMomentumFromImpactParam(impactParam));
+
+ // check if bending momentum is within tolerances
+ if (bendingMomentum < AliMUONReconstructor::GetRecoParam()->GetMinBendingMomentum() ||
+ bendingMomentum > AliMUONReconstructor::GetRecoParam()->GetMaxBendingMomentum()) continue;
+
+ } else {
+
+ // check if non bending slope is within tolerances
+ if (TMath::Abs(bendingSlope) > AliMUONReconstructor::GetRecoParam()->GetMaxBendingSlope()) continue;
+
+ }
+ // make new segment
+ segment = new ((*segments)[segments->GetLast()+1]) AliMUONObjectPair(cluster1, cluster2, kFALSE, kFALSE);
+
+ // Printout for debug
+ if (AliLog::GetGlobalDebugLevel() > 1) {
+ cout << "segmentIndex(0...): " << segments->GetLast() << endl;
+ segment->Dump();
+ cout << "Cluster in first chamber" << endl;
+ cluster1->Print();
+ cout << "Cluster in second chamber" << endl;
+ cluster2->Print();
}
}