]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Setting of aliases to rawReader done only once. Base decision on cosmic or calib...
authorshahoian <ruben.shahoyan@cern.ch>
Tue, 24 Feb 2015 18:47:56 +0000 (19:47 +0100)
committershahoian <ruben.shahoyan@cern.ch>
Tue, 24 Feb 2015 18:48:10 +0000 (19:48 +0100)
STEER/STEER/AliEventInfo.cxx
STEER/STEER/AliEventInfo.h
STEER/STEER/AliRecoParam.cxx
STEER/STEER/AliRecoParam.h
STEER/STEER/AliReconstruction.cxx
STEER/STEER/AliReconstruction.h

index 6f2417722d60c397673a29ad396bc3f99040e496..7a936f2e0165fbc59d47d4d26380a93970a3bf09 100644 (file)
@@ -100,4 +100,21 @@ void AliEventInfo::Reset()
   fTriggerMask = 0;
   fTriggerCluster = "";
   fHLTDecision = "";
+  ResetBit(0xffffffff);
+}
+
+//______________________________________________________________________________
+void AliEventInfo::Print(Option_t* ) const
+{
+  // print itself
+  printf("EventInfo for EventType:\t%d Cosmic:%s Laser:%s Other:%s\n",
+        fEventType,
+        HasCosmicTrigger() ? "ON":"OFF",
+        HasCalibLaserTrigger() ? "ON":"OFF",
+        HasBeamTrigger() ? "ON":"OFF");
+  //
+  printf("fTriggerMask/fTriggerMaskNext50:\t%#llx/%#llx\n",fTriggerMask,fTriggerMaskNext50);
+  printf("TriggerCluster:\t%s\n",fTriggerCluster.Data());
+  printf("TriggerClasses:\t%s\n",fTriggerClasses.Data());
+  printf("HLT desicion  :\t%s\n",fHLTDecision.Data());  
 }
index ba3d2243fce55b645d3fb7546a0c6e92352d2bfc..8c344b315f270cf8535e1a5a5b50b033a3655b26 100644 (file)
@@ -22,6 +22,7 @@
 class AliEventInfo : public TObject {
 
  public:
+  enum {kBeamTrigBit=BIT(14),kCosmicBit=BIT(15),kLaserBit=BIT(16)};
   AliEventInfo();
   AliEventInfo(UInt_t evType,
               const char *classes,
@@ -37,7 +38,7 @@ class AliEventInfo : public TObject {
   void SetTriggerCluster(const char *cluster) { fTriggerCluster = cluster; }
   void SetHLTDecision(const char *decision) { fHLTDecision = decision; }
 
-  virtual void Print(Option_t */*option=""*/) const { Dump(); }
+  //  virtual void Print(Option_t */*option=""*/) const { Dump(); }
 
   UInt_t      GetEventType() const { return fEventType; }
   const char *GetTriggerClasses() const { return fTriggerClasses.Data(); }
@@ -49,8 +50,17 @@ class AliEventInfo : public TObject {
   AliEventInfo(const AliEventInfo &evInfo);
   AliEventInfo& operator= (const AliEventInfo& evInfo);
 
+  Bool_t  HasBeamTrigger()                      const {return TestBit(kBeamTrigBit);}
+  Bool_t  HasCosmicTrigger()                    const {return TestBit(kCosmicBit);}
+  Bool_t  HasCalibLaserTrigger()                const {return TestBit(kLaserBit);}
+  void    SetBeamTrigger(Bool_t v=kTRUE)              {SetBit(kBeamTrigBit,v);}
+  void    SetCosmicTrigger(Bool_t v=kTRUE)            {SetBit(kCosmicBit,v);}
+  void    SetCalibLaserTrigger(Bool_t v=kTRUE)        {SetBit(kLaserBit,v);}
+
   void Reset();
 
+  void Print(Option_t* opt=0) const;
+
  private:
 
   UInt_t      fEventType;      // event type as defined by DAQ (start_of_*,calibration,physics etc) (per event)
index 10f38705927fc3e266bd8d0993c90381b5794978..7f9208234819a53c4eab041ca5957e32928bff0f 100644 (file)
@@ -192,8 +192,7 @@ void  AliRecoParam::Print(Option_t *option) const {
   }
 }
 
-void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo &evInfo,
-       const THashTable *cosmicTriggersList)
+void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo &evInfo, const THashTable *cosmicTriggersList)
 {
     // Implemented according to the discussions
     // and meetings with physics and trigger coordination
@@ -238,39 +237,43 @@ void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo
     // Now we look into the trigger type in order to decide
     // on the remaining cases (cosmic event within LHC run,
     // calibration, for example TPC laser, triggers within physics run
-    TString triggerClasses = evInfo.GetTriggerClasses();
-    TObjArray* trClassArray = triggerClasses.Tokenize(" ");
-    Int_t nTrClasses = trClassArray->GetEntriesFast();
-    Bool_t cosmicTrigger = kFALSE,
-          calibTrigger = kFALSE,
-          otherTrigger = kFALSE;
-    for( Int_t i=0; i<nTrClasses; ++i ) {
+    //
+    Bool_t cosmicTrigger = evInfo.HasCosmicTrigger();
+    Bool_t calibTrigger = evInfo.HasCalibLaserTrigger();
+    Bool_t otherTrigger = evInfo.HasBeamTrigger();
+    // 
+    // -------------------------------------------------------------- >>
+    // for BWD compatibility, preserve also old way of checking
+    if (!cosmicTrigger && !calibTrigger) { // not set via alias
+      TString triggerClasses = evInfo.GetTriggerClasses();
+      TObjArray* trClassArray = triggerClasses.Tokenize(" ");
+      Int_t nTrClasses = trClassArray->GetEntriesFast();
+      for( Int_t i=0; i<nTrClasses; ++i ) {
        TString trClass = ((TObjString*)trClassArray->At(i))->String();
-
-       if (trClass.BeginsWith("C0L")) {
-           // Calibration triggers always start with C0L
-           calibTrigger = kTRUE;
-           continue;
+       if (trClass.BeginsWith("C0L")) { // Calibration triggers always start with C0L
+         calibTrigger = kTRUE;
+         continue;
        }
-
+       //
        if (cosmicTriggersList) {
-           if (cosmicTriggersList->FindObject(trClass.Data())) {
-               // Cosmic trigger accorind to the table
-               // provided in OCDB
-               cosmicTrigger = kTRUE;
-               AliDebug(1,Form("Trigger %s identified as cosmic according to the list defined in OCDB.",
-                           trClass.Data()));
-               continue;
-           }
+         if (cosmicTriggersList->FindObject(trClass.Data())) {
+           // Cosmic trigger accorind to the table provided in OCDB
+           cosmicTrigger = kTRUE;
+           AliDebug(1,Form("Trigger %s identified as cosmic according to the list defined in OCDB.",trClass.Data()));
+           continue;
+         }
        }
        else {
-           AliDebug(1,"Cosmic trigger list is not provided, cosmic event specie is effectively disabled!");
+         AliDebug(1,"Cosmic trigger list is not provided, cosmic event specie is effectively disabled!");
        }
-
+      //
        otherTrigger = kTRUE;
+      }
+      delete trClassArray;
+      //
     }
-    delete trClassArray;
-
+    // -------------------------------------------------------------- <<
+    //
     if (calibTrigger) {
        fEventSpecie = kCalib;
        return;
index cb3c9fb327d7a0a55427842eb39167579a7701b3..2d9f925e96a27fa7e79b8af7618a55d40d08efbe 100644 (file)
@@ -43,8 +43,7 @@ class AliRecoParam : public TObject
 
   virtual void                  Print(Option_t *option="") const;
   const TObjArray              *GetDetRecoParamArray(Int_t iDet) const { return fDetRecoParams[iDet]; }
-  void                          SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo,
-                                              const THashTable*cosmicTriggersList);
+  void                          SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo,const THashTable *cosmicTriggersList=0);
   EventSpecie_t                 GetEventSpecie() const { return fEventSpecie; }
   static const char*            GetEventSpecieName(EventSpecie_t es);
   static const char*            GetEventSpecieName(Int_t esIndex);
index ee11e6e1cff2025bae8100052249c3bb1441cf12..a488e55d3dcad54c6036e24e22f22914a39a72fa 100644 (file)
@@ -238,6 +238,8 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) :
   fDmax(50.),
   fZmax(50.),
 
+  fCosmicAlias("kCosmic"),
+  fLaserAlias("kCalibLaser"),
   fRunLocalReconstruction("ALL"),
   fRunTracking("ALL"),
   fFillESD("ALL"),
@@ -278,7 +280,8 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) :
   fDiamondProfileSPD(NULL),
   fDiamondProfile(NULL),
   fDiamondProfileTPC(NULL),
-  fListOfCosmicTriggers(NULL),
+  fListOfCosmicTriggers(NULL), //RS for BWD comp.
+  fAlias2Trigger(NULL),
   
   fGRPData(NULL),
 
@@ -375,6 +378,8 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fDmax(rec.fDmax),
   fZmax(rec.fZmax),
 
+  fCosmicAlias(rec.fCosmicAlias),
+  fLaserAlias(rec.fLaserAlias),
   fRunLocalReconstruction(rec.fRunLocalReconstruction),
   fRunTracking(rec.fRunTracking),
   fFillESD(rec.fFillESD),
@@ -415,7 +420,8 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fDiamondProfileSPD(rec.fDiamondProfileSPD),
   fDiamondProfile(rec.fDiamondProfile),
   fDiamondProfileTPC(rec.fDiamondProfileTPC),
-  fListOfCosmicTriggers(NULL),
+  fListOfCosmicTriggers(NULL), //RS for BWD comp.
+  fAlias2Trigger(NULL),
   
   fGRPData(NULL),
 
@@ -530,6 +536,9 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
   fDmax      = rec.fDmax;
   fZmax      = rec.fZmax;
 
+  fCosmicAlias                   = rec.fCosmicAlias;
+  fLaserAlias                    = rec.fLaserAlias;
+
   fRunLocalReconstruction        = rec.fRunLocalReconstruction;
   fRunTracking                   = rec.fRunTracking;
   fFillESD                       = rec.fFillESD;
@@ -600,6 +609,9 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
 
   delete fListOfCosmicTriggers; fListOfCosmicTriggers = NULL;
   if (rec.fListOfCosmicTriggers) fListOfCosmicTriggers = (THashTable*)((rec.fListOfCosmicTriggers)->Clone());
+  //
+  delete fAlias2Trigger; fAlias2Trigger = NULL;
+  if (rec.fAlias2Trigger) fAlias2Trigger = (THashList*)((rec.fAlias2Trigger)->Clone());
 
   delete fGRPData; fGRPData = NULL;
   //  if (rec.fGRPData) fGRPData = (TMap*)((rec.fGRPData)->Clone());
@@ -671,6 +683,10 @@ AliReconstruction::~AliReconstruction()
     fListOfCosmicTriggers->Delete();
     delete fListOfCosmicTriggers;
   }
+  if (fAlias2Trigger) {
+    fAlias2Trigger->Delete();
+    delete fAlias2Trigger;
+  }
   delete fGRPData;
   delete fRunScalers;
   delete fCTPTimeParams;
@@ -1320,16 +1336,6 @@ Bool_t AliReconstruction::InitGRP() {
      AliError("No TPC diamond profile found in OCDB!");
   }
 
-  entry = AliCDBManager::Instance()->Get("GRP/Calib/CosmicTriggers");
-  if (entry) {
-    fListOfCosmicTriggers = dynamic_cast<THashTable*>(entry->GetObject());
-    entry->SetOwner(0);
-  }
-
-  if (!fListOfCosmicTriggers) {
-    AliWarning("Can not get list of cosmic triggers from OCDB! Cosmic event specie will be effectively disabled!");
-  }
-
   return kTRUE;
 } 
 
@@ -1360,6 +1366,17 @@ Bool_t AliReconstruction::LoadCDB()
   AliCDBManager::Instance()->GetAll("TRIGGER/*/*");
   AliCDBManager::Instance()->GetAll("HLT/*/*");
 
+  AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/Calib/CosmicTriggers");
+  if (entry) {
+    fListOfCosmicTriggers = dynamic_cast<THashTable*>(entry->GetObject());
+    entry->SetOwner(0);
+  }
+  //
+  if (!fListOfCosmicTriggers) {
+    AliWarning("Can not get list of cosmic triggers from OCDB! Cosmic event specie will rely on aliases if defined");
+  }
+
+
   return kTRUE;
 }
 //_____________________________________________________________________________
@@ -1591,7 +1608,9 @@ void AliReconstruction::InitRun(const char* input)
   // Set CDB lock: from now on it is forbidden to reset the run number
   // or the default storage or to activate any further storage!
   SetCDBLock();
-  
+  //
+  ProcessTriggerAliases();
+  //  
 }
 
 //_____________________________________________________________________________
@@ -2034,9 +2053,9 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     oldCPU=procInfo.fCpuUser+procInfo.fCpuSys;
   }
   AliInfo(Form("================================= Processing event %d of type %-10s ==================================", iEvent,fRecoParam.PrintEventSpecie()));
+  fEventInfo.Print();
 
   AliSysInfo::AddStamp(Form("StartReco_%d",iEvent), 0,0,iEvent);
-
   // Set the reco-params
   {
     TString detStr = fLoadCDB;
@@ -2544,7 +2563,7 @@ void AliReconstruction::CleanProcessedEvent()
  
     AliInfo("======================= End Event ===================");
     
-    fEventInfo.Reset();
+
     for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
       if (fReconstructor[iDet]) {
        fReconstructor[iDet]->SetRecoParam(NULL);
@@ -4137,8 +4156,9 @@ Bool_t AliReconstruction::GetEventInfo()
   // Fill the event info object
   // ...
   AliCodeTimerAuto("",0)
-
+  
   AliCentralTrigger *aCTP = NULL;
+  fEventInfo.Reset();
   if (fRawReader) {
     fEventInfo.SetEventType(fRawReader->GetType());
 
@@ -4194,33 +4214,6 @@ Bool_t AliReconstruction::GetEventInfo()
     if (fRawReader) delete aCTP;
     return kFALSE;
   }
-
-  // Load trigger aliases and declare the trigger classes included in aliases
-  //PH Why do we do it in each event and not only once in the beginning of the chunk??
-  //PH Temporary fix for #99725: AliReconstruction::GetEventInfo bug
-  fDeclTriggerClasses.Clear();
-  AliCDBEntry * entry = AliCDBManager::Instance()->Get("GRP/CTP/Aliases");
-  if (entry) {
-    THashList * lst = dynamic_cast<THashList*>(entry->GetObject());
-    if (lst) {
-      lst->Sort(kSortDescending); // to avoid problems with substrungs
-      if (fRawReader) fRawReader->LoadTriggerAlias(lst);
-      // Now declare all the triggers present in the aliases
-      TIter iter(lst);
-      TNamed *nmd = 0;
-      while((nmd = dynamic_cast<TNamed*>(iter.Next()))){
-       fDeclTriggerClasses += " ";
-       fDeclTriggerClasses += nmd->GetName();
-      }
-    }
-    else {
-      AliError("Cannot cast the object with trigger aliases to THashList!");
-    }
-  }
-  else {
-    AliError("No OCDB ebtry for the trigger aliases!");
-  }
-  // Load trigger classes for this run
   UChar_t clustmask = 0;
   TString trclasses;
   ULong64_t trmask = fEventInfo.GetTriggerMask();
@@ -4232,37 +4225,31 @@ Bool_t AliReconstruction::GetEventInfo()
     if (trclass && trclass->GetMask()>0) {
       Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMask()));
       if (fesd) fesd->SetTriggerClass(trclass->GetName(),trindex);
-      if (fRawReader) fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
       if (trmask & (1ull << trindex)) {
        trclasses += " ";
        trclasses += trclass->GetName();
        trclasses += " ";
        clustmask |= trclass->GetCluster()->GetClusterMask();
+       if (TriggerMatches2Alias(trclass->GetName(),fCosmicAlias)) fEventInfo.SetCosmicTrigger(kTRUE);
+       else if (TriggerMatches2Alias(trclass->GetName(),fLaserAlias))  fEventInfo.SetCalibLaserTrigger(kTRUE);
+       else fEventInfo.SetBeamTrigger(kTRUE);
       }
     }
     if (trclass && trclass->GetMaskNext50()>0) {
       Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMaskNext50()))+50;
       if (fesd) fesd->SetTriggerClass(trclass->GetName(),trindex);
-      if (fRawReader) fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
       if (trmaskNext50 & (1ull << (trindex-50))) {
        trclasses += " ";
        trclasses += trclass->GetName();
        trclasses += " ";
        clustmask |= trclass->GetCluster()->GetClusterMask();
+       if (TriggerMatches2Alias(trclass->GetName(),fCosmicAlias)) fEventInfo.SetCosmicTrigger(kTRUE);
+       else if (TriggerMatches2Alias(trclass->GetName(),fLaserAlias))  fEventInfo.SetCalibLaserTrigger(kTRUE);
+       else fEventInfo.SetBeamTrigger(kTRUE);
       }
     }
   }
   fEventInfo.SetTriggerClasses(trclasses);
-  // Now put the declared trigger classes (not present in the run)
-  // to 0/false in the event selection
-  if (!fDeclTriggerClasses.IsNull()) {
-    TObjArray *tokens = fDeclTriggerClasses.Tokenize(" ");
-    Int_t ntokens = tokens->GetEntriesFast();
-    for (Int_t itoken = 0; itoken < ntokens; ++itoken) {
-      if (fRawReader) fRawReader->LoadTriggerClass((((TObjString*)tokens->At(itoken))->String()).Data(),-1);
-    }
-    delete tokens;
-  }
 
   // Write names of active trigger inputs in ESD Header
   const TObjArray& inputsArray = config->GetInputs(); 
@@ -4298,6 +4285,8 @@ Bool_t AliReconstruction::GetEventInfo()
 
   // We have to fill also the HLT decision here!!
   // ...
+  // check if event has cosmic or laser alias
+  
 
   return kTRUE;
 }
@@ -4821,3 +4810,124 @@ void AliReconstruction::RectifyCDBurl(TString& url)
   //url.ToLower();
   //
 }
+
+//_________________________________________________________
+void AliReconstruction::ProcessTriggerAliases()
+{
+  // load trigger aliases, attach them to the reader
+  //
+  fDeclTriggerClasses.Clear();
+  AliCentralTrigger *aCTP = NULL;
+  if (fRawReader) {
+    aCTP = new AliCentralTrigger();
+    TString configstr("");
+    if (!aCTP->LoadConfiguration(configstr)) { // Load CTP config from OCDB
+      AliError("No trigger configuration found in OCDB! The trigger configuration information will not be used!");
+      delete aCTP;
+      return;
+    }
+  }
+  else if (fRunLoader && (!fRunLoader->LoadTrigger())) {
+    aCTP = fRunLoader->GetTrigger();
+  }
+  else {
+    if (fStopOnMissingTriggerFile) AliFatal("No trigger can be loaded! Stopping reconstruction!");
+    AliWarning("No trigger can be loaded! The trigger information will not be used!");
+    return;
+  }
+  //  
+  AliTriggerConfiguration *config = aCTP->GetConfiguration();
+  if (!config) {
+    AliError("No trigger configuration has been found! The trigger configuration information will not be used!");
+    if (fRawReader) delete aCTP;
+    return;
+  }
+  //
+  // here we have list of active triggers
+  const TObjArray& classesArray = config->GetClasses();
+  Int_t nclasses = classesArray.GetEntriesFast();
+  // 
+  fAlias2Trigger = new THashList();
+  //
+  AliCDBEntry * entry = AliCDBManager::Instance()->Get("GRP/CTP/Aliases");
+  if (entry) {
+    THashList * lst = dynamic_cast<THashList*>(entry->GetObject());
+    if (lst) {
+      lst->Sort(kSortDescending); // to avoid problems with substrungs
+      if (fRawReader) fRawReader->LoadTriggerAlias(lst);
+      // Now declare all the triggers present in the aliases
+      TIter iter(lst);
+      TNamed *nmd = 0;
+      while((nmd = dynamic_cast<TNamed*>(iter.Next()))) { // account aliases of this trigger >>
+       fDeclTriggerClasses += " ";
+       fDeclTriggerClasses += nmd->GetName();
+       //
+       if (!classesArray.FindObject(nmd->GetName())) continue;
+       TString aliasList(nmd->GetTitle());
+       TObjArray* arrAliases = aliasList.Tokenize(',');
+       Int_t nAliases = arrAliases->GetEntries();
+       // Loop on aliases for the current trigger
+       for(Int_t i=0; i<nAliases; i++){
+         TObjString *alias = (TObjString*) arrAliases->At(i);
+         // Find the current alias in the hash list. If it is not there, add TNamed entry
+         TNamed * inlist = (TNamed*)fAlias2Trigger->FindObject((alias->GetString()).Data());
+         if (!inlist) {
+           inlist = new TNamed((alias->GetString()).Data(),Form(" %s ",nmd->GetName()));
+           fAlias2Trigger->Add(inlist);
+         }
+         else {
+           TString tt(inlist->GetTitle());
+           tt += "||";
+           tt += Form(" %s ",nmd->GetName());
+           inlist->SetTitle(tt.Data());
+         }
+       }
+       delete arrAliases;
+      }  // account aliases of this trigger <<
+    }
+    else AliError("Cannot cast the object with trigger aliases to THashList!");
+  }
+  else AliError("No OCDB ebtry for the trigger aliases!");
+  //
+  AliInfo("Aliases defined:");
+  fAlias2Trigger->Print();
+  //
+  if (fRawReader) {
+    // active classes mentioned in the alias will be converted to their masks
+    for( Int_t iclass=0; iclass < nclasses; iclass++ ) {
+      AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass);
+      if (trclass && trclass->GetMask()>0) {
+       Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMask()));
+       fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
+      }
+      if (trclass && trclass->GetMaskNext50()>0) {
+       Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMaskNext50()))+50;
+       fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
+      }
+    }
+    //
+    // nullify all remaining triggers mentioned in the alias
+    if (!fDeclTriggerClasses.IsNull()) {
+      TObjArray *tokens = fDeclTriggerClasses.Tokenize(" ");
+      Int_t ntokens = tokens->GetEntriesFast();
+      for (Int_t itoken = 0; itoken < ntokens; ++itoken) {
+       fRawReader->LoadTriggerClass((((TObjString*)tokens->At(itoken))->String()).Data(),-1);
+      }
+      delete tokens;
+    }
+  }
+  //
+}
+
+//___________________________________________________
+Bool_t AliReconstruction::TriggerMatches2Alias(const char* trigName, const char* alias)
+{
+  // check if trigger matches to alias
+  TString trName = trigName;
+  if (!fAlias2Trigger) return kFALSE;
+  TNamed* al = (TNamed*)fAlias2Trigger->FindObject(alias);
+  if (!al) return kFALSE;
+  TString altrig = al->GetTitle();
+  return altrig.Contains(Form(" %s ",trigName));
+  //
+}
index a037f3ae74c50a8d551059766d0c700df9ef3dae..f38431565577a0eab7a3792e8a8089061ffc804c 100644 (file)
@@ -74,6 +74,12 @@ public:
   void           SetOption(const char* detector, const char* option);
   void           SetRecoParam(const char* detector, AliDetectorRecoParam *par);
 
+  void           SetCosmicAlias(const char* nm="kCosmic") {fCosmicAlias = nm;}
+  void           SetLaserAlias(const char* nm="kCalibLaser") {fLaserAlias = nm;}
+
+  TString&       GetCosmicAlias() const {return (TString&)fCosmicAlias;}
+  TString&       GetLaserAlias()  const {return (TString&)fLaserAlias;}
+
   void           SetRunLocalReconstruction(const char* detectors) {
     fRunLocalReconstruction = detectors;};
   void           SetRunTracking(const char* detectors) {
@@ -272,7 +278,8 @@ private:
 
   Bool_t         InitRecoParams(); // init the array with the reconstruciton parameters
   Bool_t         GetEventInfo();   // fill the event info inside the event loop
-
+  void           ProcessTriggerAliases();
+  Bool_t         TriggerMatches2Alias(const char* trigName, const char* alias);
   const char    *MatchDetectorList(const char *detectorList, UInt_t detectorMask);
 
   //*** Global reconstruction flags *******************
@@ -295,7 +302,10 @@ private:
   Float_t        fV0CsPmin;      // min. allowed cosine of V0 pointing angle 
   Float_t        fDmax;          // max. allowed transverse impact parameter 
   Float_t        fZmax;          // max. allowed longitudinal impact parameter 
-
+  
+  TString        fCosmicAlias;        // alias for cosmic triggers
+  TString        fLaserAlias;         // alias for laser triggers
+  //
   TString        fRunLocalReconstruction; // run the local reconstruction for these detectors
   TString        fRunTracking;        // run the tracking for these detectors
   TString        fFillESD;            // fill ESD for these detectors
@@ -337,7 +347,8 @@ private:
   AliESDVertex*  fDiamondProfileSPD;       // (x,y) diamond profile from SPD for AliITSVertexer3D(Z)
   AliESDVertex*  fDiamondProfile;          // (x,y) diamond profile for AliVertexerTracks (ITS+TPC)
   AliESDVertex*  fDiamondProfileTPC;       // (x,y) diamond profile from TPC for AliVertexerTracks
-  THashTable*    fListOfCosmicTriggers;    // list of cosmic triggers as defined by trigger coordination
+  THashTable*    fListOfCosmicTriggers;    // list of cosmic triggers as defined by trigger coordination (RS for BWD comp)
+  THashList*     fAlias2Trigger;          // list of aliases with string of triggers per alias
 
   AliGRPObject*  fGRPData;              // Data from the GRP/GRP/Data CDB folder