updates:
authorMikolaj Krzewicki <mikolaj.krzewicki@cern.ch>
Sun, 8 Dec 2013 14:22:15 +0000 (15:22 +0100)
committerMikolaj Krzewicki <mikolaj.krzewicki@cern.ch>
Sun, 8 Dec 2013 14:22:15 +0000 (15:22 +0100)
AddTaskTPCCalib.C: make the usage of the reco params in calib consistent
with data + changes to improve gain calibration

PWGPP/CalibMacros/CPass0/AddTaskTPCCalib.C
PWGPP/CalibMacros/CPass1/AddTaskTPCCalib.C
TPC/Calib/AliTPCcalibGainMult.cxx
TPC/Calib/AliTPCcalibTimeGain.cxx

index 8392380..2093a56 100644 (file)
@@ -338,8 +338,23 @@ void ConfigOCDB(Int_t run){
   if (!array){
     printf("TPC reco param not available");
   }
+  
+  //get the beam type from OCDB to decide which type of reco param we need -
+  //high or low flux
+  entry = AliCDBManager::Instance()->Get("GRP/GRP/Data");
+  AliGRPObject* grpData = dynamic_cast<AliGRPObject*>(entry->GetObject());  // new GRP entry
+  TString beamType = grpData->GetBeamType();
+  if (beamType==AliGRPObject::GetInvalidString()) {
+    AliError("GRP/GRP/Data entry:  missing value for the beam type ! Using UNKNOWN");
+    beamType = "UNKNOWN";
+  }
   // 0 - Low Flux (pp), 1- High Flux (Pb-Pb)
-  AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(1);
+  Int_t fluxType=0;
+  if (beamType.Contains("p-p")) {fluxType=0;}
+  if (beamType.Contains("A-A")) {fluxType=1;}
+  AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(fluxType);
+  printf("beam type: %s, using fluxType=%i\n",beamType.Data(),fluxType);
+  tpcRecoParam->Print();
 
   transform->SetCurrentRecoParam(tpcRecoParam);
   tpcRecoParam->SetUseGainCorrectionTime(0);
index 6d664c0..8e90780 100644 (file)
@@ -341,8 +341,23 @@ void ConfigOCDB(Int_t run){
   if (!array){
     printf("TPC reco param not available");
   }
+  
+  //get the beam type from OCDB to decide which type of reco param we need -
+  //high or low flux
+  entry = AliCDBManager::Instance()->Get("GRP/GRP/Data");
+  AliGRPObject* grpData = dynamic_cast<AliGRPObject*>(entry->GetObject());  // new GRP entry
+  TString beamType = grpData->GetBeamType();
+  if (beamType==AliGRPObject::GetInvalidString()) {
+    AliError("GRP/GRP/Data entry:  missing value for the beam type ! Using UNKNOWN");
+    beamType = "UNKNOWN";
+  }
   // 0 - Low Flux (pp), 1- High Flux (Pb-Pb)
-  AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(1);
+  Int_t fluxType=0;
+  if (beamType.Contains("p-p")) {fluxType=0;}
+  if (beamType.Contains("A-A")) {fluxType=1;}
+  AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(fluxType);
+  printf("beam type: %s, using fluxType=%i\n",beamType.Data(),fluxType);
+  tpcRecoParam->Print();
 
   transform->SetCurrentRecoParam(tpcRecoParam);
   // in CPass1 use a default setting
index 2d47564..70db579 100644 (file)
@@ -420,7 +420,17 @@ void AliTPCcalibGainMult::Process(AliESDEvent *event) {
       //
       Float_t meanMax = (63./159)*signalArrayMax[0] + (64./159)*signalArrayMax[1] + (32./159)*signalArrayMax[2];
       Float_t meanTot = (63./159)*signalArrayTot[0] + (64./159)*signalArrayTot[1] + (32./159)*signalArrayTot[2]; 
-      if (meanMax < 1e-5 || meanTot < 1e-5) continue;
+      //MY SUGGESTION COMMENT NEXT LINE
+      //      if (meanMax < 1e-5 || meanTot < 1e-5) continue;      
+      //AND INTRODUCE NEW LINE
+      // 
+      const Double_t kMinAmp=0.001;
+      if (signalArrayMax[0]<=kMinAmp) continue;
+      if (signalArrayMax[1]<=kMinAmp) continue;
+      if (signalArrayMax[2]<=kMinAmp) continue;
+      if (signalArrayTot[0]<=kMinAmp) continue;
+      if (signalArrayTot[1]<=kMinAmp) continue;
+      if (signalArrayTot[2]<=kMinAmp) continue;
       //
       for(Int_t ipad = 0; ipad < 4; ipad ++) {
        // "dEdxRatioMax","dEdxRatioTot","padType","mult","driftlength", "1_pt"
index a06b99a..8c161a4 100644 (file)
@@ -467,7 +467,7 @@ void AliTPCcalibTimeGain::ProcessBeamEvent(AliESDEvent *event) {
       //
       // flattens signal in MIP window
       //
-      if (particleCase == 0) {
+      if (particleCase == 2) {
        Float_t corrFactor = AliExternalTrackParam::BetheBlochAleph(meanP/0.13957, 
                                                                    fAlephParameters[0], 
                                                                    fAlephParameters[1],