From abc2458f676446707107a2d5b179db12eb774dc0 Mon Sep 17 00:00:00 2001 From: ivana Date: Fri, 10 Apr 2009 09:52:00 +0000 Subject: [PATCH] In AliMUONVTrackReconstructor: Change the range of theta angles for trigger tracks to match the convention adopted for tracker tracks (the shift of pi does not affect the Tan(theta) which is used elsewhere in the code). (Diego) --- MUON/AliMUONVTrackReconstructor.cxx | 13 +++++++++++++ MUON/AliMUONVTrackReconstructor.h | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/MUON/AliMUONVTrackReconstructor.cxx b/MUON/AliMUONVTrackReconstructor.cxx index f80e0162668..6c0d15da0be 100644 --- a/MUON/AliMUONVTrackReconstructor.cxx +++ b/MUON/AliMUONVTrackReconstructor.cxx @@ -1139,6 +1139,9 @@ void AliMUONVTrackReconstructor::EventReconstructTrigger(const AliMUONTriggerCir Float_t thetax = TMath::ATan2( x11 , z11 ); Float_t thetay = TMath::ATan2( (y21-y11) , (z21-z11) ); + + CorrectThetaRange(thetax); + CorrectThetaRange(thetay); triggerTrack.SetX11(x11); triggerTrack.SetY11(y11); @@ -1152,3 +1155,13 @@ void AliMUONVTrackReconstructor::EventReconstructTrigger(const AliMUONTriggerCir } // end of loop on Local Trigger } +//__________________________________________________________________________ +void AliMUONVTrackReconstructor::CorrectThetaRange(Float_t& theta) +{ + /// The angles of the trigger tracks, obtained with ATan2, + /// have values around +pi and -pi. On the contrary, the angles + /// used in the tracker tracks have values around 0. + /// This function sets the same range for the trigger tracks angles. + if (theta < -TMath::PiOver2()) theta += TMath::Pi(); + else if(theta > TMath::PiOver2()) theta -= TMath::Pi(); +} diff --git a/MUON/AliMUONVTrackReconstructor.h b/MUON/AliMUONVTrackReconstructor.h index 84515d98dd7..4b25fe107cf 100644 --- a/MUON/AliMUONVTrackReconstructor.h +++ b/MUON/AliMUONVTrackReconstructor.h @@ -103,7 +103,8 @@ class AliMUONVTrackReconstructor : public TObject { Bool_t FollowLinearTrackInChamber(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextChamber); Bool_t FollowLinearTrackInStation(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextStation); - + + void CorrectThetaRange(Float_t&); private: -- 2.43.0