Found 0 points

Hello!

I have a problem with my root program. I use PYTHIA6 to obtain some kinematic variables - like transverse momentum - …all are 128 for each event (and the total number of events are 100000). These values are stored into an external file.
In my root program I call this external file, and I want to create some histograms and an ntuple.
But when I execute the program in terminal…
root [0]
Processing jet1.C…
found 0 points…
and the histograms are not filled.
I don’t know way the points are not found - in the external file are the kinematic variables values.

thanks,
otilia

Not much that we can do with your information.
To get help please post your data file and script.

Rene

hello!
The root program…jet1.C (18.6 KB)
thanks,
otilia

I can’t attach the external file, because the extension .dat is not allowed…

put your data file in some public space (http, afs,…)

Rene

Guessing from your .C file, it looks like the problem is in:[code] TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName());
dir.ReplaceAll(“jet1.C”,"");
dir.ReplaceAll("/./","/");
ifstream in;

in.open(Form("%sstuff.dat",dir.Data()));

while (1) {
in >> Hinvm >> HpT >> Hp >> Hpx >> Hpy >> Hpz >> He >> Hy >> Hetha >> Htheta >> Hphi >> Z1invm >> Z1pT >> Z1p >> Z1px >> Z1py >> Z1pz >> Z1e >> Z1y >> Z1etha >> Z1theta >> Z1phi >> Z2invm >> Z2pT >> Z2p >> Z2px >> Z2py >> Z2pz >> Z2e >> Z2y >> Z2etha >> Z2theta >> Z2phi >> Z1Z2pT >> Z1Z2p >> Z1Z2px >> Z1Z2py >> Z1Z2pz >> Z1Z2e >> Z1Z2y >> Z1Z2etha >> Z1Z2theta >> Z1Z2phi >> deltaR >> f1invm >> f1pT >> f1p >> f1px >> f1py >> f1pz >> f1e >> f1y >> f1etha >> f1theta >> f1phi >> f2invm >> f2pT >> f2p >> f2px >> f2py >> f2pz >> f2e >> f2y >> f2etha >> f2theta >> f2phi >> f1f2pT >> f1f2p >> f1f2px >> f1f2py >> f1f2pz >> f1f2e >> f1f2y >> f1f2etha >> f1f2theta >> f1f2phi >> fdeltaR >> s1invm >> s1pT >> s1p >> s1px >> s1py >> s1pz >> s1e >> s1y >> s1etha >> s1theta >> s1phi >> s2invm >> s2pT >> s2p >> s2px >> s2py >> s2pz >> s2e >> s2y >> s2etha >> s2theta >> s2phi >> s1s2pT >> s1s2p >> s1s2px >> s1s2py >> s1s2pz >> s1s2e >> s1s2y >> s1s2etha >> s1s2theta >> s1s2phi >> sdeltaR >> ainvm >> apT >> ap >> apx >> apy >> apz >> ae >> ay >> aetha >> atheta >> aphi;

 if (!in.good()) break;
 }[/code]So you ought to check that  [code]in.open(Form("%sstuff.dat",dir.Data())); [/code]properly find your file and that your contains [b]only[/b] lines with [b]exactly[b] the number of floats described in your line [code]in >> Hinvm >> .....[/code]

Cheers,
Philippe.

Hello!
I can’t find the mistake!
The external file contain numbers like…
(this is the first line, with 123 numbers)
753.894 96.067 749.960 -90.718 31.610 -743.782 759.500 -2.280 -2.744 172.728 160.790 13.558 13.773 256.348 -11.167 8.062 -255.978 256.706 -3.278 nan 177.010 144.244 89.252 82.963 494.809 -79.551 23.547 -487.804 502.794 -2.095 nan 170.434 163.594 96.736 751.157 90.718 31.610 743.782 759.500 6.556 nan 347.444 307.838 0.000 0.330 15.099 163.963 -10.907 10.442 -163.266 163.963 -3.076 nan 174.805 136.316 0.330 2.394 92.742 -0.260 -2.380 -92.711 92.743 -4.340 nan 178.612 96.282 17.493 256.705 11.167 12.822 255.978 256.706 6.152 nan 353.416 232.598 0.000 1.500 18.941 59.344 17.905 -6.178 -56.240 59.363 -1.806 nan 161.469 19.048 1.500 101.889 443.429 -97.456 29.726 -431.564 443.431 -2.150 nan 166.801 163.120 120.830 502.773 115.361 35.904 487.804 502.794 3.611 nan 328.270 182.168 0.000 3.660 138.323 759.478 126.527 48.726 743.782 759.500 11.372 nan 681.686 414.766

Thanks,
otilia

[quote] nan[/quote] is not parse-able directly by iostream … you will need to either get rid of those nan and/or implement your own parsing.

OK…
I will try…
thanks,
otilia

Hello again!
I found the problem…that nan…
thanks Philippe!!