From c41ceaac6d4656983aebd086f4cb7e947eb70d07 Mon Sep 17 00:00:00 2001 From: alla Date: Mon, 19 Mar 2007 16:04:02 +0000 Subject: [PATCH] more realistic calibration --- T0/AliT0.cxx | 26 ++-- T0/AliT0CalibData.cxx | 144 ++++++++++++++------- T0/AliT0CalibData.h | 16 +-- T0/AliT0Digitizer.cxx | 141 ++++++++++---------- T0/AliT0Digitizer.h | 2 +- T0/AliT0Parameters.cxx | 121 +++++++++++++---- T0/AliT0Parameters.h | 38 +----- T0/AliT0RawData.cxx | 64 +++++---- T0/AliT0RawData.h | 17 +-- T0/AliT0RawReader.cxx | 102 +++++++-------- T0/AliT0RawReader.h | 8 +- T0/AliT0RecPoint.cxx | 16 +-- T0/AliT0RecPoint.h | 14 +- T0/AliT0Reconstructor.cxx | 264 ++++++++++++++++++++++++++++---------- T0/AliT0Reconstructor.h | 24 ++-- T0/AliT0SetCDB.C | 109 ++++++++++++---- T0/AliT0Trigger.cxx | 8 +- T0/AliT0digit.cxx | 86 +++++++------ T0/AliT0digit.h | 42 +++--- T0/AliT0hit.cxx | 21 ++- T0/AliT0hit.h | 2 +- T0/T0baseLinkDef.h | 2 +- T0/T0recLinkDef.h | 1 + T0/T0simLinkDef.h | 1 - T0/libT0base.pkg | 2 +- T0/libT0rec.pkg | 2 +- T0/libT0sim.pkg | 2 +- 27 files changed, 783 insertions(+), 492 deletions(-) diff --git a/T0/AliT0.cxx b/T0/AliT0.cxx index 3f1330c0706..0fb1afa0100 100644 --- a/T0/AliT0.cxx +++ b/T0/AliT0.cxx @@ -137,7 +137,7 @@ void AliT0::AddHit(Int_t track, Int_t *vol, Float_t *hits) void AliT0::AddDigit(Int_t besttimeright, Int_t besttimeleft, Int_t meantime, Int_t timediff, Int_t sumMult, - TArrayI *time, TArrayI *adc, TArrayI *timeAmp, TArrayI *adcAmp) + TArrayI *timeCFD, TArrayI *qt0, TArrayI *timeLED, TArrayI *qt1) { // Add a T0 digit to the list. @@ -146,15 +146,15 @@ void AliT0::AddDigit(Int_t besttimeright, Int_t besttimeleft, Int_t meantime, if (!fDigits) { fDigits = new AliT0digit(); } - fDigits-> SetTimeBestRight(besttimeright); - fDigits->SetTimeBestLeft(besttimeleft); + fDigits-> SetTimeBestA(besttimeright); + fDigits->SetTimeBestC(besttimeleft); fDigits-> SetMeanTime(meantime); fDigits-> SetDiffTime(timediff); fDigits-> SetSumMult(sumMult); - fDigits->SetTime(*time); - fDigits->SetTimeAmp(*timeAmp); - fDigits->SetADC(*adc); - fDigits->SetADCAmp(*adcAmp); + fDigits->SetTimeCFD(*timeCFD); + fDigits->SetTimeLED(*timeLED); + fDigits->SetQT0(*qt0); + fDigits->SetQT1(*qt1); } @@ -397,16 +397,16 @@ void AliT0::Raw2Digits(AliRawReader *rawReader,TTree* digitsTree) AliDebug(2, Form(" readed Raw %i %i %i %i %i", in, timeLED->At(in),timeCFD->At(in),chargeQT0->At(in),chargeQT1->At(in))); } - fDigits->SetTime(*timeCFD); - fDigits->SetADC(*chargeQT1); + fDigits->SetTimeCFD(*timeCFD); + fDigits->SetQT0(*chargeQT1); - fDigits->SetTimeAmp(*timeLED); - fDigits->SetADCAmp(*chargeQT1); + fDigits->SetTimeLED(*timeLED); + fDigits->SetQT1(*chargeQT1); fDigits->SetMeanTime(allData[49][0]); fDigits->SetDiffTime(allData[50][0]); - fDigits->SetTimeBestRight(allData[51][0]); - fDigits->SetTimeBestLeft(allData[52][0]); + fDigits->SetTimeBestA(allData[51][0]); + fDigits->SetTimeBestC(allData[52][0]); digitsTree->Fill(); fDigits->Write(); diff --git a/T0/AliT0CalibData.cxx b/T0/AliT0CalibData.cxx index 82086467ed9..e7ad6355d08 100644 --- a/T0/AliT0CalibData.cxx +++ b/T0/AliT0CalibData.cxx @@ -90,7 +90,6 @@ void AliT0CalibData::Reset() { memset(fTimeDelayCFD,1,24*sizeof(Float_t)); memset(fTimeDelayLED,1,24*sizeof(Float_t)); - memset(fGain,1,24*sizeof(Float_t)); } @@ -101,58 +100,44 @@ void AliT0CalibData::Print(Option_t*) const printf("\n ---- PM Arrays ----\n\n"); printf(" Time delay CFD \n"); for (Int_t i=0; i<24; i++) printf(" %f",fTimeDelayCFD[i]); - printf(" \n LED \n"); - for (Int_t i=0; i<24; i++) printf(" %f",fTimeDelayLED[i]); - printf(" \n Gain \n"); - for (Int_t i=0; i<24; i++) printf(" %f",fGain[i]); - printf(" \n"); } //________________________________________________________________ void AliT0CalibData::PrintLookup(Option_t*, Int_t iTRM, Int_t iTDC, Int_t iChannel) const { - - AliT0LookUpKey* lookkey= new AliT0LookUpKey(); - AliT0LookUpValue* lookvalue= new AliT0LookUpValue(); - - lookvalue->SetTRM(iTRM); - lookvalue->SetTDC(iTDC); - lookvalue->SetChain(0); - lookvalue->SetChannel(iChannel); - - printf(" AliT0CalibData::PrintLookup ::start GetValue %i %i %i \n",iTRM, iTDC, iChannel); - lookkey = (AliT0LookUpKey*) fLookup.GetValue((TObject*)lookvalue); - - cout<<" AliT0CalibData::PrintLookup :: lookkey "<< lookkey<GetKey()<<" VALUE "<GetTRM()<<" " - <GetTDC()<<" " - << lookvalue->GetChain()<<" " - <GetChannel()<SetTRM(iTRM); + lookvalue->SetTDC(iTDC); + lookvalue->SetChain(0); + lookvalue->SetChannel(iChannel); + + printf(" AliT0CalibData::PrintLookup ::start GetValue %i %i %i \n",iTRM, iTDC, iChannel); + lookkey = (AliT0LookUpKey*) fLookup.GetValue((TObject*)lookvalue); + + cout<<" AliT0CalibData::PrintLookup :: lookkey "<< lookkey<GetKey()<<" VALUE "<GetTRM()<<" " + <GetTDC()<<" " + << lookvalue->GetChain()<<" " + <GetChannel()<Get(funcname); + Int_t mv, ps; + Int_t x[70000], y[70000], index[70000]; + Float_t time[10000],amplitude[10000]; + string buffer; + Bool_t down=false; + + ifstream inFile("data/CFD-Amp.txt"); + if(!inFile) AliError(Form("Cannot open file %s !",filename)); + + Int_t i=0, i1=0, i2=0; + while(getline(inFile,buffer)){ + inFile >> ps >> mv; + + x[i]=ps; y[i]=mv; + i++; + } + inFile.close(); + + TMath::Sort(i, y, index,down); + Int_t amp=0, iin=0, isum=0, sum=0; + Int_t ind=0; + for (Int_t ii=0; ii<70000; ii++) + { + ind=index[ii]; + if(y[ind] == amp) + { + sum +=x[ind]; + iin++; + // cout<0) + time[isum] = Float_t (sum/(iin)); + else + time[isum] =Float_t (x[ind]); + amplitude[isum] = Float_t (amp); + amp=y[ind]; + cout<Close(); } @@ -225,6 +253,7 @@ void AliT0CalibData::SetSlewingRec(Int_t ipmt,const Char_t *filename) void AliT0CalibData::ReadAsciiLookup(const Char_t *filename) { + Int_t key, trm, tdc, chain, channel; if(filename == 0){ AliError(Form("Please, specify file with database")) ; @@ -232,17 +261,34 @@ void AliT0CalibData::ReadAsciiLookup(const Char_t *filename) } // AliT0LookUpKey * lookkey= new AliT0LookUpKey(); - //AliT0LookUpValue * lookvalue= new AliT0LookUpValue(); + // AliT0LookUpValue * lookvalue= new AliT0LookUpValue(); ifstream lookup; lookup.open(filename); - if(!lookup) {AliError(Form("Cannot open file %s !",filename));} + if(!lookup) + { + // AliLog(Form("Cannot open file %s ! Getting hardcoded value",filename)); + + trm=0; tdc=0; chain=0; channel=0; key=0; + for (Int_t ik=0; ik<108; ik++) + { + AliT0LookUpKey * lookkey= new AliT0LookUpKey(); + AliT0LookUpValue * lookvalue= new AliT0LookUpValue(); + + lookvalue->SetTRM(trm); + lookvalue->SetTDC(tdc); + lookvalue->SetChain(chain); + lookvalue->SetChannel(channel); + lookkey->SetKey(ik); + if(ik>53) { trm=1; tdc=0; channel=0;} + if (channel<7) channel +=2; + else {channel = 0; tdc++;} + } + } Char_t varname[11]; - Int_t key, trm, tdc, chain, channel; // while(lookup.eof()) for (Int_t i=0; i<108; i++) -// for (Int_t i=0;i<3;i++) { AliT0LookUpKey * lookkey= new AliT0LookUpKey(); AliT0LookUpValue * lookvalue= new AliT0LookUpValue(); diff --git a/T0/AliT0CalibData.h b/T0/AliT0CalibData.h index 9025e5cb2ac..7891cc62888 100644 --- a/T0/AliT0CalibData.h +++ b/T0/AliT0CalibData.h @@ -34,13 +34,10 @@ class AliT0CalibData: public TNamed { Float_t GetTimeDelayLED(Int_t channel) const {return fTimeDelayLED[channel];} Float_t* GetTimeDelayLED() const {return(float*) fTimeDelayLED;} - Float_t GetGain(Int_t channel) const {return fGain[channel];} - Float_t* GetGain() const {return (float*)fGain;} - void SetGain(Float_t val, Int_t channel) {fGain[channel]=val;} - void SetGain(Float_t* Gain); - Float_t GetWalk(Int_t ipmt, Float_t mv ) const {return ((TF1*)fWalk.At(ipmt))->Eval(mv);} - void SetWalk(Int_t ipmt, const Char_t *filename="calibr/re.root") ; + TGraph *GetWalk(Int_t ipmt ) const {return ((TGraph*)fWalk.At(ipmt));} + Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const {return ((TGraph*)fWalk.At(ipmt))->Eval(mv);} + void SetWalk(Int_t ipmt, const Char_t *filename="data/CFD-Amp.root") ; TGraph * GetSlew(Int_t ipmt) const {return (TGraph*)fSlewingLED.At(ipmt);} Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const @@ -49,8 +46,8 @@ class AliT0CalibData: public TNamed { Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} - void SetSlewingLED(Int_t ipmt, const Char_t *filename) ; - void SetSlewingRec(Int_t ipmt, const Char_t *filename) ; + void SetSlewingLED(Int_t ipmt, const Char_t *filename="data/CFD-LED.txt") ; + void SetSlewingRec(Int_t ipmt, const Char_t *filename="data/re.root") ; void SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;} void SetTimeDelayCFD(Float_t* TimeDelay); @@ -72,7 +69,6 @@ class AliT0CalibData: public TNamed { Float_t fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD ) Float_t fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD ) - Float_t fGain[24]; // Coeff. for gain (24 different cables & CFD ) Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel) TObjArray fWalk; //time - amp. walk TObjArray fSlewingLED; //time - amp.LED slew @@ -81,7 +77,7 @@ class AliT0CalibData: public TNamed { //Int_t fa; // - ClassDef(AliT0CalibData,2) // T0 Sensor Calibration data + ClassDef(AliT0CalibData,3) // T0 Sensor Calibration data }; typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility diff --git a/T0/AliT0Digitizer.cxx b/T0/AliT0Digitizer.cxx index 3f6c3e75664..f45ff5336d3 100644 --- a/T0/AliT0Digitizer.cxx +++ b/T0/AliT0Digitizer.cxx @@ -48,7 +48,19 @@ ClassImp(AliT0Digitizer) //___________________________________________ - AliT0Digitizer::AliT0Digitizer() :AliDigitizer() + AliT0Digitizer::AliT0Digitizer() :AliDigitizer(), + fT0(0), + fHits(0), + fdigits(0), + ftimeCFD(new TArrayI(24)), + ftimeLED (new TArrayI(24)), + fADC(new TArrayI(24)), + fADC0 (new TArrayI(24)), + fSumMult(0), + fEffPMT(0) + + + { // Default ctor - don't use it ; @@ -60,24 +72,17 @@ AliT0Digitizer::AliT0Digitizer(AliRunDigitizer* manager) fT0(0), fHits(0), fdigits(0), - ftimeCFD(0), - ftimeLED(0), - fADC(0), - fADC0(0) + ftimeCFD(new TArrayI(24)), + ftimeLED (new TArrayI(24)), + fADC(new TArrayI(24)), + fADC0 (new TArrayI(24)), + fSumMult(0), + fEffPMT(0) { // ctor which should be used AliDebug(1,"processed"); - fT0 = 0; - fHits = 0; - fdigits = 0; - - ftimeCFD = new TArrayI(24); - fADC = new TArrayI(24); - ftimeLED = new TArrayI(24); - fADC0 = new TArrayI(24); - } @@ -111,9 +116,9 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) /* Produde digits from hits digits is TObject and includes - We are writing array if left & right TDC - left & right ADC (will need for slow simulation) - TOF first particle left & right + We are writing array if C & A TDC + C & A ADC (will need for slow simulation) + TOF first particle C & A mean time and time difference (vertex position) */ @@ -131,15 +136,17 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) Int_t countE[24]; Int_t volume, pmt, trCFD, trLED; Float_t sl, qt; - Int_t bestRightTDC, bestLeftTDC, qtCh; + Int_t bestATDC, bestCTDC, qtCh; Float_t time[24], besttime[24], timeGaus[24] ; //Q->T-> coefficients !!!! should be asked!!! - Float_t gain[24],timeDelayCFD[24], timeDelayLED[24]; + Float_t timeDelayCFD[24], timeDelayLED[24]; Int_t threshold =50; //photoelectrons Float_t zdetA, zdetC; Int_t sumMultCoeff = 100; TObjArray slewingLED; - TObjArray slewingRec; + TObjArray walk; + TH1F *hr ; + AliT0Parameters* param = AliT0Parameters::Instance(); param->Init(); @@ -148,17 +155,17 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) Float_t delayVertex = param->GetTimeDelayTVD(); for (Int_t i=0; i<24; i++){ timeDelayCFD[i] = param->GetTimeDelayCFD(i); - timeDelayLED[i] = param->GetTimeDelayLED(i); - gain[i] = param->GetGain(i); + timeDelayLED[i] = param->GetTimeDelayLED(i); TGraph* gr = param ->GetSlew(i); slewingLED.AddAtAndExpand(gr,i); - TGraph* gr1 = param ->GetSlewRec(i); - slewingRec.AddAtAndExpand(gr1,i); + TGraph* fu = param ->GetWalk(i); + walk.AddAtAndExpand(fu,i); TGraph* grEff = param ->GetPMTeff(i); fEffPMT.AddAtAndExpand(grEff,i); } + zdetC = param->GetZposition(0); zdetA = param->GetZposition(1); @@ -173,14 +180,15 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) } - Float_t besttimeright=99999.; - Float_t besttimeleft=99999.; - Int_t pmtBestRight=9999; - Int_t pmtBestLeft=9999; + Float_t besttimeC=99999.; + Float_t besttimeA=99999.; + Int_t pmtBestC=9999; + Int_t pmtBestA=9999; Int_t timeDiff=999, meanTime=0; Int_t sumMult =0; fSumMult=0; - bestRightTDC = 99999; bestLeftTDC = 99999; + bestATDC = 99999; bestCTDC = 99999; + ftimeCFD -> Reset(); fADC -> Reset(); fADC0 -> Reset(); @@ -236,44 +244,44 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) } //hits loop } //track loop - //spread time right&left by 25ps && besttime + //spread time A&C by 25ps && besttime Float_t c = 0.0299792; // cm/ps Float_t koef=(zdetA-zdetC)/c; //correction position difference by cable for (Int_t ipmt=0; ipmt<12; ipmt++){ if(countE[ipmt] > threshold) { timeGaus[ipmt]=gRandom->Gaus(time[ipmt],25)+koef; - if(timeGaus[ipmt] threshold) { timeGaus[ipmt]=gRandom->Gaus(time[ipmt],25); - if(timeGaus[ipmt] 10000. && besttimeleft <15000) - bestLeftTDC=Int_t ((besttimeleft+1000*timeDelayCFD[pmtBestLeft]) + if( besttimeC > 10000. && besttimeC <15000) + bestCTDC=Int_t ((besttimeC+timeDelayCFD[pmtBestC]) /channelWidth); - if( besttimeright > 10000. && besttimeright <15000) - bestRightTDC=Int_t ((besttimeright+1000*timeDelayCFD[pmtBestRight]) + if( besttimeA > 10000. && besttimeA <15000) + bestATDC=Int_t ((besttimeA+timeDelayCFD[pmtBestA]) /channelWidth); - if (bestRightTDC < 99999 && bestLeftTDC < 99999) + if (bestATDC < 99999 && bestCTDC < 99999) { - timeDiff=Int_t (((besttimeleft-besttimeright)+1000*delayVertex) + timeDiff=Int_t (((besttimeC-besttimeA)+1000*delayVertex) /channelWidth); - meanTime=Int_t (((besttimeright+1000*timeDelayCFD[pmtBestLeft]+ - besttimeleft+1000*timeDelayCFD[pmtBestLeft])/2.) + meanTime=Int_t (((besttimeC+timeDelayCFD[pmtBestC]+ + besttimeA+timeDelayCFD[pmtBestA])/2.) /channelWidth); } - AliDebug(10,Form(" time right& left %i %i time diff && mean time in channels %i %i",bestRightTDC,bestLeftTDC, timeDiff, meanTime)); + AliDebug(10,Form(" time A& C %i %i time diff && mean time in channels %i %i",bestATDC,bestCTDC, timeDiff, meanTime)); for (Int_t i=0; i<24; i++) { Float_t al = countE[i]; @@ -283,16 +291,15 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) // phe -> mV 0.3; 1MIP ->500phe -> ln (amp (mV)) = 5; // max 200ns, HIJING mean 50000phe -> 15000mv -> ln = 15 (s zapasom) // channel 25ps - qt= 50.*al*gain[i]/ph2Mip; // 50mv/Mip amp in mV + qt= 50.*al/ph2Mip; // 50mv/Mip amp in mV // fill TDC - trCFD = Int_t (timeGaus[i] + 1000.*timeDelayCFD[i])/channelWidth; - trLED= Int_t (timeGaus[i] + 1000.*timeDelayLED[i]); + trCFD = Int_t (timeGaus[i]/channelWidth + (timeDelayCFD[i]-timeDelayCFD[0])); + trLED= Int_t (timeGaus[i] + timeDelayLED[i]); sl = ((TGraph*)slewingLED.At(i))->Eval(qt); trLED = Int_t(( trLED + 1000*sl )/channelWidth); qtCh=Int_t (1000.*TMath::Log(qt)) / channelWidth; fADC0->AddAt(0,i); fADC->AddAt(qtCh,i); - ftimeCFD->AddAt(Int_t (trCFD),i); ftimeLED->AddAt(trLED,i); // sumMult += Int_t ((al*gain[i]/ph2Mip)*50) ; sumMult += Int_t (qt/sumMultCoeff) ; @@ -301,6 +308,14 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) i, timeGaus[i],trCFD )); AliDebug(10,Form(" qt in mV %f qt in ns %f qt in channels %i ",qt, TMath::Log(qt), qtCh)); + // put slewing + TGraph *fu1=(TGraph*) walk.At(i); + Float_t slew=fu1->Eval(Float_t(qtCh)); + hr=fu1->GetHistogram(); + Float_t maxValue=hr->GetMaximum(50); + trCFD=trCFD-Int_t((maxValue-slew)/channelWidth); + ftimeCFD->AddAt(Int_t (trCFD),i); + cout<<" slew "<AddDigit(bestRightTDC,bestLeftTDC,meanTime,timeDiff,fSumMult, - ftimeCFD,fADC,ftimeLED,fADC0); - // } + fT0->AddDigit(bestATDC,bestCTDC,meanTime,timeDiff,fSumMult, + ftimeCFD,fADC0,ftimeLED,fADC); - AliDebug(10,Form(" Digits wrote bestRightTDC %i bestLeftTDC %i meanTime %i timeDiff %i fSumMult %i ", bestRightTDC,bestLeftTDC,meanTime,timeDiff,fSumMult )); + AliDebug(10,Form(" Digits wrote bestATDC %i bestCTDC %i meanTime %i timeDiff %i fSumMult %i ", bestATDC,bestCTDC,meanTime,timeDiff,fSumMult )); pOutStartLoader->UnloadHits(); } //input streams loop @@ -339,23 +352,3 @@ void AliT0Digitizer::Exec(Option_t* /*option*/) pOutStartLoader->UnloadDigits(); } - - -//------------------------------------------------------------------------ -Bool_t AliT0Digitizer::RegisterPhotoE(Int_t ipmt,Double_t energy) -{ - - - // Float_t hc=197.326960*1.e6; //mev*nm - Double_t hc=1.973*1.e-6; //gev*nm - Float_t lambda=hc/energy; - Float_t eff = ((TGraph*) fEffPMT.At(ipmt))->Eval(lambda); - Double_t p = gRandom->Rndm(); - - if (p > eff) - return kFALSE; - - return kTRUE; -} - -//---------------------------------------------------------------------------- diff --git a/T0/AliT0Digitizer.h b/T0/AliT0Digitizer.h index cf2a2f6d5e1..46367d3876f 100644 --- a/T0/AliT0Digitizer.h +++ b/T0/AliT0Digitizer.h @@ -27,7 +27,7 @@ class AliT0Digitizer : public AliDigitizer { // Do the main work void Exec (Option_t* /*option=0*/) ; - Bool_t RegisterPhotoE(Int_t impt, Double_t energy); + // Bool_t RegisterPhotoE(Int_t impt, Double_t energy); enum {kBgTag = -1}; private: diff --git a/T0/AliT0Parameters.cxx b/T0/AliT0Parameters.cxx index 3f39f5b8976..6c45c98da3a 100644 --- a/T0/AliT0Parameters.cxx +++ b/T0/AliT0Parameters.cxx @@ -35,6 +35,7 @@ AliT0CalibData* AliT0Parameters::fgCalibData = 0; AliT0CalibData* AliT0Parameters::fgLookUp = 0; +AliT0CalibData* AliT0Parameters::fgSlewCorr =0; //==================================================================== ClassImp(AliT0Parameters) #if 0 @@ -54,28 +55,23 @@ AliT0Parameters::Instance() //____________________________________________________________________ AliT0Parameters::AliT0Parameters() - :fIsInit(kFALSE),fPh2Mip(0),fmV2Mip(0),fChannelWidth(0),fmV2Channel(0),fQTmin(0),fQTmax(0),fFixedGain(0),fSlewingLED(),fSlewingRec(),fPMTeff(),fTimeDelayLED(0),fTimeDelayCFD(0),fTimeDelayTVD(0),fCalibentry() + :fIsInit(kFALSE),fPh2Mip(0),fmV2Mip(0),fChannelWidth(0),fmV2Channel(0),fQTmin(0),fQTmax(0),fSlewingLED(),fSlewingRec(),fPMTeff(),fTimeDelayLED(0),fTimeDelayCFD(0),fTimeDelayTVD(0),fCalibentry(), fLookUpentry(),fSlewCorr() { // Default constructor for (Int_t ipmt=0; ipmt<24; ipmt++) { - SetTimeDelayCablesCFD(ipmt); - SetTimeDelayCablesLED(ipmt); - SetTimeDelayElectronicCFD(ipmt); - SetTimeDelayElectronicLED(ipmt); - SetTimeDelayPMT(ipmt); - SetVariableDelayLine(ipmt); SetSlewingLED(ipmt); SetSlewingRec(ipmt); + SetWalk(ipmt); SetPh2Mip(); SetmV2Mip(); SetChannelWidth(); SetmV2channel(); - SetGain(); SetQTmin(); SetQTmax(); SetPMTeff(ipmt); + } SetTimeDelayTVD(); SetZposition(); @@ -95,10 +91,18 @@ AliT0Parameters::Init() AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT"); - AliCDBEntry* fCalibentry = stor->Get("T0/Calib/Gain_TimeDelay_Slewing_Walk",0); + //time equalizing + AliCDBEntry* fCalibentry = stor->Get("T0/Calib/TimeDelay",0); if (fCalibentry){ fgCalibData = (AliT0CalibData*)fCalibentry->GetObject(); } + else + { AliError(" ALARM !!!! No time delays in CDB "); } + //slewing correction + AliCDBEntry* fSlewCorr = stor->Get("T0/Calib/Slewing_Walk",0); + if (fSlewCorr){ + fgSlewCorr = (AliT0CalibData*)fSlewCorr->GetObject(); + } // fLookUpentry = cdb->Get("T0/Calib/LookUp_Table"); fLookUpentry = stor->Get("T0/Calib/LookUp_Table",0); if (fLookUpentry){ @@ -113,19 +117,6 @@ AliT0Parameters::Init() } -//__________________________________________________________________ -Float_t -AliT0Parameters::GetGain(Int_t ipmt) const -{ - // Returns the calibrated gain for each PMT - // - - if (!fCalibentry) - return fFixedGain; - - return fgCalibData->GetGain(ipmt); -} - //__________________________________________________________________ Float_t AliT0Parameters::GetTimeDelayLED(Int_t ipmt) @@ -133,7 +124,7 @@ AliT0Parameters::GetTimeDelayLED(Int_t ipmt) // return time delay for LED channel // if (!fCalibentry) { - fTimeDelayLED = fTimeDelayCablesLED[ipmt] + fTimeDelayElectronicLED[ipmt] + fTimeDelayPMT[ipmt]; + fTimeDelayLED = 0; return fTimeDelayLED; } return fgCalibData ->GetTimeDelayLED(ipmt); @@ -146,8 +137,8 @@ AliT0Parameters::GetTimeDelayCFD(Int_t ipmt) // if (!fCalibentry) { - fTimeDelayCFD = fTimeDelayCablesCFD[ipmt] + fTimeDelayElectronicCFD[ipmt] + fTimeDelayPMT[ipmt] + fVariableDelayLine[ipmt]; - return fTimeDelayCFD+37; + fTimeDelayCFD = 1000+ipmt*100; + return fTimeDelayCFD; } return fgCalibData->GetTimeDelayCFD(ipmt); @@ -231,6 +222,86 @@ TGraph *AliT0Parameters::GetSlewRec(Int_t ipmt) const return fgCalibData -> GetSlewRec(ipmt) ; } + +//________________________________________________________________ +void AliT0Parameters::SetWalk(Int_t ipmt) +{ + + Int_t mv, ps; + Int_t x[70000], y[70000], index[70000]; + Float_t time[10000],amplitude[10000]; + string buffer; + Bool_t down=false; + + ifstream inFile("data/CFD-Amp.txt"); + // if(!inFile) AliError(Form("Cannot open file %s !",filename)); + + Int_t i=0, i1=0, i2=0; + while(getline(inFile,buffer)){ + inFile >> ps >> mv; + + x[i]=ps; y[i]=mv; + i++; + } + inFile.close(); + + TMath::Sort(i, y, index,down); + Int_t amp=0, iin=0, isum=0, sum=0; + Int_t ind=0; + for (Int_t ii=0; ii<70000; ii++) + { + ind=index[ii]; + if(y[ind] == amp) + { + sum +=x[ind]; + iin++; + } + else + { + if(iin>0) + time[isum] = Float_t (sum/(iin)); + else + time[isum] =Float_t (x[ind]); + amplitude[isum] = Float_t (amp); + amp=y[ind]; + // cout< GetWalk(ipmt) ; +} + +//__________________________________________________________________ + +Float_t AliT0Parameters::GetWalkVal(Int_t ipmt, Float_t mv) const +{ + if (!fCalibentry) { + return ((TGraph*)fWalk.At(ipmt))->Eval(mv); + } + return fgCalibData -> GetWalkVal(ipmt, mv) ; +} + +//__________________________________________________________________ + //__________________________________________________________________ void AliT0Parameters::SetPMTeff(Int_t ipmt) diff --git a/T0/AliT0Parameters.h b/T0/AliT0Parameters.h index c694cdef3c7..ced59b45353 100644 --- a/T0/AliT0Parameters.h +++ b/T0/AliT0Parameters.h @@ -35,7 +35,6 @@ public: void SetmV2channel(Int_t size=320) { fmV2Channel = size; } void SetQTmin(Int_t qt=13) {fQTmin = qt;} void SetQTmax(Int_t qt=125) {fQTmax = qt;} - void SetGain(Int_t size=1) { fFixedGain = size; } void SetZposition( Float_t valueC=69.7, Float_t valueA=373) { fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;} void SetPMTeff(Int_t ipmt); @@ -44,18 +43,6 @@ public: Float_t GetTimeDelayTVD() { return fTimeDelayTVD; } // Set various variable parameter defaults - void SetTimeDelayCablesCFD(Int_t ipmt,Float_t r=150) - { fTimeDelayCablesCFD[ipmt] = r;} - void SetTimeDelayCablesLED(Int_t ipmt,Float_t r=150) - { fTimeDelayCablesLED[ipmt] = r;} - void SetTimeDelayPMT(Int_t ipmt,Float_t r=5) - { fTimeDelayPMT[ipmt] = r;} - void SetTimeDelayElectronicCFD(Int_t ipmt,Float_t r=8) - { fTimeDelayElectronicCFD[ipmt] = r;} - void SetTimeDelayElectronicLED(Int_t ipmt,Float_t r=10) - { fTimeDelayElectronicLED[ipmt] = r;} - void SetVariableDelayLine(Int_t ipmt, Int_t v=0) - { fVariableDelayLine[ipmt] = v;} void SetSlewingLED(Int_t ipmt); void SetSlewingRec(Int_t ipmt); @@ -67,24 +54,12 @@ public: Int_t GetmV2channel() const { return fmV2Channel; } Int_t GetQTmin() const {return fQTmin;} Int_t GetQTmax() const {return fQTmax;} - Float_t GetGain(Int_t ipmt) const; Float_t GetZposition(Int_t i) const {return fT0zPosition[i];} TGraph * GetPMTeff(Int_t ipmt) const {return (TGraph*)fPMTeff.At(ipmt);} Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);} - Float_t GetTimeDelayCablesCFD(Int_t ipmt) const - {return fTimeDelayCablesCFD[ipmt]; } - Float_t GetTimeDelayCablesLED(Int_t ipmt) const - {return fTimeDelayCablesLED[ipmt]; } ; - - Float_t GetTimeDelayElectronicLED(Int_t ipmt) const - {return fTimeDelayElectronicLED[ipmt]; } ; - Float_t GetTimeDelayElectronicCFD(Int_t ipmt) const - {return fTimeDelayElectronicCFD[ipmt]; } ; - Int_t GetVariableDelayLine(Int_t ipmt) const - {return fVariableDelayLine[ipmt];} Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const; // {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);} @@ -95,6 +70,10 @@ public: Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const; // {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} + TGraph *GetWalk(Int_t ipmt ) const;// {return ((TF1*)fWalk.At(ipmt));} + Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const ;//{return ((TF1*)fWalk.At(ipmt))->Eval(mv);} + void SetWalk(Int_t ipmt) ; + Float_t GetTimeDelayCFD(Int_t ipmt); Float_t GetTimeDelayLED(Int_t ipmt); @@ -115,16 +94,11 @@ protected: Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25). Int_t fQTmin; //min time for QTC Int_t fQTmax; //max time fro QTC - Int_t fFixedGain; // - Float_t fTimeDelayCablesCFD[24]; //! time delay in cables - Float_t fTimeDelayCablesLED[24]; //! time delay in cables - Float_t fTimeDelayElectronicCFD[24]; //! time delay in electronic - Float_t fTimeDelayElectronicLED[24]; //! time delay in electronic - Float_t fTimeDelayPMT[24]; //! time delay in PMT Int_t fVariableDelayLine[24]; //time delay in VDL for trigger equvalizing TObjArray fSlewingLED; //array of slewing correction for each PMT TObjArray fSlewingRec; //array of slewing correction for Reconstruction TObjArray fPMTeff; //array PMT registration efficiency + TObjArray fWalk; //array time-amplitude walk Float_t fTimeDelayLED; // sum time delay for LED channel Float_t fTimeDelayCFD; // sum time delay for CFD channel @@ -134,9 +108,11 @@ protected: static AliT0CalibData * fgCalibData; // singleton for Calibration data static AliT0CalibData * fgLookUp; // singleton for Calibration data + static AliT0CalibData * fgSlewCorr; // singleton for Calibration data AliCDBEntry* fCalibentry ; // pointer to T0 calibration object AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table + AliCDBEntry* fSlewCorr ; // pointer to slewing correction ClassDef(AliT0Parameters,2) private: diff --git a/T0/AliT0RawData.cxx b/T0/AliT0RawData.cxx index 3a11f981b54..51cb2ef7667 100644 --- a/T0/AliT0RawData.cxx +++ b/T0/AliT0RawData.cxx @@ -33,11 +33,25 @@ #include "AliBitPacking.h" #include "AliFstream.h" #include "AliRunLoader.h" +#include "AliDAQ.h" ClassImp(AliT0RawData) //_____________________________________________________________________________ -AliT0RawData::AliT0RawData():TObject() + AliT0RawData::AliT0RawData():TObject(), + fVerbose(0), + fIndex(-1) , + fEventNumber(0), + fTimeCFD(new TArrayI(24)), + fADC1( new TArrayI(24)), + fTimeLED( new TArrayI(24)), + fADC0( new TArrayI(24)), + fFile(0x0), + fDataHeaderPos(0), + fDRMDataHeaderPos(0), + fTRMDataHeaderPos(0), + fDigits(0) + { /* - 48 channels (2 words each as in TOF DDL) for : @@ -57,22 +71,12 @@ and the same for amplified but A=Log(10*Amplitude). uncertances */ - fIndex=-1; - fDigits = NULL; - - fTimeCFD = new TArrayI(24); - fADC1 = new TArrayI(24); - fTimeLED = new TArrayI(24); - fADC0 = new TArrayI(24); - fFile = NULL; - fDataHeaderPos = 0; - fDRMDataHeaderPos = 0; - memset(fBuffer,0,512*sizeof(UInt_t)); - //open the output file char fileName[15]; - sprintf(fileName,"T0_%d.ddl", 0xd00); + strcpy(fileName,AliDAQ::DdlFileName("T0",0)); //The name of the output file fFile = new AliFstream(fileName); + memset(fBuffer,0,512*sizeof(UInt_t)); + //get event number AliRunLoader *runloader = AliRunLoader::GetRunLoader(); if (runloader) { @@ -81,7 +85,21 @@ uncertances } //_____________________________________________________________________________ -AliT0RawData::AliT0RawData(const AliT0RawData &r):TObject() + +AliT0RawData::AliT0RawData(const AliT0RawData &r):TObject(), + fVerbose(0), + fIndex(-1) , + fEventNumber(0), + fTimeCFD(new TArrayI(24)), + fADC1( new TArrayI(24)), + fTimeLED( new TArrayI(24)), + fADC0( new TArrayI(24)), + fFile(0x0), + fDataHeaderPos(0), + fDRMDataHeaderPos(0), + fTRMDataHeaderPos(0), + fDigits(0) + { // // AliT0rawData copy constructor @@ -133,16 +151,16 @@ void AliT0RawData::GetDigits(AliT0digit *fDigits) // Get the digits array - fDigits->GetTime(*fTimeCFD); - fDigits->GetADC(*fADC1); - fDigits->GetTimeAmp(*fTimeLED); - fDigits->GetADCAmp(*fADC0); + fDigits->GetTimeCFD(*fTimeCFD); + fDigits->GetQT0(*fADC1); + fDigits->GetTimeLED(*fTimeLED); + fDigits->GetQT1(*fADC0); Int_t meantime = fDigits->MeanTime(); Int_t timediff = fDigits->TimeDiff(); Int_t mult0=fDigits->SumMult(); Int_t mult1=fDigits->SumMult(); - Int_t timeA = fDigits->BestTimeLeft(); - Int_t timeC = fDigits->BestTimeRight(); + Int_t timeA = fDigits->BestTimeC(); + Int_t timeC = fDigits->BestTimeA(); TArrayI *allData = new TArrayI(110); @@ -487,11 +505,11 @@ Int_t AliT0RawData::RawDataT0(AliT0digit *fDigits) fIndex=-1; AliRawDataHeaderSim header; - //loop over TOF DDL files - //write Dummy DATA HEADER WriteDataHeader(kTRUE, kFALSE); GetDigits(fDigits); //write packing digits + + fFile->WriteBuffer((char*) fBuffer,((fIndex+1)*sizeof(UInt_t))); //write real data header on its place WriteDataHeader(kFALSE, kFALSE); diff --git a/T0/AliT0RawData.h b/T0/AliT0RawData.h index fd3ed44b090..070f7823124 100644 --- a/T0/AliT0RawData.h +++ b/T0/AliT0RawData.h @@ -63,24 +63,17 @@ class AliT0RawData : public TObject { UInt_t fBuffer[512]; // buffer for writing rawdata Int_t fIndex; //number of 32 words to be stored into the output file Int_t fEventNumber; // current event number - - Int_t fTimeDiff ; //time difference - Int_t fMeanTime ; // average time - ALICE start signal - Int_t fBestTimeLeft; //first particle on the left - Int_t fBestTimeRight; //first particle on the right - Int_t fSumMult; // sum multiplicity TArrayI * fTimeCFD; //TDC on the each PMT TArrayI * fADC1; //QTC (ADC) on the each PMT TArrayI * fTimeLED; // TDC with amplified signal TArrayI * fADC0; //QTC amplified AliFstream* fFile; //logical name of the I/O file - UInt_t fDataHeaderPos;//Data header position - UInt_t fDRMDataHeaderPos;//Data DRM header position - UInt_t fTRMDataHeaderPos;//Data TRM header position - Int_t fWordsIn1stTRM; // Number of word in 1st TRM + UInt_t fDataHeaderPos;//Data header position + UInt_t fDRMDataHeaderPos;//Data DRM header position + UInt_t fTRMDataHeaderPos;//Data TRM header position AliT0digit *fDigits; //! The T0 digits manager - - ClassDef(AliT0RawData,1) // T0 raw data class + + ClassDef(AliT0RawData,2) // T0 raw data class }; diff --git a/T0/AliT0RawReader.cxx b/T0/AliT0RawReader.cxx index dd1e72a9593..7171dd0c2c3 100644 --- a/T0/AliT0RawReader.cxx +++ b/T0/AliT0RawReader.cxx @@ -16,6 +16,7 @@ ClassImp(AliT0RawReader) fRawReader(rawReader), fData(NULL), fPosition(0) + { // // create an object to read T0raw digits @@ -24,12 +25,22 @@ ClassImp(AliT0RawReader) fRawReader->Reset(); fRawReader->Select("T0"); - + cout<<" AliT0RawReader::AliT0RawReaderfRawReader->Select "<GetChannel(iTRM,itdc,ichain,ichannel); - // cout<<" RawReader::Next ::"<GetChannel(iTRM,itdc,ichain,ichannel); - - if(fAllData[koef][0] == 0) fAllData[koef][0]=time; - // if(allData[koef+55] == 0) allData[koef+55]=time; // yield only 1st particle - } - } - meanTime = fAllData[49][0]; // T0 !!!!!! - timeDiff = fAllData[50][0]; - - word = GetNextWord(); - word = GetNextWord(); + + for (Int_t ntrm=0; ntrm< numTRM; ntrm++) + { + //TRMheader + word = GetNextWord(); + numberOfWordsInTRM=AliBitPacking::UnpackWord(word,4,16); + iTRM=AliBitPacking::UnpackWord(word,0,3); + + //chain header + Int_t ichain=0; + word = GetNextWord(); + + for (Int_t i=0; iGetChannel(iTRM,itdc,ichain,ichannel); + // cout<<" RawReader::Next ::"< #include "AliRunLoader.h" -#include "AliRun.h" #include #include "AliLog.h" +#include "AliT0Loader.h" #include #include "AliT0RecPoint.h" -#include "AliT0.h" #include "AliRawReader.h" #include "AliT0RawReader.h" -#include "AliT0Loader.h" #include "AliT0digit.h" #include "AliT0Reconstructor.h" #include "AliT0Parameters.h" +#include "AliT0Calibrator.h" #include "AliCDBLocal.h" #include "AliCDBStorage.h" #include "AliCDBManager.h" @@ -42,63 +41,72 @@ ClassImp(AliT0Reconstructor) -//____________________________________________________________________ -void -AliT0Reconstructor::Init(AliRunLoader* runLoader,TTree* digitsTree ) const + AliT0Reconstructor:: AliT0Reconstructor(): AliReconstructor(), + fDigits(NULL), + fTree(0x0), + fZposition(0) + { + AliDebug(1,"Start reconstructor "); +} +//____________________________________________________________________ - // Initialize the reconstructor - AliDebug(2, Form("Init called with runloader 0x%x", runLoader)); - - // Initialize the parameters - AliT0Loader* pStartLoader = (AliT0Loader*) runLoader->GetLoader("T0Loader"); - - pStartLoader->LoadDigits("READ"); +AliT0Reconstructor::AliT0Reconstructor(const AliT0Reconstructor &r): + fDigits(NULL), + fTree(0x0), + fZposition(0) + +{ + // + // AliT0Reconstructor copy constructor + // - digitsTree = pStartLoader->TreeD(); + ((AliT0Reconstructor &) r).Copy(*this); } -//____________________________________________________________________ - void AliT0Reconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const +//_____________________________________________________________________________ +AliT0Reconstructor &AliT0Reconstructor::operator=(const AliT0Reconstructor &r) { - //T0 raw data-> digits conversion - // reconstruct time information from raw data - AliT0 *baseT0; - baseT0->Raw2Digits(rawReader, digitsTree); - + // + // Assignment operator + // + + if (this != &r) ((AliT0Reconstructor &) r).Copy(*this); + return *this; } + +//_____________________________________________________________________________ + void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const - //void AliT0Reconstructor::Reconstruct(AliRunLoader *runLoader) const + { // T0 digits reconstruction // T0RecPoint writing - //Q->T-> coefficients !!!! should be asked!!! - // Float_t ph2MIP=500; - Float_t gain[24], timeDelayCFD[24], timeDelayLED[24]; + + Float_t timeDelayLED[24]; Float_t zdetA,zdetC; - TObjArray slewingLED; + TObjArray slewingLEDrec; + TObjArray walk; - TArrayI * fADC = new TArrayI(24); - TArrayI * fTimeCFD = new TArrayI(24); - TArrayI * fADCLED = new TArrayI(24); - TArrayI * fTimeLED = new TArrayI(24); - + TArrayI * timeCFD = new TArrayI(24); + TArrayI * timeLED = new TArrayI(24); + TArrayI * chargeQT0 = new TArrayI(24); + TArrayI * chargeQT1 = new TArrayI(24); + AliT0Parameters* param = AliT0Parameters::Instance(); param->Init(); + AliT0Calibrator *calib=new AliT0Calibrator(); Int_t mV2Mip = param->GetmV2Mip(); //mV2Mip = param->GetmV2Mip(); 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); - //gain[i] = 1; - slewingLED.AddAtAndExpand(param->GetSlew(i),i); + TGraph* gr = param ->GetSlewRec(i); + slewingLEDrec.AddAtAndExpand(gr,i) ; } zdetC = param->GetZposition(0); zdetA = param->GetZposition(1); @@ -114,19 +122,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const return; } - digitsTree->GetEvent(0); - digitsTree->GetEntry(0); - brDigits->GetEntry(0); - fDigits->GetTime(*fTimeCFD); - fDigits->GetADC(*fADC); - fDigits->GetTimeAmp(*fTimeLED); - fDigits->GetADCAmp(*fADCLED); - - - Float_t besttimeright=999999; - Float_t besttimeleft=999999; - Int_t pmtBestRight=99999; - Int_t pmtBestLeft=99999; + digitsTree->GetEvent(0); + digitsTree->GetEntry(0); + brDigits->GetEntry(0); + fDigits->GetTimeCFD(*timeCFD); + fDigits->GetTimeLED(*timeLED); + fDigits->GetQT0(*chargeQT0); + fDigits->GetQT1(*chargeQT1); + + Float_t besttimeA=999999; + Float_t besttimeC=999999; + Int_t pmtBestA=99999; + Int_t pmtBestC=99999; Float_t timeDiff=999999, meanTime=0; @@ -136,15 +143,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const 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]; - // Float_t adc_digPs = channelWidth * Float_t (fADCLED->At(ipmt)) ; - // adc[ipmt] = TMath::Exp(adc_digPs/1000) /gain[ipmt]; - adc[ipmt]=1; - AliDebug(1,Form(" time %f ps, adc %f mv in MIP %i\n ", - time[ipmt], adc[ipmt], Int_t (adc[ipmt]/mV2Mip +0.5))); + if(timeCFD->At(ipmt)>0 ){ + Int_t qt0= chargeQT0->At(ipmt); + Int_t qt1= chargeQT1->At(ipmt); + if((qt1-qt0)>0) adc[ipmt] = TMath::Exp( Double_t (channelWidth*(qt1-qt0)/1000)); + time[ipmt] = channelWidth * (calib-> WalkCorrection( ipmt,qt1 , timeCFD->At(ipmt) ) ) ; + + //LED + Double_t sl = (timeLED->At(ipmt) - timeCFD->At(ipmt)- (1000.*timeDelayLED[ipmt]/channelWidth))*channelWidth; + Double_t qt=((TGraph*)slewingLEDrec.At(ipmt))->Eval(sl/1000.); frecpoints->SetTime(ipmt,time[ipmt]); frecpoints->SetAmp(ipmt,adc[ipmt]); + frecpoints->SetAmpLED(ipmt,qt); } else { time[ipmt] = 0; @@ -154,27 +164,27 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const for (Int_t ipmt=0; ipmt<12; ipmt++){ if(time[ipmt] > 1 ) { - if(time[ipmt] 1) { - if(time[ipmt]SetTimeBestRight(Int_t(besttimeright)); - if( besttimeleft != 999999 ) frecpoints->SetTimeBestLeft(Int_t(besttimeleft)); - AliDebug(1,Form(" besttimeA %f ps, besttimeC %f ps",besttimeright, besttimeleft)); + if(besttimeA !=999999) frecpoints->SetTimeBestA(Int_t(besttimeA)); + if( besttimeC != 999999 ) frecpoints->SetTimeBestC(Int_t(besttimeC)); + AliDebug(1,Form(" besttimeA %f ps, besttimeC %f ps",besttimeA, besttimeC)); Float_t c = 0.0299792; // cm/ps Float_t vertex = 0; - if(besttimeright !=999999 && besttimeleft != 999999 ){ - timeDiff = besttimeleft - besttimeright; - meanTime = (besttimeright + besttimeleft)/2.; + if(besttimeA !=999999 && besttimeC != 999999 ){ + timeDiff = besttimeC - besttimeA; + meanTime = (besttimeA + besttimeC)/2.; vertex = c*(timeDiff)/2.; //-(lenr-lenl))/2; AliDebug(1,Form(" timeDiff %f ps, meanTime %f ps, vertex %f cm",timeDiff, meanTime,vertex )); frecpoints->SetVertex(vertex); @@ -185,6 +195,121 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const } +//_______________________________________________________________________ + +void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) const +{ +// T0 raw -> +// T0RecPoint writing + + //Q->T-> coefficients !!!! should be asked!!! + Float_t timeDelayLED[24]; + Float_t zdetA,zdetC; + TObjArray slewingLEDrec; + TObjArray walk; + + TArrayI * timeCFD = new TArrayI(24); + TArrayI * timeLED = new TArrayI(24); + TArrayI * chargeQT0 = new TArrayI(24); + TArrayI * chargeQT1 = new TArrayI(24); + + AliT0RawReader myrawreader(rawReader); + if (!myrawreader.Next()) + AliDebug(1,Form(" no raw data found!! %i", myrawreader.Next())); + Int_t allData[110][5]; + for (Int_t i=0; i<110; i++) { + allData[i][0]=myrawreader.GetData(i,0); + } + + AliT0Parameters* param = AliT0Parameters::Instance(); + param->Init(); + AliT0Calibrator *calib=new AliT0Calibrator(); + + Int_t mV2Mip = param->GetmV2Mip(); + //mV2Mip = param->GetmV2Mip(); + Int_t channelWidth = param->GetChannelWidth() ; + + for (Int_t i=0; i<24; i++){ + TGraph* gr = param ->GetSlewRec(i); + slewingLEDrec.AddAtAndExpand(gr,i) ; + } + + zdetC = param->GetZposition(0); + zdetA = param->GetZposition(1); + + for (Int_t in=0; in<24; in++) + { + timeLED->AddAt(allData[in+1][0],in); + timeCFD->AddAt(allData[in+25][0],in); + chargeQT1->AddAt(allData[in+55][0],in); + chargeQT0->AddAt(allData[in+79][0],in); + AliDebug(10, Form(" readed Raw %i %i %i %i %i", in, timeLED->At(in),timeCFD->At(in),chargeQT0->At(in),chargeQT1->At(in))); + } + + Float_t besttimeA=999999; + Float_t besttimeC=999999; + Int_t pmtBestA=99999; + Int_t pmtBestC=99999; + Float_t timeDiff=999999, meanTime=0; + + + AliT0RecPoint* frecpoints= new AliT0RecPoint (); + + recTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints, 405,1); + + + Float_t time[24], adc[24]; + for (Int_t ipmt=0; ipmt<24; ipmt++) { + if(timeCFD->At(ipmt)>0 ){ + Int_t qt0= chargeQT0->At(ipmt); + Int_t qt1= chargeQT1->At(ipmt); + if((qt1-qt0)>0) adc[ipmt] = TMath::Exp( Double_t (channelWidth*(qt1-qt0)/1000)); + time[ipmt] = channelWidth * (calib-> WalkCorrection( ipmt,qt1 , timeCFD->At(ipmt) ) ) ; + Double_t sl = (timeLED->At(ipmt) - timeCFD->At(ipmt)- (1000.*timeDelayLED[ipmt]/channelWidth))*channelWidth; + Double_t qt=((TGraph*)slewingLEDrec.At(ipmt))->Eval(sl/1000.); + frecpoints->SetTime(ipmt,time[ipmt]); + frecpoints->SetAmp(ipmt,adc[ipmt]); + frecpoints->SetAmpLED(ipmt,qt); + } + else { + time[ipmt] = 0; + adc[ipmt] = 0; + } + } + + for (Int_t ipmt=0; ipmt<12; ipmt++){ + if(time[ipmt] > 1 ) { + if(time[ipmt] 1) { + if(time[ipmt]SetTimeBestA(Int_t(besttimeA)); + if( besttimeC != 999999 ) frecpoints->SetTimeBestC(Int_t(besttimeC)); + AliDebug(1,Form(" besttimeA %f ps, besttimeC %f ps",besttimeA, besttimeC)); + Float_t c = 0.0299792; // cm/ps + Float_t vertex = 0; + if(besttimeA !=999999 && besttimeC != 999999 ){ + timeDiff = besttimeC - besttimeA; + meanTime = (besttimeA + besttimeC)/2.; + vertex = c*(timeDiff)/2.; //-(lenr-lenl))/2; + AliDebug(1,Form(" timeDiff %f ps, meanTime %f ps, vertex %f cm",timeDiff, meanTime,vertex )); + frecpoints->SetVertex(vertex); + frecpoints->SetMeanTime(Int_t(meanTime)); + + } + recTree->Fill(); +} +//____________________________________________________________ + void AliT0Reconstructor::FillESD(AliRunLoader* runLoader, AliESD *pESD) const { @@ -224,9 +349,10 @@ void AliT0Reconstructor::FillESD(AliRunLoader* runLoader, AliESD *pESD) const brRec->GetEntry(0); Float_t timeStart, Zposition, amp[24], time[24]; + Int_t mean0 = 12450; Int_t i; Zposition = frecpoints -> GetVertex(); - timeStart = frecpoints -> GetMeanTime(); + timeStart = frecpoints -> GetMeanTime() - mean0; for ( i=0; i<24; i++) { time[i] = Float_t (frecpoints -> GetTime(i)) / 1000.; // ps to ns amp[i] = frecpoints -> GetAmp(i); diff --git a/T0/AliT0Reconstructor.h b/T0/AliT0Reconstructor.h index 797296d680e..be347cc94fc 100644 --- a/T0/AliT0Reconstructor.h +++ b/T0/AliT0Reconstructor.h @@ -12,31 +12,33 @@ class AliRunLoader; class AliT0Reconstructor: public AliReconstructor { public: - AliT0Reconstructor(): AliReconstructor() {}; + AliT0Reconstructor(); virtual ~AliT0Reconstructor() {}; + AliT0Reconstructor( const AliT0Reconstructor& ); + AliT0Reconstructor& operator=(const AliT0Reconstructor&); - virtual void Init(AliRunLoader* runLoader, TTree* fdigits ) const; - virtual void ConvertDigits( AliRawReader* rawReader, TTree* fdigits) const; - virtual void Reconstruct(TTree* fdigits, TTree * frecpoints) const; - // virtual void Reconstruct(TTree* , TTree * ) const {}; + + virtual void Reconstruct(TTree* fdigits, TTree * frecpoints) const; + // virtual void Reconstruct(TTree* , TTree * ) const {}; +// virtual void Reconstruct(TTree* , TTree * ) const {}; virtual void Reconstruct(AliRunLoader* , AliRawReader* ) const {}; virtual void Reconstruct(AliRawReader* ) const {}; - virtual void Reconstruct(AliRawReader* , TTree*) const {}; + virtual void Reconstruct(AliRawReader*rawReader , TTree* recTree) const; virtual void Reconstruct(AliRunLoader* ) const {}; virtual void FillESD(AliRunLoader* runLoader, AliESD* esd) const; virtual void FillESD(AliRunLoader* , AliRawReader*, AliESD* ) const {}; virtual void FillESD( AliRawReader*, TTree*, AliESD* ) const {}; virtual void FillESD( TTree*, TTree*, AliESD* ) const {}; - virtual Bool_t HasLocalReconstruction() const {return kTRUE;}; - virtual Bool_t HasDigitConversion() const {return kTRUE;}; + virtual Bool_t HasLocalReconstruction() const {return kTRUE;} + virtual Bool_t HasDigitConversion() const {return kFALSE;} public: - // AliRunLoader* fRunLoader; // Run loader passed to Init - // AliT0digit *fDigits ; // digits + AliT0digit *fDigits ; // digits + TTree* fTree; Float_t fZposition; // vertex position - // AliT0 *baseT0; + protected: ClassDef(AliT0Reconstructor, 0) // class for the T0 reconstruction diff --git a/T0/AliT0SetCDB.C b/T0/AliT0SetCDB.C index 93b3e521280..855c77c4354 100644 --- a/T0/AliT0SetCDB.C +++ b/T0/AliT0SetCDB.C @@ -27,14 +27,18 @@ void AliT0SetCDB() { TControlBar *menu = new TControlBar("vertical","T0 CDB"); - menu->AddButton("Set Calib","SetCC()", - "Set calibration coefficients"); - menu->AddButton("Set Align","SetAC()", + menu->AddButton("Set time delay","SetTimeDelay()", + "Set time dalay"); + menu->AddButton("Set walk","SetWalk()", + "Set slewing coorection"); + menu->AddButton("Set Align","SetAC()", "Set alignment coefficients"); menu->AddButton("Set LookUpTable","SetLookUp()", "Set LookUp table"); - menu->AddButton("Read calibration CC","GetCC()", - "Read calibration coefficients"); + menu->AddButton("Read time delay","GetTimeDelay()", + "Read time delay"); + menu->AddButton("Read walk","GetWalk()", + "Read amplitude-time correction"); menu->AddButton("Read alignment CC","GetAC()", "Read face detector position "); menu->AddButton("Read Lookup","GetLookUp()", @@ -85,7 +89,7 @@ void SetAC() } } //------------------------------------------------------------------------ -void SetCC() +void SetTimeDelay() { // Writing calibration coefficients into the Calibration DB // Arguments: @@ -99,27 +103,66 @@ void SetCC() DBFolder ="local://Calib"; firstRun = 0; lastRun = 10; - objFormat = "T0 initial gain factors, time delay, slewnig"; + objFormat = "T0 initial time delay"; AliT0CalibData *calibda=new AliT0CalibData("T0"); - Float_t fGain = 1; - Float_t fTimeDelay = 200; + Float_t fTimeDelay = 1000; + + for(Int_t ipmt=0; ipmt<24; ipmt++) { + calibda->SetTimeDelayCFD(fTimeDelay+ipmt*100,ipmt); + // calibda->SetTimeDelayLED(fTimeDelay,ipmt); + calibda->SetTimeDelayLED(0,ipmt); + } + calibda->Print(); + //Store calibration data into database + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + + // AliCDBManager::Instance()->SetSpecificStorage("T0",DBFolder.Data()); + + AliCDBMetaData md; + md.SetComment(objFormat); + md.SetBeamPeriod(beamPeriod); + md.SetResponsible("Alla"); + TString fPath="T0/Calib/TimeDelay"; + + + // AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("T0"); + AliCDBStorage* storage = AliCDBManager::Instance()->GetDefaultStorage(); + if(storage) { + AliCDBId id(fPath.Data(),firstRun,lastRun); + storage->Put(calibda, id, &md); + } +} + +//------------------------------------------------------------------------ +void SetWalk() +{ + // Writing calibration coefficients into the Calibration DB + // Arguments: + + TString DBFolder; + Int_t firstRun = 0; + Int_t lastRun = 10; + Int_t beamPeriod = 1; + char* objFormat = ""; + + DBFolder ="local://Calib"; + firstRun = 0; + lastRun = 10; + objFormat = "T0 initial slewnig correction"; + + AliT0CalibData *calibda=new AliT0CalibData("T0"); + + TRandom rn; for(Int_t ipmt=0; ipmt<24; ipmt++) { - calibda->SetGain (fGain,ipmt); - calibda->SetTimeDelayCFD(fTimeDelay,ipmt); - calibda->SetTimeDelayLED(fTimeDelay,ipmt); - calibda->SetWalk(ipmt,"data/re.root"); + calibda->SetWalk(ipmt,"data/CFD-Amp.txt"); calibda->SetSlewingLED(ipmt,"data/CFD-LED.txt"); calibda->SetSlewingRec(ipmt,"data/CFD-LED.txt"); - Double_t value=calibda->GetSlewingLED(ipmt,300); - Double_t rec= calibda->GetSlewingRec(ipmt, value); - cout<<" in "<Print(); //Store calibration data into database AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); @@ -129,7 +172,7 @@ void SetCC() md.SetComment(objFormat); md.SetBeamPeriod(beamPeriod); md.SetResponsible("Alla"); - TString fPath="T0/Calib/Gain_TimeDelay_Slewing_Walk"; + TString fPath="T0/Calib/Slewing_Walk"; // AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("T0"); @@ -141,7 +184,7 @@ void SetCC() } //------------------------------------------------------------------------ -void GetCC() +void GetTimeDelay() { // Read calibration coefficients into the Calibration DB // Arguments: @@ -151,15 +194,33 @@ void GetCC() DBFolder ="local://Calib"; Int_t nRun=gAlice->GetRunNumber(); - AliCDBManager *man = AliCDBManager::Instance(); - AliCDBStorage *stor2 = man->GetStorage("local://Calib"); - AliCDBEntry *entry; - entry = stor2->Get("T0/Calib/Gain_TimeDelay_Slewing_Walk"); - + AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT"); + AliCDBEntry* entry = stor->Get("T0/Calib/TimeDelay",0); + AliT0CalibData *clb = (AliT0CalibData*)entry->GetObject(); clb->Print(); } //------------------------------------------------------------------------ +void GetWalk() +{ + // Read calibration coefficients into the Calibration DB + // Arguments: + + TString DBFolder; + + DBFolder ="local://Calib"; + Int_t nRun=gAlice->GetRunNumber(); + + AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT"); + AliCDBEntry* entry = stor->Get("T0/Calib/Slewing_Walk",0); + + AliT0CalibData *clb = (AliT0CalibData*)entry->GetObject(); + Int_t ipmt=0; + // cin>>" enter channel number">>ipmt; + TGraph *gr = clb->GetWalk(ipmt); + gr->Draw("AP"); +} +//------------------------------------------------------------------------ void GetAC() { // Read align coefficients into the Calibration DB diff --git a/T0/AliT0Trigger.cxx b/T0/AliT0Trigger.cxx index 1450f01f5de..1a3736268d5 100644 --- a/T0/AliT0Trigger.cxx +++ b/T0/AliT0Trigger.cxx @@ -76,13 +76,13 @@ void AliT0Trigger::Trigger() return; } brDigits->GetEntry(0); - Int_t besttimeright = fDigits->BestTimeRight(); - Int_t besttimeleft = fDigits->BestTimeLeft(); + Int_t besttimeA = fDigits->BestTimeA(); + Int_t besttimeC = fDigits->BestTimeC(); Int_t timeDiff = fDigits->TimeDiff(); Int_t sumMult= fDigits->SumMult(); - if (besttimeright > 0 && besttimeright <99999 ) SetInput("START_A_L0"); - if (besttimeleft>0 && besttimeleft<99999) SetInput("START_C_L0"); + if (besttimeA > 0 && besttimeA <99999 ) SetInput("START_A_L0"); + if (besttimeC>0 && besttimeC<99999) SetInput("START_C_L0"); if (timeDiff >5500 && timeDiff < 6500) SetInput("START_Vertex_L0"); if (sumMult > 175) SetInput("START_Centr_L0"); if (sumMult>155 && sumMult <= 175) SetInput("START_SemiCentral_L0");; diff --git a/T0/AliT0digit.cxx b/T0/AliT0digit.cxx index 62b96e10470..5f108a37c16 100644 --- a/T0/AliT0digit.cxx +++ b/T0/AliT0digit.cxx @@ -16,12 +16,12 @@ /* $Id$ */ ///////////////////////////////////////////////////////////////////////// // Class AliT0digit for T0 digits -// fTimeRight - right side TOF signal -// fTimeLeft - left side TOF signal -// fTimeBestRight - TOF first particle on the right side -// TimeBestLeft - TOF first particle on the left side -// fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. T0 signal -// fTimeDiff = fTimeBestRight - TimeBestLeft +// fTimeA - right side TOF signal +// fTimeC - left side TOF signal +// fTimeBestA - TOF first particle on the right side +// TimeBestC - TOF first particle on the left side +// fTimeAverage = (fTimeBestA + TimeBestC ) /2. T0 signal +// fTimeDiff = fTimeBestA - TimeBestC // /////////////////////////////////////////////////////////////////////// @@ -31,115 +31,117 @@ ClassImp(AliT0digit) //----------------------------------------------- - AliT0digit::AliT0digit() :TObject() -{ - - fTimeAverage = 99999; - fTimeDiff = 99999; - fBestTimeRight = 99999; - fBestTimeLeft = 99999; + AliT0digit::AliT0digit() :TObject(), + fTimeCFD(new TArrayI(24)), + fQT0( new TArrayI(24)), + fTimeLED( new TArrayI(24)), + fQT1( new TArrayI(24)), + fTimeAverage(99999), + fTimeDiff(99999), + fBestTimeA(99999), + fBestTimeC (99999), + fSumMult(0) - fTime = new TArrayI(24); - fADC = new TArrayI(24); - fTimeAmp = new TArrayI(24); - fADCAmp = new TArrayI(24); +{ + // } -//----------------------------------- +//_____________________________________________________________________________ + AliT0digit::~AliT0digit() { // destructor - delete fTime; - delete fADC; - delete fTimeAmp; - delete fADCAmp; + delete fTimeCFD; + delete fQT0; + delete fTimeLED; + delete fQT1; } //----------------------------------- -void AliT0digit::SetTime (TArrayI &o) +void AliT0digit::SetTimeCFD (TArrayI &o) { //////////////////////////////////////// - fTime = new TArrayI(24); + fTimeCFD = new TArrayI(24); Int_t i; for (i=0; i<24; i++) { Int_t buf=o.At(i); - fTime->AddAt(buf,i); + fTimeCFD->AddAt(buf,i); } } //-------------------------------------------- -void AliT0digit::GetTime (TArrayI &o) +void AliT0digit::GetTimeCFD (TArrayI &o) { // Int_t i; for (i=0; i<24; i++) { - o[i]=fTime->At(i); + o[i]=fTimeCFD->At(i); } } //-------------------------------------------- -void AliT0digit::GetADC (TArrayI &o) +void AliT0digit::GetQT0 (TArrayI &o) { // Int_t i; for (i=0; i<24; i++) { - o[i]=fADC->At(i); + o[i]=fQT0->At(i); } } //-------------------------------------------- -void AliT0digit::SetADC (TArrayI &o) +void AliT0digit::SetQT0 (TArrayI &o) { // - fADC = new TArrayI(24); + fQT0 = new TArrayI(24); Int_t i; for (i=0; i<24; i++) { Int_t buf=(o.At(i)); - fADC->AddAt(buf,i); + fQT0->AddAt(buf,i); } } //----------------------------------- -void AliT0digit::SetTimeAmp (TArrayI &o) +void AliT0digit::SetTimeLED (TArrayI &o) { //////////////////////////////////////// - fTimeAmp = new TArrayI(24); + fTimeLED = new TArrayI(24); Int_t i; for (i=0; i<24; i++) { Int_t buf=o.At(i); - fTimeAmp->AddAt(buf,i); + fTimeLED->AddAt(buf,i); } } //-------------------------------------------- -void AliT0digit::GetTimeAmp (TArrayI &o) +void AliT0digit::GetTimeLED (TArrayI &o) { // Int_t i; for (i=0; i<24; i++) { - o[i]=fTimeAmp->At(i); + o[i]=fTimeLED->At(i); } } //-------------------------------------------- -void AliT0digit::GetADCAmp (TArrayI &o) +void AliT0digit::GetQT1 (TArrayI &o) { // Int_t i; for (i=0; i<24; i++) { - o[i]=fADCAmp->At(i); + o[i]=fQT1->At(i); } } //-------------------------------------------- -void AliT0digit::SetADCAmp (TArrayI &o) +void AliT0digit::SetQT1 (TArrayI &o) { // - fADCAmp = new TArrayI(24); + fQT1 = new TArrayI(24); Int_t i; for (i=0; i<24; i++) { Int_t buf=(o.At(i)); - fADCAmp->AddAt(buf,i); + fQT1->AddAt(buf,i); } } diff --git a/T0/AliT0digit.h b/T0/AliT0digit.h index 1d41108e92a..d23a74a65ec 100644 --- a/T0/AliT0digit.h +++ b/T0/AliT0digit.h @@ -14,44 +14,46 @@ class AliT0digit: public TObject { public: AliT0digit(); virtual ~AliT0digit(); - Int_t BestTimeRight() {return fBestTimeRight;} - Int_t BestTimeLeft() {return fBestTimeLeft;} + + Int_t BestTimeA() {return fBestTimeA;} + Int_t BestTimeC() {return fBestTimeC;} Int_t MeanTime() {return fTimeAverage;} Int_t TimeDiff() {return fTimeDiff;} Int_t SumMult() {return fSumMult;} - void SetTimeBestRight( Int_t time) {fBestTimeRight = time;} - void SetTimeBestLeft( Int_t time) {fBestTimeLeft = time;} + void SetTimeBestA( Int_t time) {fBestTimeA = time;} + void SetTimeBestC( Int_t time) {fBestTimeC = time;} void SetMeanTime(Int_t time) {fTimeAverage=time;} void SetDiffTime(Int_t time) {fTimeDiff=time;} void SetSumMult(Int_t time) {fSumMult=time;} - virtual void SetTime (TArrayI &o); - virtual void GetTime (TArrayI &o); - virtual void SetADC (TArrayI &o); - virtual void GetADC (TArrayI &o); + virtual void SetTimeCFD (TArrayI &o); + virtual void GetTimeCFD (TArrayI &o); + virtual void SetQT0 (TArrayI &o); + virtual void GetQT0 (TArrayI &o); - virtual void SetTimeAmp (TArrayI &o); - virtual void GetTimeAmp (TArrayI &o); - virtual void SetADCAmp (TArrayI &o); - virtual void GetADCAmp (TArrayI &o); + virtual void SetTimeLED (TArrayI &o); + virtual void GetTimeLED (TArrayI &o); + virtual void SetQT1 (TArrayI &o); + virtual void GetQT1 (TArrayI &o); + private: - Int_t fBestTimeRight; // TOF first particle on the right - Int_t fBestTimeLeft; // TOF first particle on the left + TArrayI *fTimeCFD; // array's TDC + TArrayI *fQT0; // array's ADC + TArrayI *fTimeLED; // array's TDC + TArrayI *fQT1; // array's ADC Int_t fTimeAverage; // mean time (start signal) Int_t fTimeDiff; // time difference (vertex position) - - TArrayI *fTime; // array's TDC - TArrayI *fADC; // array's ADC - TArrayI *fTimeAmp; // array's TDC - TArrayI *fADCAmp; // array's ADC + Int_t fBestTimeA; // TOF first particle on the right + Int_t fBestTimeC; // TOF first particle on the left Int_t fSumMult; //multiplisity AliT0digit( const AliT0digit& ); AliT0digit& operator=(const AliT0digit&); - ClassDef(AliT0digit,4) //Digit (Header) object for set:T0 + ClassDef(AliT0digit,5) //Digit (Header) object for set:T0 }; + typedef AliT0digit AliSTARTdigit; // for backward compatibility #endif diff --git a/T0/AliT0hit.cxx b/T0/AliT0hit.cxx index 6b51a156837..2a6eaf6beec 100644 --- a/T0/AliT0hit.cxx +++ b/T0/AliT0hit.cxx @@ -67,9 +67,26 @@ ClassImp(AliT0hit) -AliT0hit::AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): - AliHit(shunt, track) + + AliT0hit::AliT0hit(): AliHit(), + fVolume(0), + fPmt(0), + fParticle(0), + fEtot(0), + fTime(0) + { + // +} +AliT0hit::AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): + AliHit(shunt, track), + fVolume(0), + fPmt(0), + fParticle(0), + fEtot(0), + fTime(0) + + { //Normal T0 hit ctor fVolume = vol[0]; diff --git a/T0/AliT0hit.h b/T0/AliT0hit.h index 482720d7d7f..284d36bcb8f 100644 --- a/T0/AliT0hit.h +++ b/T0/AliT0hit.h @@ -12,7 +12,7 @@ class AliT0hit : public AliHit { public: - AliT0hit(){}//Empty ctor + AliT0hit();//Empty ctor AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); virtual ~AliT0hit(){}//Empty virtual dtor Int_t Volume() const {return fVolume;} diff --git a/T0/T0baseLinkDef.h b/T0/T0baseLinkDef.h index f62f8f1ebac..7a90dd129fd 100644 --- a/T0/T0baseLinkDef.h +++ b/T0/T0baseLinkDef.h @@ -9,8 +9,8 @@ #pragma link off all functions; +#pragma link C++ class AliT0+; #pragma link C++ class AliT0digit+; -#pragma link C++ class AliT0Loader+; #pragma link C++ class AliT0Trigger+; #pragma link C++ class AliT0CalibData+; #pragma link C++ class AliT0Parameters+; diff --git a/T0/T0recLinkDef.h b/T0/T0recLinkDef.h index 2ecb187379c..9bfda5119c6 100644 --- a/T0/T0recLinkDef.h +++ b/T0/T0recLinkDef.h @@ -15,5 +15,6 @@ #pragma link C++ class AliT0RecPoint+; #pragma link C++ class AliT0Reconstructor+; #pragma link C++ class AliT0RawReader+; +#pragma link C++ class AliT0Calibrator+; #endif diff --git a/T0/T0simLinkDef.h b/T0/T0simLinkDef.h index 88135bf87bc..d4105874a04 100644 --- a/T0/T0simLinkDef.h +++ b/T0/T0simLinkDef.h @@ -15,7 +15,6 @@ #pragma link C++ typedef AliSTARTDigitizer; #pragma link C++ typedef AliSTARTRawData; -#pragma link C++ class AliT0+; #pragma link C++ class AliT0v0+; #pragma link C++ class AliT0v1+; #pragma link C++ class AliT0hit+; diff --git a/T0/libT0base.pkg b/T0/libT0base.pkg index e8999cb69ac..34bcc4e55e4 100644 --- a/T0/libT0base.pkg +++ b/T0/libT0base.pkg @@ -1,7 +1,7 @@ #-*- Mode: Makefile -*- # $Id$ -SRCS= AliT0digit.cxx AliT0Loader.cxx AliT0Trigger.cxx \ +SRCS= AliT0.cxx AliT0digit.cxx AliT0Trigger.cxx \ AliT0CalibData.cxx AliT0Parameters.cxx AliT0LookUpValue.cxx HDRS= $(SRCS:.cxx=.h) diff --git a/T0/libT0rec.pkg b/T0/libT0rec.pkg index 5d0d86619a7..24efca5c3fc 100644 --- a/T0/libT0rec.pkg +++ b/T0/libT0rec.pkg @@ -1,7 +1,7 @@ #-*- Mode: Makefile -*- # $Id$ -SRCS= AliT0RecPoint.cxx AliT0Reconstructor.cxx AliT0RawReader.cxx +SRCS= AliT0RecPoint.cxx AliT0Reconstructor.cxx AliT0RawReader.cxx AliT0Calibrator.cxx HDRS= $(SRCS:.cxx=.h) diff --git a/T0/libT0sim.pkg b/T0/libT0sim.pkg index 456f95464bd..1856f29ca5c 100644 --- a/T0/libT0sim.pkg +++ b/T0/libT0sim.pkg @@ -1,7 +1,7 @@ #-*- Mode: Makefile -*- # $Id$ -SRCS= AliT0.cxx AliT0v0.cxx AliT0v1.cxx AliT0hit.cxx AliT0Digitizer.cxx AliT0RawData.cxx +SRCS= AliT0v0.cxx AliT0v1.cxx AliT0hit.cxx AliT0Digitizer.cxx AliT0RawData.cxx HDRS= $(SRCS:.cxx=.h) -- 2.39.3