//Nella release 4 ci sono i TGraph e i fit sui TGraph. Ho perso così l'info in Z che avevo. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // ADD HEADER FILE HERE using namespace std; void example(TString dir, TString flist, TString treelist="+ALL"){ PamLevel2 *pam_event = new PamLevel2(dir,flist); // << create pamela event TChain *T = pam_event->GetPamTree(); CaloDoubleShower *cn = new CaloDoubleShower(pam_event); // CREATE CaloDoubleShower OBJECT GIVING PamLevel2 POINTER cn->LoadMagneticField(); // THIS IS NEEDED SINCE FROM THE FORTRAN ROUTINES THE MAGNETIC FIELD IS NOT AUTOMATICALLY LOADED. NOT NEEDED IF THE FIELD WILL BE OR HAS BEEN LOADED BY // OTHER ROUTINES (LIKE TrkTrajectory or similar) Int_t nevent = pam_event->GetEntries(); cout<< " Events= "<GetEntry(i); // get the entry, also pam_event->GetEntry is fine cn->Print(); // this will simply print on the terminal the determined CaloNuclei values Float_t dblsq = cn->GetDblsQ(); // double shower energy on the x Int_t dbls = cn->GetDblsFlag(); // double shower flag // // do something // // // if you want to do it for other tracks and not only for the track number 0 (default) you can do this way: // Float_t mipt[100]; memset(mipt,0.,100*sizeof(Float_t)); for (Int_t nt = 0; nt < pam_event->GetTrkLevel2()->GetNTracks(); nt++){ PamTrack *track = pam_event->GetTrack(nt); cn->Process(nt); cn->Print(nt); // // do something as before // }; // } printf(" end!\n"); }; //