]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrack.cxx
Modifications needed by the HBT analysis (P.Skowronski)
[u/mrichter/AliRoot.git] / MUON / AliMUONTrack.cxx
index b2837aa14e1b925c8727c80e5c8dc35e20f0ede7..2a3e830045eaddd961c8c23a73b457f9e2d52698 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.13  2001/05/03 08:11:31  hristov
-stdlib.h included to define exit()
-
-Revision 1.12  2001/04/25 14:50:42  gosset
-Corrections to violations of coding conventions
-
-Revision 1.11  2001/04/23 12:33:17  hristov
-Arrays with variable size created by new and deleted at the end
-
-Revision 1.10  2001/04/09 12:25:09  gosset
-Inversion of covariance matrices with local copy of TMinuit::mnvert,
-for symmetric positive definite matrices, instead of TMatrixD::Invert
-
-Revision 1.9  2001/01/17 20:59:24  hristov
-chPrev initialised
-
-Revision 1.8  2001/01/08 11:01:02  gosset
-Modifications used for addendum to Dimuon TDR (JP Cussonneau):
-*. MaxBendingMomentum to make both a segment and a track (default 500)
-*. MaxChi2 per degree of freedom to make a track (default 100)
-*. MinBendingMomentum used also to make a track
-   and not only a segment (default 3)
-*. wider roads for track search in stations 1 to 3
-*. extrapolation to actual Z instead of Z(chamber) in FollowTracks
-*. in track fit:
-   - limits on parameters X and Y (+/-500)
-   - covariance matrices in double precision
-   - normalization of covariance matrices before inversion
-   - suppression of Minuit printouts
-*. correction against memory leak (delete extrapHit) in FollowTracks
-*. RMax to 10 degrees with Z(chamber) instead of fixed values;
-   RMin and Rmax cuts suppressed in NewHitForRecFromGEANT,
-   because useless with realistic geometry
-
-Revision 1.7  2000/09/19 15:50:46  gosset
-TrackChi2MCS function: covariance matrix better calculated,
-taking into account missing planes...
-
-Revision 1.6  2000/07/20 12:45:27  gosset
-New "EventReconstructor..." structure,
-       hopefully more adapted to tree/streamer.
-"AliMUONEventReconstructor::RemoveDoubleTracks"
-       to keep only one track among similar ones.
-
-Revision 1.5  2000/07/18 16:04:06  gosset
-AliMUONEventReconstructor package:
-* a few minor modifications and more comments
-* a few corrections
-  * right sign for Z of raw clusters
-  * right loop over chambers inside station
-  * symmetrized covariance matrix for measurements (TrackChi2MCS)
-  * right sign of charge in extrapolation (ExtrapToZ)
-  * right zEndAbsorber for Branson correction below 3 degrees
-* use of TVirtualFitter instead of TMinuit for AliMUONTrack::Fit
-* no parameter for AliMUONTrack::Fit() but more fit parameters in Track object
-
-Revision 1.4  2000/06/30 10:15:48  gosset
-Changes to EventReconstructor...:
-precision fit with multiple Coulomb scattering;
-extrapolation to vertex with Branson correction in absorber (JPC)
-
-Revision 1.3  2000/06/25 13:23:28  hristov
-stdlib.h needed for non-Linux compilation
-
-Revision 1.2  2000/06/15 07:58:48  morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.3  2000/06/12 10:11:34  morsch
-Dummy copy constructor and assignment operator added
-
-Revision 1.1.2.2  2000/06/09 12:58:05  gosset
-Removed comment beginnings in Log sections of .cxx files
-Suppressed most violations of coding rules
-
-Revision 1.1.2.1  2000/06/07 14:44:53  gosset
-Addition of files for track reconstruction in C++
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////
 //
@@ -103,7 +25,7 @@ Addition of files for track reconstruction in C++
 //
 ///////////////////////////////////////////////////
 
-#include <iostream.h> // for cout
+#include <Riostream.h> // for cout
 #include <stdlib.h> // for exit()
 
 #include <TClonesArray.h>
@@ -181,16 +103,33 @@ AliMUONTrack::~AliMUONTrack()
 }
 
   //__________________________________________________________________________
-AliMUONTrack::AliMUONTrack (const AliMUONTrack& MUONTrack)
+AliMUONTrack::AliMUONTrack (const AliMUONTrack& MUONTrack):TObject(MUONTrack)
 {
-// Dummy copy constructor
+  fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor);
+  fTrackParamAtVertex = MUONTrack.fTrackParamAtVertex;
+  fTrackHitsPtr =  new TObjArray(*MUONTrack.fTrackHitsPtr);
+  fNTrackHits =  MUONTrack.fNTrackHits;
+  fFitMCS     =  MUONTrack.fFitMCS;
+  fFitNParam  =  MUONTrack.fFitNParam;
+  fFitFMin    =  MUONTrack.fFitFMin;
+  fFitStart   =  MUONTrack.fFitStart;
 }
 
   //__________________________________________________________________________
 AliMUONTrack & AliMUONTrack::operator=(const AliMUONTrack& MUONTrack)
 {
-// Dummy assignment operator
+  if (this == &MUONTrack)
     return *this;
+
+  fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor);
+  fTrackParamAtVertex = MUONTrack.fTrackParamAtVertex;
+  fTrackHitsPtr =  new TObjArray(*MUONTrack.fTrackHitsPtr);
+  fNTrackHits =  MUONTrack.fNTrackHits;
+  fFitMCS     =  MUONTrack.fFitMCS;
+  fFitNParam  =  MUONTrack.fFitNParam;
+  fFitFMin    =  MUONTrack.fFitFMin;
+  fFitStart   =  MUONTrack.fFitStart;
+  return *this;
 }
 
   //__________________________________________________________________________
@@ -479,7 +418,7 @@ void AliMUONTrack::SetTrackParamAtVertex()
 }
 
   //__________________________________________________________________________
-void TrackChi2(Int_t &NParam, Double_t *Gradient, Double_t &Chi2, Double_t *Param, Int_t Flag)
+void TrackChi2(Int_t &NParam, Double_t * /*Gradient*/, Double_t &Chi2, Double_t *Param, Int_t /*Flag*/)
 {
   // Return the "Chi2" to be minimized with Minuit for track fitting,
   // with "NParam" parameters
@@ -530,7 +469,7 @@ void TrackChi2(Int_t &NParam, Double_t *Gradient, Double_t &Chi2, Double_t *Para
 }
 
   //__________________________________________________________________________
-void TrackChi2MCS(Int_t &NParam, Double_t *Gradient, Double_t &Chi2, Double_t *Param, Int_t Flag)
+void TrackChi2MCS(Int_t &NParam, Double_t * /*Gradient*/, Double_t &Chi2, Double_t *Param, Int_t /*Flag*/)
 {
   // Return the "Chi2" to be minimized with Minuit for track fitting,
   // with "NParam" parameters