| 34 |
// |
// |
| 35 |
TFile f(file); |
TFile f(file); |
| 36 |
// |
// |
| 37 |
TTree *T = pam_event->LoadPamTrees(&f); // << load Pamela trees from file f |
TTree *T = pam_event->GetPamTree(&f); // << get Pamela trees from file f |
| 38 |
Int_t nevent = T->GetEntries(); |
Int_t nevent = T->GetEntries(); |
| 39 |
// ******************** |
// ******************** |
| 40 |
// load magnetic field |
// load magnetic field |
| 57 |
// |
// |
| 58 |
cout << endl<< " Start loop over events "; |
cout << endl<< " Start loop over events "; |
| 59 |
for (Int_t i=0; i<nevent;i++){ |
for (Int_t i=0; i<nevent;i++){ |
| 60 |
// |
// |
| 61 |
T->GetEntry(i); |
T->GetEntry(i); |
| 62 |
// |
// |
| 63 |
if(pam_event->GetNTracks()==1){ // << select events with only one track |
if(pam_event->GetNTracks()==1){ // << select events with only one track |
| 64 |
// |
// |
| 75 |
){ |
){ |
| 76 |
|
|
| 77 |
cout << endl<< "***** First trajectory"<< endl; |
cout << endl<< "***** First trajectory"<< endl; |
| 78 |
track->DoTrack2(tr1); // << calculate the first trajectory in magnetic field |
track->DoTrack2(tr1); // << calculate the first trajectory in magnetic field |
| 79 |
// tr1->Dump(); // dump the trajectory |
// tr1->Dump(); // dump the trajectory |
| 80 |
cout << "Length: "<< tr1->GetLength()<<endl; // << get the track length |
cout << "Length: "<< tr1->GetLength()<<endl; // << get the track length |
| 81 |
// |
// |