| 103 |
TTree *tracker = 0; |
TTree *tracker = 0; |
| 104 |
TTree *toft = 0; |
TTree *toft = 0; |
| 105 |
UInt_t nevents = 0; |
UInt_t nevents = 0; |
|
Long64_t maxsize = 10000000000LL; |
|
|
TTree::SetMaxTreeSize(maxsize); |
|
|
// |
|
| 106 |
// |
// |
| 107 |
// variables needed to reprocess data |
// variables needed to reprocess data |
| 108 |
// |
// |
| 285 |
// |
// |
| 286 |
// tree exists, we are reprocessing data. Are we reprocessing a single run or all the file? |
// tree exists, we are reprocessing data. Are we reprocessing a single run or all the file? |
| 287 |
// |
// |
|
toftclone->SetAutoSave(900000000000000LL); |
|
| 288 |
reproc = true; |
reproc = true; |
| 289 |
// |
// |
| 290 |
// update versioning information |
// update versioning information |
| 329 |
// |
// |
| 330 |
file->cd(); |
file->cd(); |
| 331 |
toft = new TTree("ToF-new","PAMELA Level2 ToF data"); |
toft = new TTree("ToF-new","PAMELA Level2 ToF data"); |
|
toft->SetAutoSave(900000000000000LL); |
|
|
tof->Set();//ELENA **TEMPORANEO?** |
|
| 332 |
toft->Branch("ToFLevel2","ToFLevel2",&tof); |
toft->Branch("ToFLevel2","ToFLevel2",&tof); |
| 333 |
// |
// |
| 334 |
if ( reproc && !reprocall ){ |
if ( reproc && !reprocall ){ |
| 337 |
// |
// |
| 338 |
tempfile = new TFile(tempname.str().c_str(),"READ"); |
tempfile = new TFile(tempname.str().c_str(),"READ"); |
| 339 |
toftclone = (TTree*)tempfile->Get("ToF-old"); |
toftclone = (TTree*)tempfile->Get("ToF-old"); |
|
toftclone->SetAutoSave(900000000000000LL); |
|
| 340 |
toftclone->SetBranchAddress("ToFLevel2",&tofclone); |
toftclone->SetBranchAddress("ToFLevel2",&tofclone); |
| 341 |
// |
// |
| 342 |
if ( nobefrun > 0 ){ |
if ( nobefrun > 0 ){ |
| 533 |
tof->Clear(); |
tof->Clear(); |
| 534 |
Int_t pmt_id = 0; |
Int_t pmt_id = 0; |
| 535 |
ToFPMT *t_pmt = new ToFPMT(); |
ToFPMT *t_pmt = new ToFPMT(); |
|
if(!(tof->PMT))tof->PMT = new TClonesArray("ToFPMT",12); //ELENA |
|
| 536 |
TClonesArray &tpmt = *tof->PMT; |
TClonesArray &tpmt = *tof->PMT; |
| 537 |
ToFTrkVar *t_tof = new ToFTrkVar(); |
ToFTrkVar *t_tof = new ToFTrkVar(); |
|
if(!(tof->ToFTrk))tof->ToFTrk = new TClonesArray("ToFTrkVar",2); //ELENA |
|
| 538 |
TClonesArray &t = *tof->ToFTrk; |
TClonesArray &t = *tof->ToFTrk; |
| 539 |
// |
// |
| 540 |
// paranoid check |
// paranoid check |
| 609 |
if ( tofoutput_.tofmask[hh][kk] != 0 ){ |
if ( tofoutput_.tofmask[hh][kk] != 0 ){ |
| 610 |
pmt_id = tof->GetPMTid(kk,hh); |
pmt_id = tof->GetPMTid(kk,hh); |
| 611 |
t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc); |
t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc); |
| 612 |
|
t_tof->tdcflag.AddAt(tofoutput_.tdcflagtof[hh][kk],t_tof->npmttdc); // gf: Jan 09/07 |
| 613 |
t_tof->npmttdc++; |
t_tof->npmttdc++; |
| 614 |
}; |
}; |
| 615 |
}; |
}; |
| 625 |
t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc); |
t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc); |
| 626 |
pmt_id = tof->GetPMTid(kk,hh); |
pmt_id = tof->GetPMTid(kk,hh); |
| 627 |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
| 628 |
|
t_tof->adcflag.AddAt(tofoutput_.adcflagtof[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
| 629 |
t_tof->npmtadc++; |
t_tof->npmtadc++; |
| 630 |
}; |
}; |
| 631 |
}; |
}; |
| 688 |
if ( tofoutput_.tofmask[hh][kk] != 0 ){ |
if ( tofoutput_.tofmask[hh][kk] != 0 ){ |
| 689 |
pmt_id = tof->GetPMTid(kk,hh); |
pmt_id = tof->GetPMTid(kk,hh); |
| 690 |
t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc); |
t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc); |
| 691 |
|
t_tof->tdcflag.AddAt(tofoutput_.tdcflag[hh][kk],t_tof->npmttdc); // gf: Jan 09/07 |
| 692 |
t_tof->npmttdc++; |
t_tof->npmttdc++; |
| 693 |
}; |
}; |
| 694 |
}; |
}; |
| 704 |
t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc); |
t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc); |
| 705 |
pmt_id = tof->GetPMTid(kk,hh); |
pmt_id = tof->GetPMTid(kk,hh); |
| 706 |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
| 707 |
|
t_tof->adcflag.AddAt(tofoutput_.adcflag[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
| 708 |
t_tof->npmtadc++; |
t_tof->npmtadc++; |
| 709 |
}; |
}; |
| 710 |
}; |
}; |