R__LOAD_LIBRARY ($PLUTOLIBDIR/libPluto.so) int pip_mupnu_readtree () { TClonesArray* partArray = new TClonesArray ("PParticle", 10); PParticle* Part[10]; TVector3 b; TFile* fileIn = new TFile ("pip_mupnu.root"); TTree* tree = (TTree*) fileIn->Get ("data"); tree->SetBranchAddress ("Particles", &partArray ); Int_t nR = tree->GetEntries() ; cout << "\n * Analysing " << nR << " reactions.\n\n"; for (Int_t iR = 0 ; iR < nR ; iR++ ) { tree->GetEntry (iR); for (Int_t iP = 0; iP < partArray->GetEntries() ; iP++ ) Part[iP] = (PParticle*) partArray->At (iP); Part[1]-> Boost ( -Part[0]->BoostVector() ); Part[2]-> Boost ( -Part[0]->BoostVector() ); for (Int_t iP = 1; iP <= 2; iP++) cout << Part[iP]->Name() <<'\t'<< Part[iP]->Px() <<'\t' << Part[iP]->Py() <<'\t'<< Part[iP]->Pz() << endl; cout << endl; } return 0; }