]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/TenderSupplies/AliVZEROTenderSupply.cxx
Update VZERO reco in order to deal with high lumi data. Weighted mean on V0 A and...
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliVZEROTenderSupply.cxx
index b14ed90ffad2312cc6ec2e30afb48a17314b5402..d8eef4a76d76b32a09060b98e0c1c06de3be4b3b 100644 (file)
@@ -46,6 +46,7 @@ AliVZEROTenderSupply::AliVZEROTenderSupply() :
   AliTenderSupply(),
   fCalibData(NULL),
   fTimeSlewing(NULL),
+  fRecoParam(NULL),
   fLHCClockPhase(0),
   fDebug(kFALSE)
 {
@@ -59,6 +60,7 @@ AliVZEROTenderSupply::AliVZEROTenderSupply(const char *name, const AliTender *te
   AliTenderSupply(name,tender),
   fCalibData(NULL),
   fTimeSlewing(NULL),
+  fRecoParam(NULL),
   fLHCClockPhase(0),
   fDebug(kFALSE)
 {
@@ -117,9 +119,19 @@ void AliVZEROTenderSupply::ProcessEvent()
       fTimeSlewing = (TF1*)entrySlew->GetObject();
       if (fDebug) printf("AliVZEROTenderSupply::Used VZERO time slewing entry: %s\n",entrySlew->GetId().ToString().Data());
     }
+
+    AliCDBEntry *entryRecoParam = fTender->GetCDBManager()->Get("VZERO/Calib/RecoParam",fTender->GetRun());
+    if (!entryRecoParam) {
+      AliError("VZERO reco-param object is not found in OCDB !");
+      fRecoParam = NULL;
+      return;
+    } else {
+      fRecoParam = (AliVZERORecoParam*)entryRecoParam->GetObject();
+      if (fDebug) printf("AliVZEROTenderSupply::Used VZERO reco-param entry: %s\n",entryRecoParam->GetId().ToString().Data());
+    }
   }
 
-  if (!fCalibData || !fTimeSlewing) {
+  if (!fCalibData || !fTimeSlewing || !fRecoParam) {
     AliWarning("VZERO calibration objects not found!");
     return;
   }
@@ -151,6 +163,7 @@ void AliVZEROTenderSupply::ProcessEvent()
 
   {
     AliVZEROTriggerMask triggerMask;
+    triggerMask.SetRecoParam(fRecoParam);
     triggerMask.FillMasks(esdVZERO, fCalibData, fTimeSlewing);
   }
   if (fDebug) printf("Modified VZERO decision %d (%f ns) and %d (%f ns)\n",