]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/ITSDigitsToClusters.C
corrected command guidance
[u/mrichter/AliRoot.git] / ITS / ITSDigitsToClusters.C
index 68b73c70b60c2a141f0dd35618f53873e488c62a..c0065d652d1c1b4fdcbc2535a292ad527c4d069c 100644 (file)
@@ -50,7 +50,7 @@ void ITSDigitsToClusters (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 (ugly and impractical, no? )
+   // finder as it's done in this macro (ugly)
 
 
 
@@ -58,11 +58,10 @@ 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);
@@ -70,17 +69,12 @@ 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
 
-   Float_t baseline = 10.;
-   Float_t noise = 1.67;
-   Float_t thres = baseline+3*noise;
-   printf("thresh %d\n",thres);
-
    AliITSDetType *iDetType=ITS->DetType(1);
    AliITSgeom *geom = ITS->GetITSgeom();
 
@@ -88,25 +82,16 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0)
    if (!seg1) seg1 = new AliITSsegmentationSDD(geom);
    AliITSresponseSDD *res1 = (AliITSresponseSDD*)iDetType->GetResponseModel();
    if (!res1) res1=new AliITSresponseSDD();
-   res1->SetMagicValue(900.);
-   Float_t magic = res1->MagicValue();
-   Float_t top = res1->MaxAdc();
-   thres *= top/magic;
-   res1->SetNoiseParam(noise,baseline);
-   Float_t n,b;
-   res1->GetNoiseParam(n,b);
-    printf("SDD: noise baseline %f %f zs option %s data type %s\n",n,b,res1->ZeroSuppOption(),res1->DataType());
-   printf("SDD: DriftSpeed %f TopValue %f\n",res1->DriftSpeed(),res1->MagicValue());
-   Float_t dif0,dif1;
-   res1->DiffCoeff(dif0,dif1);
-   printf("SDD: dif0 %f dif1 %f\n",dif0,dif1);
+//   res1->Print();
+
+   //Float_t nsig_noise = 4.;
+
    TClonesArray *dig1  = ITS->DigitsAddress(1);
    TClonesArray *recp1  = ITS->ClustersAddress(1);
    AliITSClusterFinderSDD *rec1=new AliITSClusterFinderSDD(seg1,res1,dig1,recp1);
-   rec1->SetMinNCells(6);
-   rec1->SetTimeCorr(70.);
-   rec1->SetCutAmplitude((int)thres);
+   //rec1->SetCutAmplitude(nsig_noise);
    ITS->SetReconstructionModel(1,rec1);
+//   rec1->Print();
 
    // SSD
 
@@ -125,30 +110,31 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0)
 // Event Loop
 //
 
+   cout << "Looking for clusters...\n";
+   
+   TStopwatch timer;
+
    if(!gAlice->TreeR()) gAlice->MakeTree("R");
    //make branch
    ITS->MakeBranch("R");
 
    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;
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;
 
-       TTree *TD = gAlice->TreeD();
-       Int_t nent=TD->GetEntries();
-       printf("Found %d entries in the treeD (must be one per module per event!)\n",nent);
-       //Int_t nmodules=geom->GetLastSSD();
-       //Int_t last_entry=nent-nmodules;
-       //Int_t last_entry=1;
        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 
 
    delete rec0;
@@ -157,17 +143,3 @@ void ITSDigitsToClusters (Int_t evNumber1=0,Int_t evNumber2=0)
 
    file->Close();
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-