]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding additional detectors )all outer )
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Apr 2011 12:43:27 +0000 (12:43 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Apr 2011 12:43:27 +0000 (12:43 +0000)
Jochen + Rongrong

PWG1/TPC/AliMCTrackingTestTask.cxx
PWG1/TPC/AliMCTrackingTestTask.h

index 7c27c0cdeb586a01446d411dcc5f11b7538a590b..df90c77f4651f5b24d38d3f4dc46ade2aae6ef98 100644 (file)
@@ -28,7 +28,8 @@
 #include <TVectorD.h>
 #include <TSystem.h>
 #include <TFile.h>
-
+#include <TList.h>
+#include <TTree.h>
 // ALIROOT includes
 #include <TTreeStream.h>
 #include <AliAnalysisManager.h>
 #include "AliMCEventHandler.h"
 
 #include <AliESD.h>
+#include "AliTrackComparison.h"
 #include "AliMCTrackingTestTask.h"
 #include "AliGenInfoMaker.h"
 #include "AliHelix.h"
+#include "AliTrackPointArray.h"
+#include "AliESDCaloCluster.h"
 
 //
 #include "AliMCInfo.h"
+#include "AliComparisonObject.h"
 #include "AliESDRecInfo.h"
 #include "AliTPCParamSR.h"
 #include "AliTracker.h"
 #include "AliTPCseed.h"
 
+#include "AliCDBManager.h"
+#include "AliGRPManager.h"
+#include "AliGeomManager.h"
+
 // STL includes
 #include <iostream>
 
@@ -56,15 +65,22 @@ using namespace std;
 
 ClassImp(AliMCTrackingTestTask)
 
+#define USE_STREAMER 0
+#define DEBUG 0
+
 //________________________________________________________________________
 AliMCTrackingTestTask::AliMCTrackingTestTask() : 
   AliAnalysisTask(), 
   fMCinfo(0),     //! MC event handler
   fESD(0),
+  fCurrentRun(-1),
   fDebugStreamer(0),
   fStreamLevel(0),
   fDebugLevel(0),
-  fDebugOutputPath()
+  fDebugOutputPath(),
+  fOutList(NULL),
+  fPitList(NULL),
+  fCompList(NULL)
 {
   //
   // Default constructor (should not be used)
@@ -75,11 +91,14 @@ AliMCTrackingTestTask::AliMCTrackingTestTask(const AliMCTrackingTestTask& /*info
   AliAnalysisTask(), 
   fMCinfo(0),     //! MC event handler
   fESD(0),
-  //
+  fCurrentRun(-1),
   fDebugStreamer(0),
   fStreamLevel(0),
   fDebugLevel(),
-  fDebugOutputPath()
+  fDebugOutputPath(),
+  fOutList(NULL),
+  fPitList(NULL),
+  fCompList(NULL)
 {
   //
   // Default constructor 
@@ -93,18 +112,24 @@ AliMCTrackingTestTask::AliMCTrackingTestTask(const char *name) :
   AliAnalysisTask(name, "AliMCTrackingTestTask"), 
   fMCinfo(0),     //! MC event handler
   fESD(0),
+  fCurrentRun(-1),
   fDebugStreamer(0),
   fStreamLevel(0),
   fDebugLevel(0),
-  fDebugOutputPath()
+  fDebugOutputPath(),
+  fOutList(NULL),
+  fPitList(NULL),
+  fCompList(NULL)
 {
   //
   // Normal constructor
   //
   // Input slot #0 works with a TChain
   DefineInput(0, TChain::Class());
-  // Output slot #0 writes into a TList
-  DefineOutput(0, TObjArray::Class());
+  DefineOutput(0, TList::Class());
+
+  // create the list for comparison objects
+  fCompList = new TList;
   //
   //
 }
@@ -116,9 +141,25 @@ AliMCTrackingTestTask::~AliMCTrackingTestTask(){
   if (fDebugLevel>0)  printf("AliMCTrackingTestTask::~AliMCTrackingTestTask\n");
   if (fDebugStreamer) delete fDebugStreamer;
   fDebugStreamer=0;
+  if (fOutList)    delete fOutList;   fOutList   = 0;
+  if (fCompList)   delete fCompList;  fCompList = 0; 
 }
 
 
+//_____________________________________________________________________________
+Bool_t AliMCTrackingTestTask::AddComparisonObject(AliTrackComparison *cObj) 
+{
+  // add comparison object to the list
+  if(cObj == 0) {
+    Printf("ERROR: Could not add comparison object");
+    return kFALSE;
+  }
+
+  // add object to the list
+  fCompList->AddLast(cObj);
+       
+  return kTRUE;
+}
 //________________________________________________________________________
 void AliMCTrackingTestTask::ConnectInputData(Option_t *) 
 {
@@ -146,15 +187,8 @@ void AliMCTrackingTestTask::ConnectInputData(Option_t *)
   mcinfo->SetReadTR(kTRUE);
   
   fMCinfo = mcinfo->MCEvent();
-
-
 }
 
-
-
-
-
-
 //________________________________________________________________________
 void AliMCTrackingTestTask::CreateOutputObjects() 
 {
@@ -164,6 +198,25 @@ void AliMCTrackingTestTask::CreateOutputObjects()
   if(fDebugLevel>3)
     cout << "AnalysisTaskTPCCluster::CreateOutputObjects()" << endl;
   
+  if (!fOutList)
+    fOutList = new TList;
+  fOutList->SetOwner(kTRUE);
+  fPitList = fOutList->MakeIterator();
+  
+  // create output list
+  
+  // add comparison objects to the output
+  AliTrackComparison *cObj=0;
+  Int_t count=0;
+  TIterator *pitCompList = fCompList->MakeIterator();
+  pitCompList->Reset();
+  while(( cObj = (AliTrackComparison*)pitCompList->Next()) != NULL) {
+    fOutList->Add(cObj);
+    count++;
+  }
+  Printf("UserCreateOutputObjects(): Number of output comparison objects: %d \n", count);
+  
+  PostData(0, fOutList);  
 }
 
 
@@ -173,23 +226,26 @@ void AliMCTrackingTestTask::Exec(Option_t *) {
   // Execute analysis for current event 
   //
 
+#if DEBUG
+  printf("New event!\n");
+#endif
+
   if(fDebugLevel>3)
     cout << "AliMCTrackingTestTask::Exec()" << endl;
     
 
-  // If MC has been connected   
 
+  // If MC has been connected   
   if (!fMCinfo){
     cout << "Not MC info\n" << endl;
   }else{
     ProcessMCInfo();
-    //mcinfo->Print();
+    // fMCinfo->Print();
     //DumpInfo();
   }
-  //
-}      
-
 
+  PostData(0, fOutList);
+}      
 
 
 //________________________________________________________________________
@@ -203,11 +259,20 @@ void AliMCTrackingTestTask::Terminate(Option_t *) {
   if (fDebugLevel>0) printf("AliMCtrackingTestTask::Terminate\n");
   if (fDebugStreamer) delete fDebugStreamer;
   fDebugStreamer = 0;
+
+//   AliTrackComparison *cObj=0;
+//   TIterator *pitCompList = fCompList->MakeIterator();
+//   pitCompList->Reset();
+//   while(( cObj = (AliTrackComparison*)pitCompList->Next()) != NULL) {
+//     for(Int_t i=0; i<6; i++)
+//       cObj->MakeDistortionMap(438,i);
+//   }
+
   return;
 }
 
 
-
+//________________________________________________________________________
 TTreeSRedirector *AliMCTrackingTestTask::GetDebugStreamer(){
   //
   // Get Debug streamer
@@ -218,16 +283,15 @@ TTreeSRedirector *AliMCTrackingTestTask::GetDebugStreamer(){
   TString dsName;
   dsName=GetName();
   dsName+="Debug.root";
+
+  printf(" get debug streamer \n");
+
   dsName.ReplaceAll(" ","");
   fDebugStreamer = new TTreeSRedirector(dsName.Data());
   return fDebugStreamer;
 }
 
-
-
-
-
-
+//________________________________________________________________________
 AliExternalTrackParam * AliMCTrackingTestTask::MakeTrack(const AliTrackReference* ref, TParticle*part)
 {
   //
@@ -243,31 +307,42 @@ AliExternalTrackParam * AliMCTrackingTestTask::MakeTrack(const AliTrackReference
   return param;
 }
 
+//________________________________________________________________________
 Bool_t  AliMCTrackingTestTask::PropagateToPoint(AliExternalTrackParam *param, Double_t *xyz, Double_t mass, Float_t step){
   // 
   // Propagate track to point xyz using 
-  // AliTracker::PropagateTo functionality
+  // AliTracker::PropagateToBxByBz functionality
   //
   //  param - track parameters
   //  xyz   - position to propagate
   //  mass  - particle mass
   //  step  - step to be used
   Double_t radius=TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
-  AliTracker::PropagateTrackTo(param, radius+step, mass, step, kTRUE,0.99);
-  AliTracker::PropagateTrackTo(param, radius+0.5, mass, step*0.1, kTRUE,0.99);
-  Double_t sxyz[3]={0,0,0};
-  AliESDVertex vertex(xyz,sxyz);
-  Bool_t isOK = param->PropagateToDCA(&vertex,AliTracker::GetBz(),10);
+  Double_t alpha = TMath::ATan2(xyz[1],xyz[0]);
+
+  AliTracker::PropagateTrackToBxByBz(param, radius+step, mass, step, kTRUE,0.99,-1);
+  param->Rotate(alpha);
+  Bool_t isOK = param->PropagateTo(radius,AliTracker::GetBz());
+
   return isOK;
 }
 
-
+//________________________________________________________________________
 void  AliMCTrackingTestTask::ProcessMCInfo(){
   //
   //
   //
    //
-  TParticle * particle= new TParticle;
+#if DEBUG
+  printf("ProcessMCInfo\n");
+#endif
+
+  const AliESDVertex *pVertex = fESD->GetPrimaryVertex();
+  if(!pVertex) AliError("No primary vertex found!\n");
+  Double_t vPos[3];
+  pVertex->GetXYZ(vPos);
+
+  TParticle * particle= new TParticle();
   TClonesArray * trefs = new TClonesArray("AliTrackReference");
   const Double_t kPcut=0.1;
   //
@@ -287,20 +362,28 @@ void  AliMCTrackingTestTask::ProcessMCInfo(){
   //
   //
 
+
   for (Int_t ipart=0;ipart<npart;ipart++){
     Int_t status = fMCinfo->GetParticleAndTR(ipart, particle, trefs);
-    if (status<0) continue;
-    if (!particle) continue;
-    if (!trefs) continue;
+    if (status<0 || !particle || !trefs) continue;
     Int_t nref = trefs->GetEntries();
     if (nref<5) continue;
     FitTrackRefs(particle,trefs);
+
     AliTrackReference * tpcIn=0;
     AliTrackReference * tpcOut=0;
     AliTrackReference * trdIn=0;
     AliTrackReference * trdOut=0;
     AliTrackReference * itsIn=0;
     AliTrackReference * itsOut=0;
+
+    AliTrackReference * tofIn=0;
+    AliTrackReference * tofOut=0;
+    AliTrackReference * hmpidIn=0;
+    AliTrackReference * hmpidOut=0;
+    AliTrackReference * emcalIn=0;
+    AliTrackReference * emcalOut=0;
+
     Double_t rmax=0;
     Double_t rmin=1000;
     for (Int_t iref=0;iref<nref;iref++){
@@ -337,64 +420,272 @@ void  AliMCTrackingTestTask::ProcessMCInfo(){
          if (ref->R()>trdIn->R()) trdOut = ref;
        }       
       }      
+      //TOF
+      if (ref->DetectorId()==AliTrackReference::kTOF){
+       if (!tofIn) {
+         tofIn  = ref;
+       }else{
+         if (ref->R()>tofIn->R()) tofOut = ref;
+       }       
+      }      
+
+      //HMPID
+      if (ref->DetectorId()==AliTrackReference::kHMPID){
+       if (!hmpidIn) {
+         hmpidIn  = ref;
+       }else{
+         if (ref->R()>hmpidIn->R()) hmpidOut = ref;
+       }       
+      }      
+
+
+      //EMCAL
+      if (ref->DetectorId()==AliTrackReference::kEMCAL){
+       if (!emcalIn) {
+         emcalIn  = ref;
+       }else{
+         if (ref->R()>emcalIn->R()) emcalOut = ref;
+       }       
+      }      
+
       if (ref->R()<rmin) rmin=ref->R();
       if (ref->R()>rmax) rmax=ref->R();
+    } // end ref loop
+
+    // -----------------------------------------------
+    // check for gammas
+    
+    // electron
+    if ( TMath::Abs(particle->GetPdgCode()) == 11 ) {
+
+      // findable
+      if (IsFindable(ipart,70)) {
+
+       // is from gamma conversion
+       Int_t motherId = particle->GetFirstMother();
+       if (motherId > 0) {
+         if (motherId < npart) {
+           TParticle* mother = (fMCinfo->Stack())->Particle(motherId);
+           if (mother && TMath::Abs(mother->GetPdgCode()) == 22) {
+             Int_t nDaughters = mother->GetNDaughters();
+             
+             for (Int_t idx=0; idx<nDaughters; ++idx) {
+               Int_t daughterId = mother->GetDaughter(idx);
+               if ( daughterId == ipart || daughterId >= npart )
+                 continue;
+
+               TParticle* daughter = (fMCinfo->Stack())->Particle(daughterId);
+               if (daughter && TMath::Abs(daughter->GetPdgCode()) == 11) {
+                 //Bool_t findable = IsFindable(daughterId,70);
+#if USE_STREAMER
+                 TTreeSRedirector *pcstream = GetDebugStreamer();
+                 if (pcstream){
+                   (*pcstream)<<"MCgamma"<<
+                   "triggerP="<<particle<<      // trigger electron
+                     "motherP="<<mother<<         // mother gamma
+                     "daughterP="<<daughter<<     // daughter electron
+                     "isFindable="<<findable<<     // 2nd is findable
+                     "\n";
+                 }
+#endif         
+               } 
+             }
+           }  
+         }
+       }
+      }
     }
+
+    // -----------------------------------------------
     if (tpcIn && tpcOut) {
       ProcessRefTracker(tpcIn,tpcOut,particle,1);
       ProcessRefTracker(tpcIn,tpcOut,particle,3);
     }
-    if (itsIn && itsOut) ProcessRefTracker(itsIn,itsOut,particle,0);
-    if (trdIn && trdOut) ProcessRefTracker(trdIn,trdOut,particle,2);
+    if (itsIn  && itsOut)  ProcessRefTracker(itsIn, itsOut, particle, 0);
+    if (trdIn  && trdOut)  ProcessRefTracker(trdIn, trdOut, particle, 2);
+
+    if (tpcOut && trdIn)   ProcessRefTracker(tpcOut,trdIn,  particle, 4);
+    if (tpcOut && tofIn)   ProcessRefTracker(tpcOut,tofIn,  particle, 5);
+    if (tpcOut && hmpidIn) ProcessRefTracker(tpcOut,hmpidIn,particle, 6);
+    if (tpcOut && emcalIn) ProcessRefTracker(tpcOut,emcalIn,particle, 7);
+
+    if (tpcOut && trdOut)  ProcessRefTracker(tpcOut,trdOut, particle, 8);
+    if (trdIn  && tofIn)   ProcessRefTracker(trdIn, tofIn,  particle, 9);
+    if (tofIn  && tofOut)  ProcessRefTracker(tofIn, tofOut, particle,10);
+
+
+    // -----------------------------------------------
+    //Test for new base tracking class
+          
+    AliTrackComparison *cObj=0;
+    AliTrackPoint *point=new AliTrackPoint();
+    AliESDCaloCluster *cluster=0;
+    AliExternalTrackParam *tpcOuter=0;
+
+    Double_t eMax=0;
+    Int_t clsIndex=-1;
+
+    for(Int_t iCluster=0; iCluster<fESD->GetNumberOfCaloClusters(); iCluster++)
+      {
+       cluster = fESD->GetCaloCluster(iCluster);
+       if(!cluster->IsEMCAL()) continue;
+       if(cluster->GetLabel()==ipart && cluster->E()>eMax)
+         {               
+           clsIndex=iCluster;
+           eMax=cluster->E();
+         }
+      }
+    
+    if(clsIndex>-1)
+      {
+       if(cluster) cluster=0;
+       cluster = fESD->GetCaloCluster(clsIndex);
+       Float_t clusterPos[3];
+       cluster->GetPosition(clusterPos);
+       point->SetXYZ(clusterPos[0],clusterPos[1],clusterPos[2],0);
+      }
+
+    if(tpcOut)
+      tpcOuter = MakeTrack(tpcOut,particle);
+      
+
+    Double_t mass = particle->GetMass();
+    Int_t charge = TMath::Nint(particle->GetPDG()->Charge()/3.);
+    fPitList->Reset();
+    while(( cObj = (AliTrackComparison *)fPitList->Next()) != NULL) {
+      TString objName(cObj->GetName());
+      if(!objName.CompareTo("TPCOutToEMCalInElecCls"))
+        { 
+          if(TMath::Abs(particle->GetPdgCode())==11 && tpcOuter && point && cluster && emcalIn)
+           {
+             printf("\n\nTPCOutToEMCalInElecCls: ");
+             cout<<cObj->AddTracks(tpcOuter,point,mass,cluster->E(),vPos)<<endl;
+           }
+        }
+          
+      if(!objName.CompareTo("TPCOutToEMCalInElec"))
+        {
+          if(TMath::Abs(particle->GetPdgCode())==11 && tpcOut && emcalIn)
+           {
+              printf("TPCOutToEMCalInElec: ");
+              cout<<cObj->AddTracks(tpcOut,emcalIn,mass,charge)<<endl;
+           }
+        }
+
+      if(!objName.CompareTo("TPCOutToEMCalInPion"))
+        {
+          if(TMath::Abs(particle->GetPdgCode())==211 && tpcOut && emcalIn)
+            cObj->AddTracks(tpcOut,emcalIn,mass,charge);
+        }
+
+      if(!objName.CompareTo("TPCOutToTOFIn"))
+        {
+          if(tpcOut && tofIn)
+            cObj->AddTracks(tpcOut,tofIn,mass,charge);
+        }
+
+      if(!objName.CompareTo("TPCOutToHMPIDIn"))
+        {
+          if(tpcOut && hmpidIn)
+            cObj->AddTracks(tpcOut,hmpidIn,mass,charge);
+        }
+    }   
+    //End of the test for new base tracking class
+    // -----------------------------------------------
+    delete point;
+
   }
-}
 
+  trefs->Clear("C");
+  //delete particle;
+  //delete tpcIn;
 
+}
 
 void AliMCTrackingTestTask::ProcessRefTracker(AliTrackReference* refIn,  AliTrackReference* refOut, TParticle*part,Int_t type){
   //
   // Test propagation from In to out
   //
+
+#if DEBUG
+  printf("ProcessRefTracker\n");
+#endif
+
   AliExternalTrackParam *param = 0;
   AliExternalTrackParam *paramMC = 0;
-  Double_t xyzIn[3]={refIn->X(),refIn->Y(), refIn->Z()};
+  AliExternalTrackParam *paramDebug = 0;
+
+  //  Double_t xyzIn[3]={refIn->X(),refIn->Y(), refIn->Z()};
+  Double_t xyzOut[3]={refOut->X(),refOut->Y(), refOut->Z()};
   Double_t mass = part->GetMass();
   Double_t step=1;
   //
-  param=MakeTrack(refOut,part);
+  param=MakeTrack(refIn,part);
   paramMC=MakeTrack(refOut,part);
+  paramDebug=MakeTrack(refIn,part);
+
   if (!param) return;
-  if (type<3) PropagateToPoint(param,xyzIn, mass, step);
-  if (type==3) {
+  if (type!=3) PropagateToPoint(param,xyzOut, mass, step);
+  //
+#if 0
+  /*
+    if (type==3) {
     AliTPCseed seed;
     seed.Set(param->GetX(),param->GetAlpha(),param->GetParameter(),param->GetCovariance());
     Float_t alpha= TMath::ATan2(refIn->Y(),refIn->X());
-    if(seed.Rotate(alpha-seed.GetAlpha())==kFALSE) return;
+    seed.Rotate(alpha-seed.GetAlpha());
     seed.SetMass(mass);
-    for (Float_t xlayer= seed.GetX(); xlayer>refIn->R(); xlayer-=step){
+    for (Float_t xlayer= seed.GetX(); xlayer<refOut->R(); xlayer+=step){
       seed.PropagateTo(xlayer);
     }
-    seed.PropagateTo(refIn->R());
+    seed.PropagateTo(refOut->R());
     param->Set(seed.GetX(),seed.GetAlpha(),seed.GetParameter(),seed.GetCovariance());
   }
+*/
+#endif
+#if USE_STREAMER
   TTreeSRedirector *pcstream = GetDebugStreamer();
   TVectorD gpos(3);
   TVectorD gmom(3);
+  Bool_t isOK=kTRUE;
+  isOK&=param->Rotate(paramMC->GetAlpha());
+  isOK&=param->PropagateTo(paramMC->GetX(),AliTracker::GetBz());
   param->GetXYZ(gpos.GetMatrixArray());
   param->GetPxPyPz(gmom.GetMatrixArray());
   if (pcstream){
     (*pcstream)<<"MC"<<
-      "type="<<type<<
-      "step="<<step<<
-      "refIn.="<<refIn<<
-      "refOut.="<<refOut<<
-      "p.="<<part<<
-      "par.="<<param<<   
-      "parMC.="<<paramMC<<   
-      "gpos.="<<&gpos<<
-      "gmom.="<<&gmom<<
+      "isOK="<<isOK<<
+      "type="<<type<<              // detector matching type
+      "step="<<step<<              // propagation step length
+      "refIn.="<<refIn<<           // starting track refernce
+      "refOut.="<<refOut<<         // outer track reference
+      "p.="<<part<<                // particle desription (TParticle)
+      "par.="<<param<<             // AliExternalTrackParam create at starting point propagated to outer track ref radius
+      "parMC.="<<paramMC<<         // AliExternalTrackParam created at the outer point  
+      "gpos.="<<&gpos<<            // global position
+      "gmom.="<<&gmom<<            // global momenta
       "\n";
   }
+#endif
+  delete param;
+  delete paramMC;
+  delete paramDebug;
+}
+
+Bool_t AliMCTrackingTestTask::IsFindable(Int_t label, Float_t minTrackLength ) {
+  //
+  // Find findable tracks
+  //
+  
+  AliMCParticle *mcParticle = (AliMCParticle*) fMCinfo->GetTrack(label);
+  if(!mcParticle) return kFALSE;
+  
+  Int_t counter; 
+  Float_t tpcTrackLength = mcParticle->GetTPCTrackLength(AliTracker::GetBz(),0.05,counter,3.0); 
+  //printf("tpcTrackLength %f \n", tpcTrackLength);
+  
+  return (tpcTrackLength>minTrackLength);    
 }
 
 
@@ -403,6 +694,11 @@ void  AliMCTrackingTestTask::FitTrackRefs(TParticle * part, TClonesArray * trefs
   //
   //
   //
+
+#if DEBUG
+  printf("FitTrackRefs\n");
+#endif
+
   const Int_t kMinRefs=6;
   Int_t nrefs = trefs->GetEntries();
   if (nrefs<kMinRefs) return; // we should have enough references
@@ -428,12 +724,12 @@ void  AliMCTrackingTestTask::FitTrackRefs(TParticle * part, TClonesArray * trefs
   covar[14]=1;
 
   AliTrackReference * refIn = (AliTrackReference*)trefs->At(iref0);
-  AliTrackReference * refOut = (AliTrackReference*)trefs->At(iref1);
+  //AliTrackReference * refOut = (AliTrackReference*)trefs->At(iref1);
   AliExternalTrackParam *paramPropagate= MakeTrack(refIn,part);
   AliExternalTrackParam *paramUpdate   = MakeTrack(refIn,part);
   paramUpdate->AddCovariance(covar);
-  Double_t mass = part->GetMass();
-  Double_t charge = part->GetPDG()->Charge()/3.;
+  //Double_t mass = part->GetMass();
+  //Double_t charge = part->GetPDG()->Charge()/3.;
 /*
   Float_t alphaIn= TMath::ATan2(refIn->Y(),refIn->X());
   Float_t radiusIn= refIn->R();
@@ -461,6 +757,7 @@ void  AliMCTrackingTestTask::FitTrackRefs(TParticle * part, TClonesArray * trefs
     Double_t clcov[3] = { 0.005,0,0.005};
     isOKU&= paramUpdate->Update(clpos, clcov);  
   }
+#if USE_STREAMER
   TTreeSRedirector *pcstream = GetDebugStreamer();
   if (pcstream){
     TVectorD gposU(3);
@@ -488,6 +785,9 @@ void  AliMCTrackingTestTask::FitTrackRefs(TParticle * part, TClonesArray * trefs
        "gmomP.="<<&gmomP<<
        "\n";
    }
+#endif
+  delete paramPropagate;
+  delete paramUpdate;
 }
 
 
index 0abe077f70fa4a5507f9ac0b74d450960a38ab27..72588adde27d804c26347c986fdc4298cd0b7f4e 100644 (file)
@@ -23,6 +23,7 @@ class AliESDRecInfo;
 class AliESDEvent;
 class AliMCEvent;
 class AliComparisonObject;
+class AliTrackComparison;
 
 class AliMCTrackingTestTask : public AliAnalysisTask {
  public:
@@ -43,6 +44,8 @@ class AliMCTrackingTestTask : public AliAnalysisTask {
   
   void           FitTrackRefs(TParticle * part, TClonesArray * trefs);
 
+  Bool_t         IsFindable(Int_t label, Float_t minTrackLength);
+  Bool_t         AddComparisonObject(AliTrackComparison* comp);
   //
   // debug streamer part
   //
@@ -60,6 +63,9 @@ class AliMCTrackingTestTask : public AliAnalysisTask {
   AliMCTrackingTestTask& operator=(const AliMCTrackingTestTask& /*info*/) { return *this;}
   AliMCEvent  * fMCinfo;          //! MC event handler
   AliESDEvent * fESD;             //! current esd event
+  
+  Int_t         fCurrentRun;      //  current run number
+
   //
   //
   //
@@ -67,6 +73,11 @@ class AliMCTrackingTestTask : public AliAnalysisTask {
   Int_t  fStreamLevel;                  //  debug stream level 
   Int_t  fDebugLevel;                   //  debug level
   TString      fDebugOutputPath; // debug output path
+
+  TList* fOutList;
+  TIterator *fPitList;        //! iterator over the output objetcs  
+  TList *fCompList; 
+
   ClassDef(AliMCTrackingTestTask, 1); // Analysis task base class for tracks
 };