+ void AliSTARTReconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
+{
+// START digits reconstruction
+// STARTRecPoint writing
+
+ //Q->T-> coefficients !!!! should be asked!!!
+ // Float_t ph2MIP=500;
+ Float_t gain[24], timeDelayCFD[24], timeDelayLED[24];
+ Float_t zdetA,zdetC;
+ TObjArray slewingLED;
+
+ TArrayI * fADC = new TArrayI(24);
+ TArrayI * fTimeCFD = new TArrayI(24);
+ TArrayI * fADCLED = new TArrayI(24);
+ TArrayI * fTimeLED = new TArrayI(24);
+ cout<<" fTimeCFD "<<fTimeCFD<<endl;
+
+ AliSTARTParameters* param = AliSTARTParameters::Instance();
+ param->Init();
+ Int_t ph2MIP = param->GetPh2Mip();
+ Int_t channelWidth = param->GetChannelWidth() ;
+
+ for (Int_t i=0; i<24; i++){
+ timeDelayCFD[i] = param->GetTimeDelayCFD(i);
+ timeDelayLED[i] = param->GetTimeDelayLED(i);
+ gain[i] = param->GetGain(i);
+ slewingLED.AddAtAndExpand(param->GetSlew(i),i);
+ }
+ zdetC = param->GetZposition(0);
+ zdetA = param->GetZposition(1);
+
+ AliDebug(1,Form("Start DIGITS reconstruction "));
+
+ TBranch *brDigits=digitsTree->GetBranch("START");
+ AliSTARTdigit *fDigits = new AliSTARTdigit();
+ if (brDigits) {
+ brDigits->SetAddress(&fDigits);
+ }else{
+ cerr<<"EXEC Branch START digits not found"<<endl;
+ return;
+ }
+ brDigits->GetEntry(0);
+ fDigits->GetTime(*fTimeCFD);
+ fDigits->GetADC(*fADC);
+ fDigits->GetTimeAmp(*fTimeLED);
+ fDigits->GetADCAmp(*fADCLED);
+
+ Float_t time[24], adc[24];
+ for (Int_t ipmt=0; ipmt<24; ipmt++)
+ {
+
+ if(fTimeCFD->At(ipmt)>0 ){
+ time[ipmt] = channelWidth *( fTimeCFD->At(ipmt)) - 1000*timeDelayCFD[ipmt];
+ cout<<ipmt<<" "<<time[ipmt];
+ Float_t adc_digPs = channelWidth * Float_t (fADC->At(ipmt)) ;
+ // cout<<" adc_digmV "<< adc_digPs<<endl;
+ adc[ipmt] = TMath::Exp(adc_digPs/1000) /gain[ipmt];
+ // cout<<" adc"<<adc[ipmt]<<" inMIP "<<adc[ipmt]/50<< endl;
+ }
+ }