Introducing a new AliNeutralTrackParam class for dealing with the neutral particles...
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Jan 2009 14:06:19 +0000 (14:06 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Jan 2009 14:06:19 +0000 (14:06 +0000)
STEER/AliExternalTrackParam.cxx
STEER/AliExternalTrackParam.h
STEER/AliNeutralTrackParam.cxx [new file with mode: 0644]
STEER/AliNeutralTrackParam.h [new file with mode: 0644]
STEER/AliVertexerTracks.cxx
STEER/CMake_libESD.txt
STEER/ESDLinkDef.h
STEER/libESD.pkg

index 62714db..07450fd 100644 (file)
@@ -681,7 +681,7 @@ Double_t p[3], Double_t bz) const {
   //+++++++++++++++++++++++++++++++++++++++++    
   GetXYZ(x);
     
-  if (OneOverPt() < kAlmost0 || TMath::Abs(bz) < kAlmost0Field ){ //straight-line tracks
+  if (OneOverPt() < kAlmost0 || TMath::Abs(bz) < kAlmost0Field || GetC(bz) < kAlmost0){ //straight-line tracks
      Double_t unit[3]; GetDirection(unit);
      x[0]+=unit[0]*len;   
      x[1]+=unit[1]*len;   
@@ -1143,7 +1143,7 @@ Double_t b, Double_t maxd, Double_t dz[2], Double_t covar[3]) {
   if (d > maxd) return kFALSE; 
 
   //Propagate to the DCA
-  Double_t crv=kB2C*b*GetParameter()[4];
+  Double_t crv=GetC(b);
   if (TMath::Abs(b) < kAlmost0Field) crv=0.;
 
   Double_t tgfv=-(crv*x - snp)/(crv*y + TMath::Sqrt(1.-snp*snp));
@@ -1429,7 +1429,7 @@ AliExternalTrackParam::GetZAt(Double_t x, Double_t b, Double_t &z) const {
   Double_t dx=x-fX;
   if(TMath::Abs(dx)<=kAlmost0) {z=fP[1]; return kTRUE;}
 
-  Double_t f1=fP[2], f2=f1 + dx*fP[4]*b*kB2C;
+  Double_t f1=fP[2], f2=f1 + dx*GetC(b);
 
   if (TMath::Abs(f1) >= kAlmost1) return kFALSE;
   if (TMath::Abs(f2) >= kAlmost1) return kFALSE;
index 86b4902..e6c1558 100644 (file)
@@ -104,7 +104,7 @@ class AliExternalTrackParam: public AliVTrack {
   virtual Double_t M() const;
   Double_t Eta() const;
   virtual Double_t Y() const;
-  Short_t  Charge() const { return (Short_t)GetSign(); }
+  virtual Short_t  Charge() const { return (Short_t)GetSign(); }
   virtual const Double_t *PID() const { return 0x0; }
 
   // additional functions from AliVTrack
@@ -118,7 +118,7 @@ class AliExternalTrackParam: public AliVTrack {
     return (TMath::Abs(fP[4])>kAlmost0) ? 1./fP[4]:TMath::Sign(kVeryBig,fP[4]);
   }
   Double_t Get1P() const;
-  Double_t GetC(Double_t b) const {return fP[4]*b*kB2C;}
+  virtual Double_t GetC(Double_t b) const {return fP[4]*b*kB2C;}
   void GetDZ(Double_t x,Double_t y,Double_t z,Double_t b,Float_t dz[2]) const; 
   Double_t GetD(Double_t xv, Double_t yv, Double_t b) const; 
   Double_t GetLinearD(Double_t xv, Double_t yv) const; 
diff --git a/STEER/AliNeutralTrackParam.cxx b/STEER/AliNeutralTrackParam.cxx
new file mode 100644 (file)
index 0000000..f4607ab
--- /dev/null
@@ -0,0 +1,93 @@
+/**************************************************************************
+ * Copyright(c) 1998-2009, 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.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// Implementation of the "neutral" track parameterisation class.             //
+//                                                                           //
+// At the moment we use a standard AliExternalTrackParam with 0 curvature.   //
+//                                                                           //
+//        Origin: A.Dainese, I.Belikov                                       //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliExternalTrackParam.h"
+#include "AliNeutralTrackParam.h"
+
+ClassImp(AliNeutralTrackParam)
+//_____________________________________________________________________________
+AliNeutralTrackParam::AliNeutralTrackParam() :
+AliExternalTrackParam()
+{
+  //
+  // default constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliNeutralTrackParam::AliNeutralTrackParam(const AliNeutralTrackParam &track):
+AliExternalTrackParam(track)
+{
+  //
+  // copy constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliNeutralTrackParam& AliNeutralTrackParam::operator=(const AliNeutralTrackParam &trkPar)
+{
+  //
+  // assignment operator
+  //
+  
+  if (this!=&trkPar) {
+    AliExternalTrackParam::operator=(trkPar);
+  }
+
+  return *this;
+}
+
+//_____________________________________________________________________________
+AliNeutralTrackParam::AliNeutralTrackParam(Double_t x, Double_t alpha, 
+                                            const Double_t param[5], 
+                                            const Double_t covar[15]) :
+AliExternalTrackParam(x,alpha,param,covar)
+{
+  //
+  // create external track parameters from given arguments
+  //
+}
+
+//_____________________________________________________________________________
+AliNeutralTrackParam::AliNeutralTrackParam(const AliVTrack *vTrack) :
+AliExternalTrackParam(vTrack)
+{
+  //
+  // Constructor from virtual track,
+  // This is not a copy contructor !
+  //
+
+}
+
+//_____________________________________________________________________________
+AliNeutralTrackParam::AliNeutralTrackParam(Double_t xyz[3],Double_t pxpypz[3],
+                                            Double_t cv[21],Short_t sign) :
+AliExternalTrackParam(xyz,pxpypz,cv,sign)
+{
+  //
+  // constructor from the global parameters
+  //
+}
+
diff --git a/STEER/AliNeutralTrackParam.h b/STEER/AliNeutralTrackParam.h
new file mode 100644 (file)
index 0000000..b287a43
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef ALINEUTRALTRACKPARAM_H
+#define ALINEUTRALTRACKPARAM_H
+/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*****************************************************************************
+ *              "Neutral" track parametrisation class                        *
+ * At the moment we use a standard AliExternalTrackParam with 0 curvature.   *
+ *                                                                           *
+ *        Origin: A.Dainese, I.Belikov                                       *
+ *****************************************************************************/
+
+#include "AliExternalTrackParam.h"
+
+class AliNeutralTrackParam: public AliExternalTrackParam {
+ public:
+  AliNeutralTrackParam();
+  AliNeutralTrackParam(const AliNeutralTrackParam &);
+  AliNeutralTrackParam& operator=(const AliNeutralTrackParam & trkPar);
+  AliNeutralTrackParam(Double_t x, Double_t alpha, 
+                       const Double_t param[5], const Double_t covar[15]);
+  AliNeutralTrackParam(const AliVTrack *vTrack);
+  AliNeutralTrackParam(Double_t xyz[3],Double_t pxpypz[3],
+                       Double_t cv[21],Short_t sign);
+  virtual ~AliNeutralTrackParam(){}
+
+  virtual Short_t  Charge() const { return 0; }
+  virtual Double_t GetC(Double_t /*b*/) const { return 0.; }
+
+ private:
+
+  ClassDef(AliNeutralTrackParam, 1) // track with zero charge
+};
+
+#endif
index 3431da7..03cc3ed 100644 (file)
@@ -35,6 +35,7 @@
 #include "AliLog.h"
 #include "AliStrLine.h"
 #include "AliExternalTrackParam.h"
+#include "AliNeutralTrackParam.h"
 #include "AliVEvent.h"
 #include "AliVTrack.h"
 #include "AliESDEvent.h"
@@ -573,7 +574,12 @@ Int_t AliVertexerTracks::PrepareTracks(TObjArray &trkArrayOrig,
 
   // loop on tracks
   for(Int_t i=0; i<nTrksOrig; i++) {
-    track = new AliExternalTrackParam(*(AliExternalTrackParam*)trkArrayOrig.At(i));
+    AliExternalTrackParam *trackOrig=(AliExternalTrackParam*)trkArrayOrig.At(i);
+    if(trackOrig->Charge()!=0) { // normal tracks
+      track = new AliExternalTrackParam(*(AliExternalTrackParam*)trkArrayOrig.At(i));
+    } else { // neutral tracks (from a V0)
+      track = new AliNeutralTrackParam(*(AliNeutralTrackParam*)trkArrayOrig.At(i));
+    }
     // tgl cut
     if(TMath::Abs(track->GetTgl())>fMaxTgl) {
       AliDebug(1,Form(" rejecting track with tgl = %f",track->GetTgl()));
index a8f8c1c..2f3057f 100644 (file)
@@ -8,7 +8,7 @@ set(SRCS
        AliESDpid.cxx AliESDkink.cxx 
        AliESDCaloCluster.cxx AliESDMuonCluster.cxx AliESDMuonPad.cxx 
        AliKFParticleBase.cxx AliKFParticle.cxx AliKFVertex.cxx
-       AliKalmanTrack.cxx AliExternalTrackParam.cxx 
+       AliKalmanTrack.cxx AliExternalTrackParam.cxx AliNeutralTrackParam.cxx 
        AliVertexerTracks.cxx AliStrLine.cxx 
        AliESDV0Params.cxx 
        AliESDTagCreator.cxx 
index 4dd251f..94b5e53 100644 (file)
@@ -43,6 +43,7 @@
 
 #pragma link C++ class  AliKalmanTrack+;
 #pragma link C++ class  AliExternalTrackParam+;
+#pragma link C++ class  AliNeutralTrackParam+;
 #pragma link C++ class  AliVertexerTracks+;
 #pragma link C++ class  AliStrLine+;
 #pragma link C++ class  AliTrackPointArray+;
index b7005eb..9bde724 100644 (file)
@@ -7,7 +7,7 @@ SRCS = AliESDEvent.cxx AliESDInputHandler.cxx AliESDInputHandlerRP.cxx AliESDfri
        AliESDpid.cxx AliESDkink.cxx \
        AliESDCaloCluster.cxx AliESDMuonCluster.cxx AliESDMuonPad.cxx \
        AliKFParticleBase.cxx AliKFParticle.cxx AliKFVertex.cxx\
-       AliKalmanTrack.cxx AliExternalTrackParam.cxx \
+       AliKalmanTrack.cxx AliExternalTrackParam.cxx AliNeutralTrackParam.cxx \
        AliVertexerTracks.cxx AliStrLine.cxx \
        AliESDV0Params.cxx \
        AliTrackPointArray.cxx \