6/29/2009
6/26/2009
"^" in C++ means bitsize exclusive OR
The ^ (bitwise exclusive OR) operator compares each bit of its first operand
to the corresponding bit of the second operand. If both bits are 1's or both
bits are 0's, the corresponding bit of the result is set to 0. Otherwise, this
operator sets the corresponding result bit to 1.
The following example shows the values of a, b, and the result of a ^ b
represented as 32-bit binary numbers:
bit pattern of a 00000000000000000000000001011100
bit pattern of b 00000000000000000000000000101110
bit pattern of a^b 00000000000000000000000001110010
so it can not be used in power function,
you need to use
pow (7,3)
to get 7^3;
6/12/2009
Get Histogram lay together
A THStack is a collection of TH1 (or derived) objects
Use THStack::Add to add a new histogram to the list.
If you want to draw the histogram on the log scale,
just get a pad in log scale, and draw the thstack on
this pad, everything will be done, as easy as that!!!
hvem1->SetFillColor(kRed);
hvem1->SetMarkerStyle(21);
hvem1->SetMarkerColor(kRed);
hs->Add(hvem1);
hvem2->SetFillColor(kBlue);
hvem2->SetMarkerStyle(21);
hvem2->SetMarkerColor(kBlue);
hs->Add(hvem2);
pad1->cd();
hs->Draw();
c1->Modified();
c1->Update();
6/08/2009
S(1000) decteases with zenith angle
For a given energy the value of S(1000) decrease with zenith angle, due to the attenuation of the shower particles and geometrical effects.
It is regarded as the signal S(1000) the shower would have produced had it arrived at theta =38 degrees.
It is regarded as the signal S(1000) the shower would have produced had it arrived at theta =38 degrees.
6/01/2009
Creat sub directory in a root file
please refer to /tutorial/dirs.C
/***************************************
...
top->cd(); //change directory back to top
TDirectory *sub = top->mkdir("Result"); //create the sub directory named Result
sub->cd(); // make the "sub" directory the current directory
hpk->Write(); //write hpk to this sub directory
...
/*****************************************
/***************************************
...
top->cd(); //change directory back to top
TDirectory *sub = top->mkdir("Result"); //create the sub directory named Result
sub->cd(); // make the "sub" directory the current directory
hpk->Write(); //write hpk to this sub directory
...
/*****************************************
订阅:
评论 (Atom)