Skip to content

Commit

Permalink
FIT CFD added to ESD
Browse files Browse the repository at this point in the history
  • Loading branch information
AllaMaevskaya authored and ktf committed May 20, 2016
1 parent afb17f4 commit 2f363bc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
10 changes: 7 additions & 3 deletions T0/T0base/AliT0RecPoint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,22 @@ ClassImp(AliT0RecPoint)
fPileup(kFALSE),
fSattelite(kFALSE),
fTime1stA(99999),
fTime1stC(99999)
fTime1stC(99999)



{
//ctor
for (Int_t i=0; i<24; i++) { fTime[i]=0; fADC[i]=0; fADCLED[i]=0;
for (Int_t i=0; i<24; i++) {
fTime[i]=0; fADC[i]=0; fADCLED[i]=0;
for(Int_t iHit=0; iHit<5; iHit++) {
fTimeFull[i][iHit] = 0;
fOrA[iHit] = 0;
fOrC[iHit] = 0;
fTVDC[iHit] = 0;
}
}
}
for (Int_t i=0; i<4; i++) ftimeFIT[i]=0;
}
//_____________________________________________________________________________

Expand Down Expand Up @@ -93,6 +96,7 @@ AliT0RecPoint::AliT0RecPoint(const AliT0RecPoint &r):TObject(),
fTVDC[iHit] = r.fTVDC[iHit];
}
}
for (Int_t i=0; i<4; i++) r.ftimeFIT[i];
// ((AliT0RecPoint &) r).Copy(*this);

}
Expand Down
7 changes: 5 additions & 2 deletions T0/T0base/AliT0RecPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class AliT0RecPoint: public TObject {
void SetOrC (Int_t hit, Float_t time) { fOrC[hit] = time;}
void SetTVDC(Int_t hit, Float_t time) { fTVDC[hit] = time;}

private:
void SetFITTime (Int_t ipmt, Double32_t time) { ftimeFIT[ipmt] = time;}
Double32_t GetFITTime (Int_t ipmt)const { return ftimeFIT[ipmt];}
private:
Double32_t fTimeAverage; // Average time with best particles
Int_t fTimeOnlineMean; // online mean signal
Double32_t fVertexPosition; // Diffrence time between C and A
Expand All @@ -86,8 +88,9 @@ class AliT0RecPoint: public TObject {
Bool_t fSattelite;
Double32_t fTime1stA; //TOF first particle on the A
Double32_t fTime1stC; //TOF first particle on the C
Float_t ftimeFIT[4]; // time signals from FIT MCP PMT

ClassDef(AliT0RecPoint,8) // RecPoints (Header) object for set:T0
ClassDef(AliT0RecPoint,9) // RecPoints (Header) object for set:T0
};

typedef AliT0RecPoint AliSTARTRecPoint; // for backward compatibility
Expand Down
27 changes: 19 additions & 8 deletions T0/T0rec/AliT0Reconstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,17 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
frecpoints.SetMultC(Float_t(amplitudeNew[25]) );
// printf ("Reconstruct ::: T0 MPDA %i MPDC %i", amplitude[24], amplitude[25]);

//FIT CFD
Double32_t timeFIT=0;
for (int i=0; i<4; i++) {
for (Int_t iHit=0; iHit<5; iHit++) {
if(alldata[i+211][iHit]>9000 && alldata[i+211][iHit]<12000) {
timeFIT= Double32_t(alldata[i+211][iHit]);
frecpoints.SetFITTime(i, timeFIT);
break;
}
}
}

} // if (else )raw data
recTree->Fill();
Expand Down Expand Up @@ -747,12 +758,12 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
fESDTZERO->SetOrA(iHit,frecpoints.GetOrA(iHit));
fESDTZERO->SetOrC(iHit,frecpoints.GetOrC(iHit));

for (Int_t i0=0; i0<24; i0++) {
fESDTZERO->SetTimeFull(i0, iHit,frecpoints.GetTimeFull(i0,iHit));
}
}

for (Int_t i0=0; i0<24; i0++)
fESDTZERO->SetTimeFull(i0, iHit,frecpoints.GetTimeFull(i0,iHit));
//FIT CFD
for (Int_t i0=0; i0<4; i0++)
fESDTZERO->SetPileupTime(i0, frecpoints.GetFITTime(i0)); //// 19.05.2016
AliDebug(1,Form("T0: SPDshift %f Vertex %f (T0A+T0C)/2 best %f #ps T0signal %f ps OrA %f ps OrC %f ps T0trig %i\n",shift, zPosition, timemean[0], timeClock[0], timeClock[1], timeClock[2], trig));

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand All @@ -766,8 +777,8 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
TBits pileout =fESDTZERO-> GetT0PileupBits();
pileout.Print();

for (Int_t i=0; i<5; i++) {
fESDTZERO->SetPileupTime(i, frecpoints.GetTVDC(i) ) ;
// for (Int_t i=0; i<5; i++) {
// fESDTZERO->SetPileupTime(i, frecpoints.GetTVDC(i) ) ;
// printf("!!!!!! FillESD :: pileup %i %f %f \n", i,fESDTZERO->GetPileupTime(i), frecpoints.GetTVDC(i));
}
Bool_t sat = SatelliteFlag();
Expand Down

0 comments on commit 2f363bc

Please sign in to comment.