small update
authorjbook <jbook>
Sat, 22 Mar 2014 13:44:32 +0000 (14:44 +0100)
committerhristov <Peter.Hristov@cern.ch>
Thu, 27 Mar 2014 15:25:24 +0000 (16:25 +0100)
PWGDQ/dielectron/AliAnalysisTaskMultiDielectron.cxx
PWGDQ/dielectron/AliDielectron.cxx
PWGDQ/dielectron/AliDielectronPID.cxx
PWGDQ/dielectron/AliDielectronVarManager.h

index 9df3d04..62f3c60 100644 (file)
@@ -315,6 +315,7 @@ void AliAnalysisTaskMultiDielectron::FinishTaskOutput()
   Int_t ic=0;
   AliDielectron *die=0;
   AliDielectron *die2=0;
+  fPairArray=0x0;
 
   // main loop
   while ( (die=static_cast<AliDielectron*>(nextDie())) ){
index 6588cfb..07c026b 100644 (file)
@@ -270,7 +270,7 @@ void AliDielectron::Init()
   if (fCutQA) {
     fQAmonitor = new AliDielectronCutQA(Form("QAcuts_%s",GetName()),"QAcuts");
     fQAmonitor->AddTrackFilter(&fTrackFilter);
-    fQAmonitor->AddPairFilter(&fPairFilter);
+    if(!fNoPairing) fQAmonitor->AddPairFilter(&fPairFilter);
     fQAmonitor->AddEventFilter(&fEventFilter);
     fQAmonitor->Init();
   }
index 6ffa0b4..cb5f1bf 100644 (file)
@@ -308,7 +308,26 @@ Bool_t AliDielectronPID::IsSelected(TObject* track)
       pid->SetTPCsignal(origdEdx/GetEtaCorr(aodTrack)/fgCorrdEdx);
     }
   }
-  
+
+  // check for corrections and add their variables to the fill map
+  if(fgFunCntrdCorr)  {
+    fUsedVars->SetBitNumber(fgFunCntrdCorr->GetXaxis()->GetUniqueID(), kTRUE);
+    fUsedVars->SetBitNumber(fgFunCntrdCorr->GetYaxis()->GetUniqueID(), kTRUE);
+    fUsedVars->SetBitNumber(fgFunCntrdCorr->GetZaxis()->GetUniqueID(), kTRUE);
+  }
+  if(fgFunWdthCorr)  {
+    fUsedVars->SetBitNumber(fgFunWdthCorr->GetXaxis()->GetUniqueID(), kTRUE);
+    fUsedVars->SetBitNumber(fgFunWdthCorr->GetYaxis()->GetUniqueID(), kTRUE);
+    fUsedVars->SetBitNumber(fgFunWdthCorr->GetZaxis()->GetUniqueID(), kTRUE);
+  }
+  for(UChar_t icut=0; icut<fNcuts; ++icut) {
+    if(!fMapElectronCutLow[icut]) continue;
+    for(Int_t idim=0; idim<fMapElectronCutLow[icut]->GetNdimensions(); idim++) {
+      TString var(fMapElectronCutLow[icut]->GetAxis(idim)->GetName());
+      fUsedVars->SetBitNumber(AliDielectronVarManager::GetValueType(var.Data()), kTRUE);
+    }
+  }
+
   //Fill values
   Double_t values[AliDielectronVarManager::kNMaxValues];
   AliDielectronVarManager::SetFillMap(fUsedVars);
@@ -443,12 +462,13 @@ Bool_t AliDielectronPID::IsSelectedTPC(AliVTrack * const part, Int_t icut, Doubl
     // get array of values for the corresponding dimensions using axis names
     for(Int_t idim=0; idim<fMapElectronCutLow[icut]->GetNdimensions(); idim++) {
       vals[idim] = values[AliDielectronVarManager::GetValueType(fMapElectronCutLow[icut]->GetAxis(idim)->GetName())];
+      // printf(" \t %s %.3f ",fMapElectronCutLow[icut]->GetAxis(idim)->GetName(),vals[idim]);
     }
     // find bin for values (w/o creating it in case it is not filled)
     Long_t bin = fMapElectronCutLow[icut]->GetBin(vals,kFALSE);
     if(bin>0) lowElectronCut=fMapElectronCutLow[icut]->GetBinContent(bin);
     else lowElectronCut=100;
-    //printf("low cut %.3f \t for %d dimensional cut map \n",lowElectronCut,fMapElectronCutLow[icut]->GetNdimensions());
+    //    printf("  low cut %.3f (%ld) \n", lowElectronCut,bin);
     delete [] vals;
   }
 
index 8fbfac7..70cc97e 100644 (file)
@@ -940,7 +940,7 @@ inline void AliDielectronVarManager::FillVarAODTrack(const AliAODTrack *particle
     values[AliDielectronVarManager::kTPCsignalNfrac] = tpcNcls>0?tpcSignalN/tpcNcls:0;
     values[AliDielectronVarManager::kTPCclsDiff]     = tpcSignalN-tpcNcls;
 
-    if(Req(kPIn))         values[AliDielectronVarManager::kPIn]         = pid->GetTPCmomentum();
+    values[AliDielectronVarManager::kPIn]         = pid->GetTPCmomentum();
     if(Req(kTPCsignal))   values[AliDielectronVarManager::kTPCsignal]   = pid->GetTPCsignal();
     if(Req(kTOFsignal))   values[AliDielectronVarManager::kTOFsignal]   = pid->GetTOFsignal();
     if(Req(kTOFmismProb)) values[AliDielectronVarManager::kTOFmismProb] = fgPIDResponse->GetTOFMismatchProbability(particle);