]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
protect resolution task against running on old data (differently
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Nov 2011 10:47:29 +0000 (10:47 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Nov 2011 10:47:29 +0000 (10:47 +0000)
formated)
add half chamber mask monitoring

PWG1/TRD/AliTRDinfoGen.cxx
PWG1/TRD/AliTRDrecoTask.cxx
PWG1/TRD/AliTRDresolution.cxx

index 9268938a6a7dbb02cc1430d204baf84ef2b7f1cf..514f0cf03774615152ce7db40abc0da5970cb78e 100644 (file)
@@ -796,7 +796,11 @@ void AliTRDinfoGen::MakeChambers()
         tgl = glb[2]/glb[0]/TMath::Sqrt(1.+glb[1]*glb[1]/glb[0]/glb[0]);\r
         eta = -TMath::Log(TMath::Tan(0.5 *  (0.5*TMath::Pi() - TMath::ATan(tgl))));\r
         pos[2] = eta; pos[3] = phi;\r
-        pos[4] = calib->IsChamberGood(idet)?0.:1.;\r
+        pos[4] = 0.;\r
+        if(calib->IsChamberGood(idet)){\r
+          if(calib->IsHalfChamberNoData(idet, 0)) pos[4] += 1.;\r
+          if(calib->IsHalfChamberNoData(idet, 1)) pos[4] += 2.;\r
+        } else pos[4] += 4.;\r
         chmb->AddAt(new TVectorF(pos), idet);\r
       }\r
     }\r
index 5f1fce349e31833e788f3bde05d5c152a651fdb6..f7660a656d8ef1507d9a3803c35b33f0cfc81805 100644 (file)
@@ -334,8 +334,20 @@ void AliTRDrecoTask::MakeDetectorPlot(Int_t ly)
     if(!det) continue;\r
     AliDebug(2, Form("det[%03d] 0[%+4.1f %+4.1f] 1[%+4.1f %+4.1f]", idet, (*det)[0], (*det)[1], (*det)[2], (*det)[3]));\r
     Int_t iopt = Int_t((*det)[4]);\r
-    gdet->SetFillStyle(style[iopt]);\r
-    gdet->DrawBox((*det)[0], (*det)[1], (*det)[2], (*det)[3]);\r
+    if(iopt==4){\r
+      gdet->SetFillStyle(style[1]);gdet->SetFillColor(kBlack);\r
+      gdet->DrawBox((*det)[0], (*det)[1], (*det)[2], (*det)[3]);\r
+    } else {\r
+      gdet->SetFillStyle(style[0]);\r
+      gdet->DrawBox((*det)[0], (*det)[1], (*det)[2], (*det)[3]);\r
+      if(iopt==1){\r
+        gdet->SetFillStyle(style[1]);gdet->SetFillColor(kBlue);\r
+        gdet->DrawBox((*det)[0], (*det)[1], (*det)[2], 0.5*((*det)[3]+(*det)[1]));\r
+      } else if(iopt==2){\r
+        gdet->SetFillStyle(style[1]);gdet->SetFillColor(kRed);\r
+        gdet->DrawBox((*det)[0], 0.5*((*det)[3]+(*det)[1]), (*det)[2], (*det)[3]);\r
+      } else if(iopt!=0) AliError(Form("Wrong chmb. status[%d] for det[%03d]", iopt, idet));\r
+    }\r
   }\r
 }\r
 \r
index 12615fef4530c5368bcc2288e2558ae1c07b2753..c45e77383721ccc477dc7a4ae7550ad2d763971f 100644 (file)
@@ -2744,8 +2744,21 @@ void AliTRDresolution::AliTRDresolutionProjection::Build(const Char_t *n, const
 {
 // check and build (if neccessary) projection determined by axis "ix", "iy" and "iz"
   if(!aa[ix] || !aa[iy] || !aa[iz]) return;
-  SetNameTitle(n,t);
   TAxis *ax(aa[ix]), *ay(aa[iy]), *az(aa[iz]);
+  // check ax definiton to protect against older versions of the data
+  if(ax->GetNbins()<=0 || (ax->GetXmax()-ax->GetXmin())<=0.){
+    AliWarning(Form("Wrong definition of axis[%d] \"%s\"[%d](%f %f).", ix, ax->GetTitle(), ax->GetNbins(), ax->GetXmin(), ax->GetXmax()));
+    return;
+  }
+  if(ay->GetNbins()<=0 || (ay->GetXmax()-ay->GetXmin())<=0.){
+    AliWarning(Form("Wrong definition of axis[%d] \"%s\"[%d](%f %f).", ix, ay->GetTitle(), ay->GetNbins(), ay->GetXmin(), ay->GetXmax()));
+    return;
+  }
+  if(az->GetNbins()<=0 || (az->GetXmax()-az->GetXmin())<=0.){
+    AliWarning(Form("Wrong definition of axis[%d] \"%s\"[%d](%f %f).", ix, az->GetTitle(), az->GetNbins(), az->GetXmin(), az->GetXmax()));
+    return;
+  }
+  SetNameTitle(n,t);
   fH = new TH3I(n, Form("%s;%s;%s;%s", t, ax->GetTitle(), ay->GetTitle(), az->GetTitle()),
     ax->GetNbins(), ax->GetXmin(), ax->GetXmax(),
     ay->GetNbins(), ay->GetXmin(), ay->GetXmax(),