]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix codding conventions
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Oct 2010 08:33:44 +0000 (08:33 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Oct 2010 08:33:44 +0000 (08:33 +0000)
TRD/AliTRDpidESD.cxx
TRD/AliTRDpidUtil.cxx
TRD/AliTRDtrackV1.cxx
TRD/AliTRDtrackV1.h
TRD/AliTRDtrackerDebug.cxx
TRD/AliTRDtrackerDebug.h
TRD/AliTRDtrackerV1.cxx
TRD/AliTRDtrackerV1.h

index 7713a1631920c94d7a7ec546eee9c845536f8b6c..705103a4d6fb34831dec6aaa47038aa3335d54b5 100644 (file)
@@ -159,7 +159,7 @@ Int_t AliTRDpidESD::MakePID(AliESDEvent * const event)
 
             
     // Skip tracks which have no TRD signal at all
-    if (t->GetTRDsignal() == 0.) continue;
+    if (t->GetTRDsignal()<1.e-5) continue;
   
     // Loop over detector layers
     mom          = 0.;
index 015fe6690d91b4c32b42834204bed2c6caa313a1..52dbb1f96021c1495086e679b183587aa84d893f 100644 (file)
@@ -188,9 +188,9 @@ Bool_t AliTRDpidUtil::IsElectron(const AliESDtrack *track, ETRDPIDMethod method)
   Double_t threshold = thresholdHist->GetBinContent(GetMomentumBin(track->P()) + 1);
   
   // Do Decision
-  Double_t pid_probs[5];
-  track->GetTRDpid(pid_probs);
-  if(pid_probs[AliPID::kElectron] >= threshold) return kTRUE;
+  Double_t pidProbs[5];
+  track->GetTRDpid(pidProbs);
+  if(pidProbs[AliPID::kElectron] >= threshold) return kTRUE;
   return kFALSE; 
 }
 
index 8603d4960c5e76e40272d2e5bfaf73e48c0e6e66..2678d56de1eaa908f8118286f52db2d68cd812d0 100644 (file)
@@ -500,33 +500,23 @@ Bool_t AliTRDtrackV1::IsEqual(const TObject *o) const
   
   //if ( fPIDquality != inTrack->GetPIDquality() ) return kFALSE;
   
-  for(Int_t i = 0; i < AliPID::kSPECIES; i++){
-    if ( fPID[i] != inTrack->GetPID(i) ) return kFALSE;
-  }
-  
-  for (Int_t i = 0; i < 3; i++){
-    if ( fBudget[i] != inTrack->GetBudget(i) ) return kFALSE;
-  }
-  if ( fDE != inTrack->GetEdep() ) return kFALSE;
-  if ( fFakeRatio != inTrack->GetFakeRatio() ) return kFALSE;
-  if ( fChi2 != inTrack->GetChi2() ) return kFALSE;
-  if ( fMass != inTrack->GetMass() ) return kFALSE;
-  if ( fLab != inTrack->GetLabel() ) return kFALSE;
-  if ( fN != inTrack->GetNumberOfClusters() ) return kFALSE;
-  if ( AliKalmanTrack::GetIntegratedLength() != inTrack->GetIntegratedLength() ) return kFALSE;
-  
-  if ( GetX() != inTrack->GetX() ) return kFALSE;
-  if ( GetAlpha() != inTrack->GetAlpha() ) return kFALSE;
-  const Double_t *inP = inTrack->GetParameter();
-  const Double_t *curP = GetParameter();
-  for (Int_t i = 0; i < 5; i++){
-    if ( curP[i] != inP[i]) return kFALSE;
-  }
-  const Double_t *inC = inTrack->GetCovariance();
-  const Double_t *curC = GetCovariance();
-  for (Int_t i = 0; i < 15; i++){
-    if ( curC[i] != inC[i]) return kFALSE;
-  }
+  if(memcmp(fPID, inTrack->fPID, AliPID::kSPECIES*sizeof(Double32_t))) return kFALSE;
+  if(memcmp(fBudget, inTrack->fBudget, 3*sizeof(Double32_t))) return kFALSE;
+  if(memcmp(&fDE, &inTrack->fDE, sizeof(Double32_t))) return kFALSE;
+  if(memcmp(&fFakeRatio, &inTrack->fFakeRatio, sizeof(Double32_t))) return kFALSE;
+  if(memcmp(&fChi2, &inTrack->fChi2, sizeof(Double32_t))) return kFALSE;
+  if(memcmp(&fMass, &inTrack->fMass, sizeof(Double32_t))) return kFALSE;
+  if( fLab != inTrack->fLab ) return kFALSE;
+  if( fN != inTrack->fN ) return kFALSE;
+  Double32_t l(0.), in(0.);
+  l = GetIntegratedLength(); in = inTrack->GetIntegratedLength();
+  if(memcmp(&l, &in, sizeof(Double32_t))) return kFALSE;
+  l=GetX(); in=inTrack->GetX();
+  if(memcmp(&l, &in, sizeof(Double32_t))) return kFALSE;
+  l = GetAlpha(); in = inTrack->GetAlpha();
+  if(memcmp(&l, &in, sizeof(Double32_t))) return kFALSE;
+  if(memcmp(GetParameter(), inTrack->GetParameter(), 5*sizeof(Double32_t))) return kFALSE;
+  if(memcmp(GetCovariance(), inTrack->GetCovariance(), 15*sizeof(Double32_t))) return kFALSE;
   
   for (Int_t iTracklet = 0; iTracklet < kNplane; iTracklet++){
     AliTRDseedV1 *curTracklet = fTracklet[iTracklet];
@@ -636,7 +626,7 @@ Bool_t AliTRDtrackV1::PropagateTo(Double_t xk, Double_t xx0, Double_t xrho)
   // "xrho" - thickness*density    [g/cm^2] 
   // 
 
-  if (xk == GetX()) return kTRUE;
+  if (TMath::Abs(xk - GetX())<1.e-2) return kTRUE; // 100mum limit
 
   Double_t xyz0[3] = {GetX(), GetY(), GetZ()}, // track position BEFORE propagation 
            b[3];    // magnetic field 
index 56fef19f3fec3697d2f9454e030cf30dcf22717e..403539ae3a3c75ae5ce75048f94a94e815d66d77 100644 (file)
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-//#ifndef ALIKALMANTRACK_H
+#ifndef ALIKALMANTRACK_H
 #include "AliKalmanTrack.h"
-//#endif
+#endif
 
-//#ifndef ALITRDSEEDV1_H
+#ifndef ALITRDSEEDV1_H
 #include "AliTRDseedV1.h"
-//#endif
+#endif
 
-class AliTRDcluster;
 class AliESDtrack;
+class AliTRDcluster;
 class AliTRDReconstructor;
 class AliTRDtrackV1 : public AliKalmanTrack
 {
-  friend class AliHLTTRDTrack;
+  friend class AliHLTTRDTrack; // allow HLT special access
 public:
   enum ETRDtrackSize { 
     kNdet      = AliTRDgeometry::kNdet
index 5ae3cf343004a93c0ae97ba32731974648d42795..117d67522fa711736472d085881727f7dd8f7bea 100644 (file)
@@ -74,13 +74,6 @@ AliTRDtrackerDebug::~AliTRDtrackerDebug()
 }
 
 
-//____________________________________________________
-void AliTRDtrackerDebug::Draw(Option_t *) 
-{
-// steer draw function
-}
-
-
 //____________________________________________________
 Bool_t AliTRDtrackerDebug::Init()
 {
index 2278e2b4ffb7d0c9bea82318e48fd46233a5b633..2d17db1e1ab985a364189cb845c4bbd2877b81d0 100644 (file)
@@ -31,8 +31,6 @@ public:
        AliTRDtrackerDebug();
        ~AliTRDtrackerDebug();
 
-       void                            Draw(Option_t *);
-
        Bool_t      Init();
        Bool_t      Open(const char *method);
        Int_t       Process();
index ced51b69213c72704a1d137aca1368411c949822..c6539d40feb298e42f91ae9bb502f3967a6239f9 100644 (file)
@@ -1671,7 +1671,8 @@ Double_t AliTRDtrackerV1::FitKalman(AliTRDtrackV1 *track, AliTRDseedV1 * const t
   //if(points) printf("First marker point @ x[%d] = %f\n", ip, points[ip].GetX());
 
 
-  AliTRDseedV1 tracklet, *ptrTracklet = NULL;
+  AliTRDseedV1 tracklet;
+  AliTRDseedV1 *ptrTracklet = NULL;
 
   //Loop through the TRD planes
   for (Int_t jplane = 0; jplane < kNPlanes; jplane++) {
@@ -1771,7 +1772,7 @@ Double_t AliTRDtrackerV1::FitKalman(AliTRDtrackV1 *track, AliTRDseedV1 * const t
 }
 
 //_________________________________________________________________________
-Float_t AliTRDtrackerV1::CalculateChi2Z(AliTRDseedV1 *tracklets, Double_t offset, Double_t slope, Double_t xref)
+Float_t AliTRDtrackerV1::CalculateChi2Z(const AliTRDseedV1 *tracklets, Double_t offset, Double_t slope, Double_t xref)
 {
   //
   // Calculates the chi2-value of the track in z-Direction including tilting pad correction.
@@ -3787,6 +3788,7 @@ Double_t AliTRDtrackerV1::FitTiltedRiemanV1(AliTRDseedV1 *const tracklets){
 //____________________________________________________________________
 void AliTRDtrackerV1::UnsetTrackletsTrack(const AliTRDtrackV1 * const track)
 {
+//  Remove tracklets from tracker list attached to "track"
   Int_t idx(-1);
   for(Int_t il(0); il<kNPlanes; il++){
     if((idx = track->GetTrackletIndex(il)) < 0) continue;
@@ -3873,7 +3875,7 @@ Bool_t AliTRDtrackerV1::AliTRDLeastSquare::Eval(){
   //
   
   Double_t det = fSums[0] * fSums[4] - fSums[1] *fSums[1];
-  if(det==0) return kFALSE;
+  if(TMath::Abs(det)<1.e-30) return kFALSE;
 
   //   for(Int_t isum = 0; isum < 5; isum++)
   //           printf("fSums[%d] = %f\n", isum, fSums[isum]);
index 6a32e742f0c7a753b091845c63f987cd89a2049f..d6c084da42dee26b332d8404e66970987e76aa4c 100644 (file)
@@ -176,7 +176,7 @@ protected:
   static Bool_t  AdjustSector(AliTRDtrackV1 *const track); 
   Double_t       BuildSeedingConfigs(AliTRDtrackingChamber **stack, Int_t *configs);
   Int_t          BuildTrackingContainers();
-  static Float_t CalculateChi2Z(AliTRDseedV1 *tracklets, Double_t offset, Double_t slope, Double_t xref);
+  static Float_t CalculateChi2Z(const AliTRDseedV1 *tracklets, Double_t offset, Double_t slope, Double_t xref);
   Int_t          Clusters2TracksSM(Int_t sector, AliESDEvent *esd);
   Int_t          Clusters2TracksStack(AliTRDtrackingChamber **stack, TClonesArray * const esdTrackList);
   AliTRDseedV1*  GetTracklet(AliTRDtrackV1 *const trk, Int_t plane, Int_t &idx);