From a939f834dadf10adac5c48555bba2ede502d3fe0 Mon Sep 17 00:00:00 2001 From: mariana Date: Sat, 10 Feb 2001 22:27:27 +0000 Subject: [PATCH] Make the macro compatible with the new AliRun --- ITS/ITSDigitsToClusters.C | 21 ++++++++++++++------- ITS/ITSHitsToDigits.C | 18 ++++++++++++++++-- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/ITS/ITSDigitsToClusters.C b/ITS/ITSDigitsToClusters.C index 80f34e1f7f0..e443f04a49c 100644 --- a/ITS/ITSDigitsToClusters.C +++ b/ITS/ITSDigitsToClusters.C @@ -58,6 +58,11 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0) // SPD + + + ITS->MakeTreeC(); + Int_t nparticles=gAlice->GetEvent(0); + AliITSDetType *iDetType=ITS->DetType(0); AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel(); TClonesArray *dig0 = ITS->DigitsAddress(0); @@ -65,8 +70,8 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0) AliITSClusterFinderSPD *rec0=new AliITSClusterFinderSPD(seg0,dig0,recp0); ITS->SetReconstructionModel(0,rec0); // test - //printf("SPD dimensions %f %f \n",seg0->Dx(),seg0->Dz()); - //printf("SPD npixels %d %d \n",seg0->Npz(),seg0->Npx()); + printf("SPD dimensions %f %f \n",seg0->Dx(),seg0->Dz()); + printf("SPD npixels %d %d \n",seg0->Npz(),seg0->Npx()); // SDD @@ -108,8 +113,7 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0) AliITSDetType *iDetType=ITS->DetType(2); AliITSsegmentationSSD *seg2=(AliITSsegmentationSSD*)iDetType->GetSegmentationModel(); TClonesArray *dig2 = ITS->DigitsAddress(2); - TClonesArray *recp2 = ITS->ClustersAddress(2); - AliITSClusterFinderSSD *rec2=new AliITSClusterFinderSSD(seg2,dig2,recp2); + AliITSClusterFinderSSD *rec2=new AliITSClusterFinderSSD(seg2,dig2); ITS->SetReconstructionModel(2,rec2); // test //printf("SSD dimensions %f %f \n",seg2->Dx(),seg2->Dz()); @@ -122,7 +126,9 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0) // for (int nev=evNumber1; nev<= evNumber2; nev++) { - Int_t nparticles = gAlice->GetEvent(nev); + if(nev>0) { + nparticles = gAlice->GetEvent(nev); + } cout << "nev " <GetEntries(); printf("Found %d entries in the tree (must be one per module per event!)\n",nent); //Int_t nmodules=geom->GetLastSSD(); - //Int_t last_entry=nent-(nmodules+1); - Int_t last_entry=1; + //Int_t last_entry=nent-nmodules; + //Int_t last_entry=1; + Int_t last_entry=0; ITS->DigitsToRecPoints(nev,last_entry,"All"); } // event loop diff --git a/ITS/ITSHitsToDigits.C b/ITS/ITSHitsToDigits.C index d9512b455c2..fab607433d9 100644 --- a/ITS/ITSHitsToDigits.C +++ b/ITS/ITSHitsToDigits.C @@ -119,11 +119,25 @@ void ITSHitsToDigits (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal =25, In // Event Loop // - Int_t nbgr_ev=0; + // create the TreeD + + Int_t nparticles=gAlice->GetEvent(0); + printf("Create TreeD \n"); + gAlice->MakeTree("D"); + printf("TreeD %p\n",gAlice->TreeD()); + //make branch + ITS->MakeBranch("D"); + + Int_t nbgr_ev=0; for (Int_t nev=evNumber1; nev<= evNumber2; nev++) { cout << "nev " <GetEvent(nev); + if(nev>0) { + nparticles = gAlice->GetEvent(nev); + gAlice->SetEvent(nev); + gAlice-> MakeTree("D"); + ITS->MakeBranch("D"); + } cout << "nparticles " <