]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added more severe checks if emcal matrizes are there
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 May 2011 19:50:38 +0000 (19:50 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 May 2011 19:50:38 +0000 (19:50 +0000)
PWG4/CaloCalib/AliAnalysisTaskEMCALClusterizeFast.cxx
PWG4/CaloCalib/AliAnalysisTaskEMCALPi0PbPb.cxx

index 81c8aca5dec7cf66b2a256d24984316fea7ea4f7..2a2bc9e48f8f7a31cad3d16d7ac552e2e34dafb7 100644 (file)
@@ -150,9 +150,14 @@ void AliAnalysisTaskEMCALClusterizeFast::UserExec(Option_t *)
 
   UInt_t offtrigger = 0;
   if (esdevent) {
-    UInt_t mask = esdevent->GetESDRun()->GetDetectorsInReco();
-    if ((mask >> 18) & 0x1 == 0) { //AliDAQ::OfflineModuleName(180=="EMCAL"
-      AliError(Form("EMCAL not reconstructed: %u (%u)", mask,  esdevent->GetESDRun()->GetDetectorsInDAQ()));
+    UInt_t mask1 = esdevent->GetESDRun()->GetDetectorsInDAQ();
+    UInt_t mask2 = esdevent->GetESDRun()->GetDetectorsInReco();
+    Bool_t desc1 = (mask1 >> 18) & 0x1;
+    Bool_t desc2 = (mask2 >> 18) & 0x1;
+    if (desc1==0 || desc2==0) { //AliDAQ::OfflineModuleName(180=="EMCAL"
+      AliError(Form("EMCAL not in DAQ/RECO: %u (%u)/%u (%u)", 
+                   mask1, esdevent->GetESDRun()->GetDetectorsInReco(),
+                   mask2, esdevent->GetESDRun()->GetDetectorsInDAQ()));
       return;
     }
     AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager();
index 0ecaf7ffad3ea668eddee30a6dd6077fb7bf128a..2ddbb58b45d28ea329a2f964dfb75b0fd36c730a 100644 (file)
@@ -429,9 +429,14 @@ void AliAnalysisTaskEMCALPi0PbPb::UserExec(Option_t *)
   if (fEsdEv) {
     am->LoadBranch("AliESDRun.");
     am->LoadBranch("AliESDHeader.");
-    UInt_t mask = fEsdEv->GetESDRun()->GetDetectorsInReco();
-    if ((mask >> 18) & 0x1 == 0) { //AliDAQ::OfflineModuleName(180=="EMCAL"
-      AliError(Form("EMCAL not reconstructed: %u (%u)", mask,  fEsdEv->GetESDRun()->GetDetectorsInDAQ()));
+    UInt_t mask1 = fEsdEv->GetESDRun()->GetDetectorsInDAQ();
+    UInt_t mask2 = fEsdEv->GetESDRun()->GetDetectorsInReco();
+    Bool_t desc1 = (mask1 >> 18) & 0x1;
+    Bool_t desc2 = (mask2 >> 18) & 0x1;
+    if (desc1==0 || desc2==0) { //AliDAQ::OfflineModuleName(180=="EMCAL"
+      AliError(Form("EMCAL not in DAQ/RECO: %u (%u)/%u (%u)", 
+                   mask1, fEsdEv->GetESDRun()->GetDetectorsInReco(),
+                   mask2, fEsdEv->GetESDRun()->GetDetectorsInDAQ()));
       return;
     }
     offtrigger = ((AliInputEventHandler*)(am->GetInputEventHandler()))->IsEventSelected();
@@ -461,12 +466,16 @@ void AliAnalysisTaskEMCALPi0PbPb::UserExec(Option_t *)
 
   if (!AliGeomManager::GetGeometry()&&!fIsGeoMatsSet) { // set misalignment matrices (stored in first event)
     Int_t nsm = fGeom->GetEMCGeometry()->GetNumberOfSuperModules();
-    if (fEsdEv) {  
-      for (Int_t i=0; i<nsm; ++i)
-        fGeom->SetMisalMatrix(fEsdEv->GetESDRun()->GetEMCALMatrix(i),i);
-    } else {
-      for (Int_t i=0; i<nsm; ++i)
-        fGeom->SetMisalMatrix(fAodEv->GetHeader()->GetEMCALMatrix(i),i);
+    for (Int_t i=0; i<nsm; ++i) {
+      const TGeoHMatrix *geom = 0;
+      if (fEsdEv)
+        geom = fEsdEv->GetESDRun()->GetEMCALMatrix(i);
+      else 
+        geom = fAodEv->GetHeader()->GetEMCALMatrix(i);
+      if (!geom)
+        continue;
+      geom->Print();
+      fGeom->SetMisalMatrix(geom,i);
     }
     fIsGeoMatsSet = kTRUE;
   }