From 889a0215fc383eaa77dc4280cfc18e72e5bc481c Mon Sep 17 00:00:00 2001 From: cussonno Date: Wed, 20 Oct 2004 06:58:14 +0000 Subject: [PATCH] Correct extrapolation to vertex through the absorber (M. Germain) --- MUON/AliMUONEventReconstructor.cxx | 2 +- MUON/AliMUONReconstructor.cxx | 9 +++++---- MUON/AliMUONTrackK.cxx | 2 +- MUON/AliMUONTrackParam.cxx | 25 +++++++++++++++---------- MUON/AliMUONTrackParam.h | 6 +++--- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/MUON/AliMUONEventReconstructor.cxx b/MUON/AliMUONEventReconstructor.cxx index 098cab1ec5f..89daf388b8e 100644 --- a/MUON/AliMUONEventReconstructor.cxx +++ b/MUON/AliMUONEventReconstructor.cxx @@ -1467,7 +1467,7 @@ void AliMUONEventReconstructor::FollowTracks(void) // after going through the first station if (station == 0) { trackParamVertex = *trackParam1; - (&trackParamVertex)->ExtrapToVertex(); + (&trackParamVertex)->ExtrapToVertex(0.,0.,0.); track->SetTrackParamAtVertex(&trackParamVertex); if (fPrintLevel >= 1) { cout << "FollowTracks: track candidate(0..): " << trackIndex diff --git a/MUON/AliMUONReconstructor.cxx b/MUON/AliMUONReconstructor.cxx index a5ca740c48f..a3018b0df8f 100644 --- a/MUON/AliMUONReconstructor.cxx +++ b/MUON/AliMUONReconstructor.cxx @@ -306,7 +306,8 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const // reading info from tracks recTrack = (AliMUONTrack*) recTracksArray->At(iRecTracks); - trackParam = recTrack->GetTrackParamAtVertex(); + trackParam = (AliMUONTrackParam*) (recTrack->GetTrackParamAtHit())->First(); + trackParam->ExtrapToVertex(vertex[0],vertex[1],vertex[2]); bendingSlope = trackParam->GetBendingSlope(); nonBendingSlope = trackParam->GetNonBendingSlope(); @@ -324,9 +325,9 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const theESDTrack->SetInverseBendingMomentum(inverseBendingMomentum); theESDTrack->SetThetaX(TMath::ATan(nonBendingSlope)); theESDTrack->SetThetaY(TMath::ATan(bendingSlope)); - theESDTrack->SetZ(vertex[2]); - theESDTrack->SetBendingCoor(vertex[1]); // calculate vertex at ESD or Tracking level ? - theESDTrack->SetNonBendingCoor(vertex[0]); + theESDTrack->SetZ(zRec); + theESDTrack->SetBendingCoor(yRec); // calculate vertex at ESD or Tracking level ? + theESDTrack->SetNonBendingCoor(xRec); theESDTrack->SetChi2(fitFmin); theESDTrack->SetNHit(nTrackHits); theESDTrack->SetMatchTrigger(matchTrigger); diff --git a/MUON/AliMUONTrackK.cxx b/MUON/AliMUONTrackK.cxx index 4e841b98771..6f1bef3dbf7 100644 --- a/MUON/AliMUONTrackK.cxx +++ b/MUON/AliMUONTrackK.cxx @@ -1064,7 +1064,7 @@ void AliMUONTrackK::Branson(void) trackParam->SetInverseBendingMomentum((*fTrackPar)(4,0)/TMath::Cos((*fTrackPar)(3,0))); trackParam->SetZ(fPosition); - trackParam->ExtrapToVertex(); + trackParam->ExtrapToVertex(0.,0.,0.); (*fTrackPar)(0,0) = trackParam->GetBendingCoor(); (*fTrackPar)(1,0) = trackParam->GetNonBendingCoor(); diff --git a/MUON/AliMUONTrackParam.cxx b/MUON/AliMUONTrackParam.cxx index 922c8f08167..ed83881fe5d 100644 --- a/MUON/AliMUONTrackParam.cxx +++ b/MUON/AliMUONTrackParam.cxx @@ -250,7 +250,7 @@ void AliMUONTrackParam::ExtrapToStation(Int_t Station, AliMUONTrackParam *TrackP } //__________________________________________________________________________ -void AliMUONTrackParam::ExtrapToVertex() +void AliMUONTrackParam::ExtrapToVertex(Double_t xVtx, Double_t yVtx, Double_t zVtx) { // Extrapolation to the vertex. // Returns the track parameters resulting from the extrapolation, @@ -262,7 +262,7 @@ void AliMUONTrackParam::ExtrapToVertex() // Extrapolates track parameters upstream to the "Z" end of the front absorber ExtrapToZ(zAbsorber); // !!! // Makes Branson correction (multiple scattering + energy loss) - BransonCorrection(); + BransonCorrection(xVtx,yVtx,zVtx); // Makes a simple magnetic field correction through the absorber FieldCorrection(zAbsorber); } @@ -375,7 +375,7 @@ void AliMUONTrackParam::ExtrapToVertex() // fZ= 0; // } -void AliMUONTrackParam::BransonCorrection() +void AliMUONTrackParam::BransonCorrection(Double_t xVtx,Double_t yVtx,Double_t zVtx) { // Branson correction of track parameters // the entry parameters have to be calculated at the end of the absorber @@ -385,6 +385,8 @@ void AliMUONTrackParam::BransonCorrection() // Would it be possible to calculate all that from Geant configuration ???? // and to get the Branson parameters from a function in ABSO module ???? // with an eventual contribution from other detectors like START ???? + //change to take into account the vertex postition (real, reconstruct,....) + Double_t zBP, xBP, yBP; Double_t pYZ, pX, pY, pZ, pTotal, xEndAbsorber, yEndAbsorber, radiusEndAbsorber2, pT, theta; Int_t sign; @@ -423,11 +425,12 @@ void AliMUONTrackParam::BransonCorrection() // new parameters after Branson and energy loss corrections // Float_t zSmear = zBP - gRandom->Gaus(0.,2.); // !!! possible smearing of Z vertex position - Float_t zSmear = zBP; + + Float_t zSmear = zBP ; - pZ = pTotal * zSmear / TMath::Sqrt(xBP * xBP + yBP * yBP + zSmear * zSmear); - pX = pZ * xBP / zSmear; - pY = pZ * yBP / zSmear; + pZ = pTotal * (zSmear-zVtx) / TMath::Sqrt((xBP-xVtx) * (xBP-xVtx) + (yBP-yVtx) * (yBP-yVtx) +( zSmear-zVtx) * (zSmear-zVtx) ); + pX = pZ * (xBP - xVtx)/ (zSmear-zVtx); + pY = pZ * (yBP - yVtx) / (zSmear-zVtx); fBendingSlope = pY / pZ; fNonBendingSlope = pX / pZ; @@ -444,9 +447,11 @@ void AliMUONTrackParam::BransonCorrection() // vertex position at (0,0,0) // should be taken from vertex measurement ??? - fBendingCoor = 0.0; - fNonBendingCoor = 0; - fZ= 0; + + fBendingCoor = xVtx; + fNonBendingCoor = yVtx; + fZ= zVtx; + } //__________________________________________________________________________ diff --git a/MUON/AliMUONTrackParam.h b/MUON/AliMUONTrackParam.h index 1d010e1b9fe..9e84065b69e 100644 --- a/MUON/AliMUONTrackParam.h +++ b/MUON/AliMUONTrackParam.h @@ -40,9 +40,9 @@ class AliMUONTrackParam : public TObject void ExtrapToZ(Double_t Z); void ExtrapToStation(Int_t Station, AliMUONTrackParam *TrackParam); - void ExtrapToVertex(); // extrapolation to vertex through the absorber - void BransonCorrection(); // makes Branson correction - // returns total momentum after energy loss correction in the absorber + void ExtrapToVertex(Double_t xVtx, Double_t yVtx, Double_t zVtx); // extrapolation to vertex through the absorber (with true vertex) + void BransonCorrection(Double_t xVtx, Double_t yVtx, Double_t zVtx); // makes Branson correction with true vertex + // returns total momentum after energy loss correction in the absorber Double_t TotalMomentumEnergyLoss(Double_t thetaLimit, Double_t pTotal, Double_t theta); void FieldCorrection(Double_t Z); // makes simple magnetic field correction through the absorber -- 2.39.3