]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Make the macro compatible with the new AliRun
authormariana <mariana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Feb 2001 22:27:27 +0000 (22:27 +0000)
committermariana <mariana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Feb 2001 22:27:27 +0000 (22:27 +0000)
ITS/ITSDigitsToClusters.C
ITS/ITSHitsToDigits.C

index 80f34e1f7f07098d0dc0c66ed6300b14cad87cb3..e443f04a49cf91f5395dbad35c9b6c5829378abe 100644 (file)
@@ -58,6 +58,11 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0)
 
    // SPD
 
 
    // SPD
 
+
+
+   ITS->MakeTreeC();
+   Int_t nparticles=gAlice->GetEvent(0);
+
    AliITSDetType *iDetType=ITS->DetType(0);
    AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel();
    TClonesArray *dig0  = ITS->DigitsAddress(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
    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
 
 
    // 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);
    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());
    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++) {
 //
 
    for (int nev=evNumber1; nev<= evNumber2; nev++) {
-       Int_t nparticles = gAlice->GetEvent(nev);
+       if(nev>0) {
+        nparticles = gAlice->GetEvent(nev);
+       }     
        cout << "nev         " <<nev<<endl;
        cout << "nparticles  " <<nparticles<<endl;
        if (nev < evNumber1) continue;
        cout << "nev         " <<nev<<endl;
        cout << "nparticles  " <<nparticles<<endl;
        if (nev < evNumber1) continue;
@@ -132,8 +138,9 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0)
        Int_t nent=TD->GetEntries();
        printf("Found %d entries in the tree (must be one per module per event!)\n",nent);
        //Int_t nmodules=geom->GetLastSSD();
        Int_t nent=TD->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 
 
        ITS->DigitsToRecPoints(nev,last_entry,"All");
    } // event loop 
 
index d9512b455c2cc3959036ec43abe338ba9ad5681b..fab607433d954a0b80d3440427180f90e21851d8 100644 (file)
@@ -119,11 +119,25 @@ void ITSHitsToDigits (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal  =25, In
 // Event Loop
 //
 
 // 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         " <<nev<<endl;
    for (Int_t nev=evNumber1; nev<= evNumber2; nev++) {
        cout << "nev         " <<nev<<endl;
-       Int_t nparticles = gAlice->GetEvent(nev);
+       if(nev>0) {
+        nparticles = gAlice->GetEvent(nev);
+        gAlice->SetEvent(nev);
+        gAlice-> MakeTree("D");
+        ITS->MakeBranch("D");
+       }
        cout << "nparticles  " <<nparticles<<endl;
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;
        cout << "nparticles  " <<nparticles<<endl;
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;