[ROOT] Always with TTree

From: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
Date: Wed Oct 24 2001 - 12:03:12 MEST


Another problem:
when I make a selection by means of a TEventList in a tree, I 
encountered a strange problem: when operating on a clone if this tree 
and performing a Draw() method, I got NOTHING...

here is the code I used, to see if there are some mistakes:


    Int_t h, t, sel_entries, sel_entries1;
    Text_t sel_head[100], sel_tail[100];
    sprintf (sel_head, "fPhi >= %f && fPhi <= %f", phimin, phimax);
    TEventList el("el", "list from fPoints");
    sel_entries = fPoints->Draw(">>el", sel_head);
    Int_t *entry = el.GetList();
   
    cout << sel_entries << " points in the selected phi interval" << endl;
   
    for (h = 0; h < sel_entries; h++) {
//        if (!((h*100)%10)) cout << "\rProcessing :" << h * 100 / 
sel_entries << "%" << flush;
        fPoints->GetEntry(entry[h]);
        sprintf (sel_tail, "fPhi >= %f && fPhi <= %f && fLayer == %d  && 
fTheta <= %f && fTheta >= %f", phimin, phimax, head->fLayer+1, 
head->fTheta - fTheta, head->fTheta + fTheta);
        tails->Reset();
        sel_entries1 = tails->Draw("fGX:fGY:fGZ", sel_tail, "goff");
        cout << "\r" << sel_entries1 << " points that could be related 
with entry " << entry[h] << flush;
        Double_t *gotX = tails->GetV1();
        Double_t *gotY = tails->GetV2();
        Double_t *gotZ = tails->GetV3();
        for (t = 0; t < sel_entries1; t++) {
//            if (tail->fLayer - head->fLayer != 1) continue;
//            if (tail->DeltaTheta(head) >= fTheta) continue;
            unit = new AliITStreeNeuron(head->fGX, head->fGY, head->fGZ, 
gotX[t], gotY[t], gotZ[t], h, t);
            cout << unit->fCurv << endl;
            if (unit->fCurv > curvmax) continue;
            unit->fActivation = gRandom->Rndm() * (max - min) + min;
            fNeurons->Fill();
        }
    }

Here, the problem is that the sel_entries1 has value 0 (which I didn't 
expect)....

Regards.

Alberto



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:04 MET