]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add auxiliary info for tof calibration to the ESD track, via TOFInfo
authorarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 May 2007 15:10:53 +0000 (15:10 +0000)
committerarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 May 2007 15:10:53 +0000 (15:10 +0000)
TOF/AliTOFtracker.cxx

index fc5054cfbd795f127b5faa36fee7bb020c6385f1..1cb2afada0f7f4134d95dcd61e99a6e062d35ef8 100644 (file)
@@ -241,10 +241,17 @@ Int_t AliTOFtracker::PropagateBack(AliESD* event) {
     AliESDtrack *t=event->GetTrack(i);
     AliESDtrack *seed =(AliESDtrack*)fSeeds->UncheckedAt(i);
     if(seed->GetTOFsignal()>0){
+      Float_t info[10];
+      seed->GetTOFInfo(info);
       t->SetTOFsignal(seed->GetTOFsignal());
       t->SetTOFcluster(seed->GetTOFcluster());
       t->SetTOFsignalToT(seed->GetTOFsignalToT());
       t->SetTOFCalChannel(seed->GetTOFCalChannel());
+      AliDebug(2,Form(" Setting TOF info: %f %f %f = ",info[0],info[1],info[2]));    
+      t->SetTOFInfo(info);
+
+      t->GetTOFInfo(info);
+      AliDebug(2,Form(" Getting again TOF info: %f %f %f = ",info[0],info[1],info[2]));    
       Int_t tlab[3]; seed->GetTOFLabel(tlab);    
       t->SetTOFLabel(tlab);
       AliTOFtrack *track = new AliTOFtrack(*seed); 
@@ -293,6 +300,9 @@ Int_t AliTOFtracker::PropagateBack(AliESD* event) {
 //_________________________________________________________________________
 void AliTOFtracker::CollectESD() {
    //prepare the set of ESD tracks to be matched to clusters in TOF
+
+  Int_t seedsTOF1=0;
+  Int_t seedsTOF2=0;
  
   fTracks= new TClonesArray("AliTOFtrack");
   TClonesArray &aTOFTrack = *fTracks;
@@ -301,7 +311,7 @@ void AliTOFtracker::CollectESD() {
     AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(i);
     if ((t->GetStatus()&AliESDtrack::kTPCout)==0)continue;
 
-    // TRD good tracks, already propagated at 371 cm
+    // TRD 'good' tracks, already propagated at 371 cm
 
     AliTOFtrack *track = new AliTOFtrack(*t); // New
     Double_t x = track->GetX(); //New
@@ -312,6 +322,7 @@ void AliTOFtracker::CollectESD() {
       t->UpdateTrackParams(track,AliESDtrack::kTOFout);    
       new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
       fNseedsTOF++;
+      seedsTOF1++;
       delete track;
     }
 
@@ -323,12 +334,15 @@ void AliTOFtracker::CollectESD() {
        t->UpdateTrackParams(track,AliESDtrack::kTOFout);    
        new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
        fNseedsTOF++;
+       seedsTOF2++;
       }
       delete track;
     }
   }
 
-  AliInfo(Form("Number of TOF seedds %i",fNseedsTOF));
+  AliInfo(Form("Number of TOF seeds %i",fNseedsTOF));
+  AliInfo(Form("Number of TOF seeds Type 1 %i",seedsTOF1));
+  AliInfo(Form("Number of TOF seeds Type 2 %i",seedsTOF2));
 
   // Sort according uncertainties on track position 
   fTracks->Sort();
@@ -612,6 +626,10 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){
     //  Store quantities to be used in the TOF Calibration
     Float_t tToT=fGeom->ToTBinWidth()*c->GetToT()*1E-3; // in ns
     t->SetTOFsignalToT(tToT);
+    Float_t rawTime=fGeom->TdcBinWidth()*c->GetTDCRAW()+32; // RAW time,in ps
+    Float_t info[10];
+    info[0]=rawTime;
+    info[1]=mindistZ;
     Int_t ind[5];
     ind[0]=c->GetDetInd(0);
     ind[1]=c->GetDetInd(1);
@@ -626,11 +644,24 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){
     tlab[0]=c->GetLabel(0);
     tlab[1]=c->GetLabel(1);
     tlab[2]=c->GetLabel(2);
-    
+    AliDebug(2,Form(" tdc time of the matched track %i = ",c->GetTDC()));    
     Double_t tof=fGeom->TdcBinWidth()*c->GetTDC()+32; // in ps
-    if(timeWalkCorr)tof=CorrectTimeWalk(mindistZ,tof);
-    t->SetTOFsignal(tof);
+    AliDebug(2,Form(" tof time of the matched track: %f = ",tof));    
+    info[2]=tof;
+    AliDebug(2,Form(" Setting TOF info. raw time: %f  z distance: %f time: %f = ",info[0],info[1],info[2]));    
+    t->SetTOFInfo(info);
+
+    Double_t tofcorr=tof;
+    if(timeWalkCorr)tofcorr=CorrectTimeWalk(mindistZ,tof);
+    AliDebug(2,Form(" tof time of the matched track, after TW corr: %f = ",tofcorr));    
+    //Set TOF time signal and pointer to the matched cluster
+    t->SetTOFsignal(tofcorr);
     t->SetTOFcluster(idclus); // pointing to the recPoints tree
+
+    //Auxiliary info...
+
+
+    //Tracking info
     Double_t time[AliPID::kSPECIES]; t->GetIntegratedTimes(time);
     Double_t mom=t->GetP();
     for(Int_t j=0;j<AliPID::kSPECIES;j++){
@@ -644,6 +675,8 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){
     t->SetIntegratedLength(recL);
     t->SetIntegratedTimes(time);
     t->SetTOFLabel(tlab);
+
     // Fill Reco-QA histos for Reconstruction
     fHRecNClus->Fill(nc);
     fHRecDist->Fill(mindist);
@@ -655,10 +688,9 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){
     // Fill Tree for on-the-fly offline Calibration
 
     if ( !((t->GetStatus() & AliESDtrack::kTIME)==0 )){    
-      Float_t rawtime=fGeom->TdcBinWidth()*c->GetTDCRAW()+32; // RAW time,in ps
       fIch=calindex;
       fToT=tToT;
-      fTime=rawtime;
+      fTime=rawTime;
       fExpTimePi=time[2];
       fExpTimeKa=time[3];
       fExpTimePr=time[4];