From: martinez Date: Tue, 3 Apr 2007 14:03:24 +0000 (+0000) Subject: Interface with MUONTrackExtrap in MUON (Philippe P.) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=2e6c5e43daf8f3e52919dbb21226b084b10287f1;p=u%2Fmrichter%2FAliRoot.git Interface with MUONTrackExtrap in MUON (Philippe P.) --- diff --git a/PWG3/AliPWG3TrackExtrapInterface.cxx b/PWG3/AliPWG3TrackExtrapInterface.cxx new file mode 100644 index 00000000000..064f4642509 --- /dev/null +++ b/PWG3/AliPWG3TrackExtrapInterface.cxx @@ -0,0 +1,142 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + + +/////////////////////////////////////////////////// +// +// Interface +// for +// MUON +// track +// extrapolation +// +/////////////////////////////////////////////////// + +#include "AliPWG3TrackExtrapInterface.h" +#include "AliMUONTrackExtrap.h" +#include "AliESDMuonTrack.h" +#include "AliMUONTrackParam.h" +#include "AliMagF.h" + +#include +#include + +/// \cond CLASSIMP +ClassImp(AliPWG3TrackExtrapInterface) // Class implementation in ROOT context +/// \endcond + + //__________________________________________________________________________ +void AliPWG3TrackExtrapInterface::SetMagField(const AliMagF* magField) +{ + /// Set the magnetic field (required for track extrapolation) + + AliMUONTrackExtrap::SetField(magField); + +} + + //__________________________________________________________________________ +Bool_t AliPWG3TrackExtrapInterface::SetGeometry(const char* fileName) +{ + /// Set the geometry (required for absorber correction) + + if (!gGeoManager) { + TGeoManager::Import(fileName); + if (!gGeoManager) { + cout<<"E-AliPWG3TrackExtrapInterface::ImportGeo: getting geometry from file "< + +class AliMagF; +class AliESDMuonTrack; + +class AliPWG3TrackExtrapInterface : public TObject +{ + public: + /// Constructor + AliPWG3TrackExtrapInterface() : TObject(){}; + /// Destructor + virtual ~AliPWG3TrackExtrapInterface(){}; + + static void SetMagField(const AliMagF* magField); + static Bool_t SetGeometry(const char* fileName = "geometry.root"); + + // extrapolation without any absorber correction + static void ExtrapToVertexUncorrected(AliESDMuonTrack* muonTrack, Double_t zVtx); + // extrapolation corrected for energy loss in absorber only + static void ExtrapToVertexWithELoss(AliESDMuonTrack* muonTrack, Double_t zVtx); + // extrapolation corrected for multiple scattering in absorber only + static void ExtrapToVertexWithBranson(AliESDMuonTrack* muonTrack, Double_t vtx[3]); + // extrapolation corrected for all absorber effect (multiple scattering and energy loss) + static void ExtrapToVertex(AliESDMuonTrack* muonTrack, Double_t vtx[3]); + + static Double_t TotalMomentumEnergyLoss(AliESDMuonTrack* muonTrack, Double_t zVtx); + static Double_t TotalMomentumEnergyLoss(AliESDMuonTrack* muonTrack, Double_t vtx[3]); + + private: + // Functions + AliPWG3TrackExtrapInterface(const AliPWG3TrackExtrapInterface& muonInterface); + AliPWG3TrackExtrapInterface& operator=(const AliPWG3TrackExtrapInterface& muonInterface); + + + ClassDef(AliPWG3TrackExtrapInterface, 0) // Tools for track extrapolation in ALICE dimuon spectrometer +}; + +#endif diff --git a/PWG3/PWG3baseLinkDef.h b/PWG3/PWG3baseLinkDef.h index 055513e8b8b..442895990de 100644 --- a/PWG3/PWG3baseLinkDef.h +++ b/PWG3/PWG3baseLinkDef.h @@ -5,6 +5,7 @@ #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; +#pragma link C++ class AliPWG3TrackExtrapInterface+; #endif diff --git a/PWG3/libPWG3base.pkg b/PWG3/libPWG3base.pkg index db32d8dfe57..6be9c73c379 100644 --- a/PWG3/libPWG3base.pkg +++ b/PWG3/libPWG3base.pkg @@ -1,11 +1,13 @@ # $Id$ -SRCS:= AliQuarkoniaAcceptance.cxx AliQuarkoniaEfficiency.cxx +SRCS:= AliQuarkoniaAcceptance.cxx \ + AliQuarkoniaEfficiency.cxx \ + AliPWG3TrackExtrapInterface.cxx HDRS:= $(SRCS:.cxx=.h) DHDR:= PWG3baseLinkDef.h -EINCLUDE:= +EINCLUDE:= MUON