Problem with getV1()

I am wondering why my two vectors m1 and m2 are different in the following two cases

  1. t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);
    double* m2=t1->GetV1();
    double* m1=t1->GetV2();

  2. t1->Draw(“mass[0]:mass[1]:factor”,wave_cuts,“goff”);
    double* m2=t1->GetV1();
    double* m1=t1->GetV2();
    -----some code
    t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);
    double* m2=t1->GetV1();
    double* m1=t1->GetV2();

I was wondering shouldn’t in case (2) the second draw overwrite the first draw and will reproduce case (1). Please help me understand.

regards,
Vaibhav

actually its this line which is causing problem
t1->SetEstimate(t1->GetEntries(wave_cuts))

To reiterate

  1. t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);
    and
  2. t1->Draw(“mass[0]:mass[1]:factor”,wave_cuts,“goff”);
    t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);

produce the same result for (1) and (2)

but
t1->SetEstimate(t1->GetEntries(wave_cuts))

  1. t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);
    and
  2. t1->Draw(“mass[0]:mass[1]:factor”,wave_cuts,“goff”);
    t1->Draw(“mass[0]:mass[1]:factor”,oSNR_cut,“goff”);

(1) and (2) do not produce the same results

Hi,

See void TTree::SetEstimate(Long64_t n /* = 1000000 */) { // Set number of entries to estimate variable limits. // If n is -1, the estimate is set to be the current maximum // for the tree (i.e. GetEntries() + 1) // If n is less than -1, the behavior is undefined. Setting to only GetEntries() pose some boundary issues.

Philippe.