X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliKFParticleTest.C;h=3cee6b9cbe2eaab22a987b64be9cb84a72fdddb8;hb=036662e50b5fbe0f8d32dca2855294214fd268ed;hp=f64062b7acb604d17d91fd2b76d2159a48685dae;hpb=6c23ffeda23cbfdabd4e870e0591de923b08a9a0;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliKFParticleTest.C b/STEER/AliKFParticleTest.C index f64062b7acb..3cee6b9cbe2 100644 --- a/STEER/AliKFParticleTest.C +++ b/STEER/AliKFParticleTest.C @@ -139,7 +139,7 @@ void RunV0( AliESDEvent *event ) cout<<"Event "<GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliStack *stack = rl->Stack(); if( !stack ) return; @@ -255,7 +255,7 @@ void RunV0( AliESDEvent *event ) //* Check chi^2 for a case - if( TMath::Sqrt( TMath::Abs(V0.GetChi2()/V0.GetNDF()) >3. )) continue; + if( TMath::Sqrt( TMath::Abs(V0.GetChi2()/V0.GetNDF())) >3. ) continue; //* Get V0 decay length with estimated error @@ -306,8 +306,12 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v cout <<" Opening "<GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } @@ -328,8 +332,6 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v continue; } rl->LoadKinematics(); - AliTracker::SetFieldMap(gAlice->Field(),1); - AliKFParticle::SetField( AliTracker::GetBz() ); //---------------------------------------// // // @@ -344,7 +346,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v if (!ef || !ef->IsOpen()) {cerr<<"Error open AliESDs.root !\n"; continue ;} //create event object - AliESD *event = new AliESDEvent; + AliESDEvent *event = new AliESDEvent; //Set pointer to the esd tree in the file TTree* tree = (TTree*) ef->Get("esdTree"); @@ -353,7 +355,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v if (!tree) {cerr<<"no ESD tree found\n"; continue;}; //Set pointer to the esd object in the tree - event->ReadFromTree(event); + event->ReadFromTree(tree); //Number of events Int_t nevents=tree->GetEntriesFast(); @@ -363,6 +365,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v for (Int_t iev=0; ievGetEvent(iev); rl->GetEvent(iev); + AliKFParticle::SetField(event->GetMagneticField()); RunV0(event); } EndV0();