void readDigits() { // Dynamically link some shared libs if (gClassTable->GetID("AliRun") < 0) { gROOT->LoadMacro("loadlibs.C"); loadlibs(); } char filename[100]; sprintf(filename,"galice.root"); AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),"read"); if (rl == 0x0) { cerr<<"Can not open session for file galice.root\n"; return; } rl->LoadgAlice(); gAlice = rl->GetAliRun(); AliSTART* START = (AliSTART *)gAlice->GetDetector("START"); rl->LoadHeader(); rl->LoadKinematics("READ"); Int_t retval; AliLoader* lstart = rl->GetLoader("STARTLoader"); Int_t iNevents=rl->GetNumberOfEvents(); cout<<" nevents "<GetEvent(j); rl->GetEvent(j); // lstart->Dump(); lstart->LoadHits("READ"); lstart->LoadDigits("READ"); sprintf(nameTD,"START_D_%d",j); printf("%s\n",nameTD); TObject *td = (TObject*)gDirectory->Get(nameTD); // td->Dump(); // cout<<" td "<Read(nameTD); digits->Read(nameTD); // digits->Read(nameTD); // digits->Print(); printf("time %d\n",digits->GetTimeDiff()); if(digits->GetTimeDiff()!=999999){ Int_t timediff = digits->GetTimeDiff(); // Double_t timePs=(timediff-128)*10.; // time in Ps channel_width =10ps Int_t timePs=(512-timediff)*2.5.; // time in Ps channel_width =10ps cout<<"timediff "<Fill(timediff); hTimePs->Fill(timePs); Int_t mean=digits->GetMeanTime(); cout<<" mean "<Fill(mean); Int_t br=digits->GetBestTimeRight(); Int_t bl=digits->GetBestTimeLeft(); cout<<"BestTimeRight "<Fill(br*2.5); hBestTimeleft ->Fill(bl*2.5); digits->GetTimeRight(*timeRight ); digits->GetTimeLeft(*timeLeft ); digits->GetADCRight(*ADCRight ); digits->GetADCLeft(*ADCLeft ); for (Int_t i=0; i<12; i++) { Int_t t=timeRight.At(i); Int_t ADC=ADCRight.At(i); hTimeright->Fill(t*2.5); hADCright->Fill(ADC); } for (Int_t i=0; i<12; i++) { Int_t ADC=ADCRight.At(i); Int_t t=timeLeft.At(i); hTimeleft->Fill(t*2.5); hADCleft->Fill(ADC); } } } Hfile = new TFile("Figdigits.root","RECREATE","Histograms for START digits"); printf("Writting histograms to root file \n"); Hfile->cd(); //Create a canvas, set the view range, show histograms gStyle->SetOptStat(111111); // TCanvas *c1 = new TCanvas("c1","Alice START Time ",400,10,600,600); hADCright->Write(); hADCleft->Write(); hTimeright->Write(); hTimeleft->Write(); hTimePs->SetXTitle("arriving time, ps"); hTimePs->SetYTitle("number of events"); hTimePs->Write(); hMeanTime->Write(); hBestTimeright->Write(); hBestTimeleft ->Write(); Hfile->Close(); } // end of macro