New version compatible with the current HEAD
[u/mrichter/AliRoot.git] / ITS / ITSDigitsToClustersBari.C
index be90132885c8ef361ff6c6e30c0f35886c18256a..971358650f8aaed183e2bb1360bba56a164a4778 100644 (file)
@@ -50,13 +50,18 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
    // simulation but in cluster finder as well, please set them via your
    // local Config.C - the streamer will take care of writing the correct
    // info and you'll no longer be obliged to set them again for your cluster
-   // finder as it's done in this macro 
+   // finder as it's done in this macro (ugly and impractical, no? )
+
 
 
    // Set the models for cluster finding
 
    // SPD
 
+   ITS->MakeTreeC();
+   Int_t nparticles=gAlice->GetEvent(0);
+
+
    AliITSDetType *iDetType=ITS->DetType(0);
    AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel();
    TClonesArray *dig0  = ITS->DigitsAddress(0);
@@ -93,12 +98,10 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
    ITS->SetReconstructionModel(1,rec1);
    rec1->Print();
 
-
    // SSD
 
    AliITSDetType *iDetType=ITS->DetType(2);
    AliITSsegmentationSSD *seg2=(AliITSsegmentationSSD*)iDetType->GetSegmentationModel();
-   seg2->SetDetSize(72960.,40000.,303.);
    TClonesArray *dig2  = ITS->DigitsAddress(2);
    AliITSClusterFinderSSD *rec2=new AliITSClusterFinderSSD(seg2,dig2);
    ITS->SetReconstructionModel(2,rec2);
@@ -107,6 +110,7 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
    //printf("SSD nstrips %d %d \n",seg2->Npz(),seg2->Npx());
 
 
+
 //
 // Event Loop
 //
@@ -121,10 +125,10 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
 
    for (int nev=evNumber1; nev<= evNumber2; nev++) {
        if(nev>0) {
-        nparticles = gAlice->GetEvent(nev);
-        gAlice->SetEvent(nev);
-        if(!gAlice->TreeR()) gAlice-> MakeTree("R");
-        ITS->MakeBranch("R");
+            nparticles = gAlice->GetEvent(nev);
+            gAlice->SetEvent(nev);
+            if(!gAlice->TreeR()) gAlice-> MakeTree("R");
+            ITS->MakeBranch("R");
        }     
        cout << "nev         " <<nev<<endl;
        cout << "nparticles  " <<nparticles<<endl;
@@ -134,6 +138,7 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
        Int_t last_entry=0;
        timer.Start();
        ITS->DigitsToRecPoints(nev,last_entry,"All");
+       //ITS->DigitsToRecPoints(nev,last_entry,"SPD");
        timer.Stop(); timer.Print(); 
    } // event loop 
 
@@ -143,17 +148,3 @@ void ITSDigitsToClustersBari (Int_t evNumber1=0,Int_t evNumber2=0)
 
    file->Close();
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-