]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MUONefficiency.C
Changes needed by the following commit: coding convention for type (_t) and access...
[u/mrichter/AliRoot.git] / MUON / MUONefficiency.C
index a3e02b01e51dae8f8b83f54701d54b513c121737..dd78e036ff884d41c9daf9def914be52f63b16c1 100644 (file)
 
 /* $Id$ */
 
-// Macro (upgraded version of MUONmassPlot_ESD.C, better handling of Jpsi) to make : 
-// 1) Ntuple (Ktuple) containing Upsilon kinematics variables (from kinematics.root files) 
-// 2) Ntuple (ESDtuple) containing Upsilon kinematics variables from reconstruction and 
-// combinations of 2 muons with opposite charges (ESDtupleBck will be used later)
-// 3) Some QA histograms
-// Ntuple are stored in the file MUONefficiency.root and  ESD tree and QA histograms in AliESDs.root
-
-// Christophe Suire, IPN Orsay
-
-
-
-// Arguments:
-//   FirstEvent (default 0)
-//   LastEvent (default 1.e6)
-//   ResType (default 553)
-//      553 for Upsilon, 443 for J/Psi
-//   Chi2Cut (default 100)
-//      to keep only tracks with chi2 per d.o.f. < Chi2Cut
+/// \ingroup macros
+/// \file MUONefficiency.C
+/// \brief add brief description
+///
+/// Macro (upgraded version of MUONmassPlot_ESD.C, better handling of Jpsi) to make : 
+/// - Ntuple (Ktuple) containing Upsilon kinematics variables (from kinematics.root files) 
+/// - Ntuple (ESDtuple) containing Upsilon kinematics variables from reconstruction and 
+///   combinations of 2 muons with opposite charges (ESDtupleBck will be used later)
+/// - Some QA histograms
+/// Ntuple are stored in the file MUONefficiency.root and  ESD tree and QA histograms in AliESDs.root
+///
+/// \author Christophe Suire, IPN Orsay
 
 
 
@@ -41,7 +35,7 @@
 // MUON includes
 #include "AliMUONTrackParam.h"
 #include "AliMUONTrackExtrap.h"
-#include "AliESDMuonTrack.h"
+#include "AliMUONESDInterface.h"
 
 // STEER includes
 #include "AliRun.h"
@@ -54,6 +48,7 @@
 #include "AliESDVertex.h"
 #include "AliTracker.h"
 #include "AliCDBManager.h"
+#include "AliESDMuonTrack.h"
 
 // ROOT includes
 #include "TTree.h"
 
 #endif
 
-// Arguments:
-//   ExtrapToVertex (default -1)
-//     <0: no extrapolation;
-//     =0: extrapolation to (0,0,0);
-//     >0: extrapolation to ESDVertex if available, else to (0,0,0)
-//   ResType (default 553)
-//      553 for Upsilon, anything else for J/Psi
-
 Bool_t MUONefficiency( char* filename = "galice.root", char* geoFilename = "geometry.root", char* esdFileName = "AliESDs.root",
                        Int_t ExtrapToVertex = -1, Int_t ResType = 553, Int_t FirstEvent = 0, Int_t LastEvent = 1000000 )
-{ // MUONefficiency starts
+{ 
+/// \param ExtrapToVertex (default -1) 
+///  - <0: no extrapolation;
+///  - =0: extrapolation to (0,0,0);
+///  - >0: extrapolation to ESDVertex if available, else to (0,0,0)
+/// \param ResType    553 for Upsilon, 443 for J/Psi (default 553)  
+/// \param FirstEvent (default 0)
+/// \param LastEvent  (default 1.e6)
+/// \param Chi2Cut    to keep only tracks with chi2 per d.o.f. < Chi2Cut (default 100)  
+
+
+  // MUONefficiency starts
 
   // Set default CDB storage
   AliCDBManager* man = AliCDBManager::Instance();
@@ -356,13 +354,13 @@ Bool_t MUONefficiency( char* filename = "galice.root", char* geoFilename = "geom
 
       // extrapolate to vertex if required and available
       if (ExtrapToVertex > 0 && Vertex->GetNContributors()) {
-        trackParam.GetParamFromUncorrected(*muonTrack);
+       AliMUONESDInterface::GetParamAtFirstCluster(*muonTrack, trackParam);
        AliMUONTrackExtrap::ExtrapToVertex(&trackParam, fXVertex, fYVertex, fZVertex, errXVtx, errYVtx);
-       trackParam.SetParamFor(*muonTrack); // put the new parameters in this copy of AliESDMuonTrack
+       AliMUONESDInterface::SetParamAtVertex(trackParam, *muonTrack); // put the new parameters in this copy of AliESDMuonTrack
       } else if ((ExtrapToVertex > 0 && !Vertex->GetNContributors()) || ExtrapToVertex == 0){
-        trackParam.GetParamFromUncorrected(*muonTrack);
+       AliMUONESDInterface::GetParamAtFirstCluster(*muonTrack, trackParam);
        AliMUONTrackExtrap::ExtrapToVertex(&trackParam, 0., 0., 0., 0., 0.);
-       trackParam.SetParamFor(*muonTrack); // put the new parameters in this copy of AliESDMuonTrack
+       AliMUONESDInterface::SetParamAtVertex(trackParam, *muonTrack); // put the new parameters in this copy of AliESDMuonTrack
       }
 
       // Trigger
@@ -419,13 +417,13 @@ Bool_t MUONefficiency( char* filename = "galice.root", char* geoFilename = "geom
           
          // extrapolate to vertex if required and available
          if (ExtrapToVertex > 0 && Vertex->GetNContributors()) {
-           trackParam.GetParamFromUncorrected(*muonTrack2);
+           AliMUONESDInterface::GetParamAtFirstCluster(*muonTrack2, trackParam);
            AliMUONTrackExtrap::ExtrapToVertex(&trackParam, fXVertex, fYVertex, fZVertex, errXVtx, errYVtx);
-           trackParam.SetParamFor(*muonTrack2); // put the new parameters in this copy of AliESDMuonTrack
+           AliMUONESDInterface::SetParamAtVertex(trackParam, *muonTrack2); // put the new parameters in this copy of AliESDMuonTrack
          } else if ((ExtrapToVertex > 0 && !Vertex->GetNContributors()) || ExtrapToVertex == 0){
-            trackParam.GetParamFromUncorrected(*muonTrack2);
+           AliMUONESDInterface::GetParamAtFirstCluster(*muonTrack2, trackParam);
            AliMUONTrackExtrap::ExtrapToVertex(&trackParam, 0., 0., 0., 0., 0.);
-           trackParam.SetParamFor(*muonTrack2); // put the new parameters in this copy of AliESDMuonTrack
+           AliMUONESDInterface::SetParamAtVertex(trackParam, *muonTrack2); // put the new parameters in this copy of AliESDMuonTrack
          }
 
          track2Trigger = muonTrack2->GetMatchTrigger();