46   TFile f1(
"mathcoreLV.root",
"RECREATE");
 
   49   TTree t1(
"t1",
"Tree with new LorentzVector");
 
   51   std::vector<ROOT::Math::XYZTVector>  
tracks;
 
   53   t1.Branch(
"tracks",
"std::vector<ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > >",&
pTracks);
 
   59   for (
int i = 0; i < 
n; ++i) {
 
   64         double px = 
R.Gaus(0,10);
 
   65         double py = 
R.Gaus(0,10);
 
   66         double pt = sqrt(px*px +py*py);
 
   67         double eta = 
R.Uniform(-3,3);
 
   71         double E = sqrt( 
vcyl.R()*
vcyl.R() + M*M);
 
   83   std::cout << 
" Time for new Vector " << 
timer.RealTime() << 
"  " << 
timer.CpuTime() << std::endl;
 
   93   TH1D * 
h1 = 
new TH1D(
"h1",
"total event  energy ",100,0,1000.);
 
   94   TH1D(
"h2",
"Number of track per event",21,-0.5,20.5);
 
   95   TH1D(
"h3",
"Track Energy",100,0,200);
 
   96   TH1D * 
h4 = 
new TH1D(
"h4",
"Track Pt",100,0,100);
 
   97   TH1D * 
h5 = 
new TH1D(
"h5",
"Track Eta",100,-5,5);
 
   98   TH1D * 
h6 = 
new TH1D(
"h6",
"Track Cos(theta)",100,-1,1);
 
  105   std::vector<ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > > * 
pTracks = 
nullptr;
 
  109   int n = (
int) 
t1->GetEntries();
 
  110   std::cout << 
" Tree Entries " << 
n << std::endl;
 
  112   for (
int i = 0; i < 
n; ++i) {
 
  117      for (
int j = 0; 
j < 
ntrk; ++
j) {
 
  123         h6->Fill(cos(
v.Theta()));
 
  124         sum += 
v.x() + 
v.y() + 
v.z() + 
v.t();
 
  131   std::cout << 
" Time for new Vector " << 
timer.RealTime() << 
"  " << 
timer.CpuTime() << std::endl;
 
  157   double s1 = write(nEvents);
 
  161      std::cout << 
"ERROR: Found difference in Vector when reading  ( " << 
s1 << 
" != " << 
s2 << 
" diff = " << 
fabs(
s1-
s2) << 
" ) " << std::endl;
 
#define R(a, b, c, d, e, f, g, h, i)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
 
1-D histogram with a double per channel (see TH1 documentation)
 
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
 
This is the base class for the ROOT Random number generators.
 
A TTree represents a columnar dataset.
 
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
 
constexpr Double_t E()
Base of natural log: .
 
static uint64_t sum(uint64_t i)