]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliPhysicsSelection.cxx
- Swap sign of the eta in case of LHC13f - Add histogram for tracks which are matched...
[u/mrichter/AliRoot.git] / ANALYSIS / AliPhysicsSelection.cxx
index a7a9314ca51793d0e3903a3e8e99a927d5bd35bd..fc6e185dc2441c3dc8f8f934face92457f2c713c 100644 (file)
@@ -1966,9 +1966,9 @@ void AliPhysicsSelection::DetectPassName(){
   AliInputEventHandler* handler = dynamic_cast<AliInputEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
   if (!handler) return;
   TObject* prodInfoData = handler->GetUserInfo()->FindObject("alirootVersion");
-  TString filePath;
+  TString filePath = handler->GetTree()->GetCurrentFile()->GetName();
   if (prodInfoData) {
-    // take filePath from UserInfo - available only from ~LHC12d period
+    // try to take filePath from UserInfo - available only from ~LHC12d period
     TString str(prodInfoData->GetTitle());
     TObjArray* tokens = str.Tokenize(";");
     for (Int_t i=0;i<=tokens->GetLast();i++) {
@@ -1980,11 +1980,7 @@ void AliPhysicsSelection::DetectPassName(){
       }
     }
     delete tokens;
-  } else {
-    // guess name from the input filename
-    // may be a problem for local analysis
-    filePath = handler->GetTree()->GetCurrentFile()->GetName();
-  }
+  } 
 
   TString passName="";
 
@@ -1998,6 +1994,22 @@ void AliPhysicsSelection::DetectPassName(){
     }
   }
   delete tokens;
+  //
+  // temporary patch for LEGO train runners
+  //
+  if (passName.Contains("_pass")){ // try with "_" as a fallback (as it is the case in the test data of the LEGO train) and do further tokenize
+    TObjArray* tokens2 = filePath.Tokenize("_");
+    for (Int_t i=0;i<=tokens2->GetLast();i++) {
+      TObjString* stObj = (TObjString*) tokens2->At(i);
+      TString s = stObj->GetString();
+      if (s.Contains("pass")) {
+       passName = s;
+       break;
+      }
+    }
+    delete tokens2;
+  }
+
 
   if (!passName.Contains("pass")){
     AliError(" Failed to find reconstruction pass name:");