#include <THashTable.h>
#include <TGrid.h>
#include <TMessage.h>
+#include <TUrl.h>
#include "AliAlignObj.h"
#include "AliCDBEntry.h"
#include "AliVertexerTracks.h"
#include "AliTriggerRunScalers.h"
#include "AliCTPTimeParams.h"
-
+#include "AliESDHLTDecision.h"
+#include "AliTriggerInput.h"
ClassImp(AliReconstruction)
//_____________________________________________________________________________
fhltesd(NULL),
fesdf(NULL),
ffile(NULL),
+ ffileF(NULL),
ftree(NULL),
+ ftreeF(NULL),
fhlttree(NULL),
ftVertexer(NULL),
fIsNewRunLoader(kFALSE),
fhltesd(NULL),
fesdf(NULL),
ffile(NULL),
+ ffileF(NULL),
ftree(NULL),
+ ftreeF(NULL),
fhlttree(NULL),
ftVertexer(NULL),
fIsNewRunLoader(rec.fIsNewRunLoader),
fhltesd = NULL;
fesdf = NULL;
ffile = NULL;
+ ffileF = NULL;
ftree = NULL;
+ ftreeF = NULL;
fhlttree = NULL;
ftVertexer = NULL;
fIsNewRunLoader = rec.fIsNewRunLoader;
AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0");
beamEnergy = 0;
}
- // LHC: "multiply by 120 to get the energy in MeV"
- beamEnergy *= 0.120;
TString runType = fGRPData->GetRunType();
if (runType==AliGRPObject::GetInvalidString()) {
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadCDB()
{
+ // Load CDB entries for all active detectors.
+ // By default we load all the entries in <det>/Calib
+ // folder.
+
AliCodeTimerAuto("",0);
AliCDBManager::Instance()->Get("GRP/CTP/Config");
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadTriggerScalersCDB()
{
+ // Load CTP scalers from OCDB.
+ // The scalers are checked for consistency.
+
AliCodeTimerAuto("",0);
AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/Scalers");
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadCTPTimeParamsCDB()
{
+ // Load CTP timing information (alignment)
+ // from OCDB.
+
AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/CTPtiming");
if (entry) {
//_____________________________________________________________________________
void AliReconstruction::InitRawReader(const char* input)
{
- AliCodeTimerAuto("",0);
-
// Init raw-reader and
// set the input in case of raw data
+
+ AliCodeTimerAuto("",0);
+
if (input) fRawInput = input;
fRawReader = AliRawReader::Create(fRawInput.Data());
if (!fRawReader) {
ftree = new TTree("esdTree", "Tree with ESD objects");
fesd = new AliESDEvent();
fesd->CreateStdContent();
+ // add a so far non-std object to the ESD, this will
+ // become part of the std content
+ fesd->AddObject(new AliESDHLTDecision);
fesd->WriteToTree(ftree);
if (fWriteESDfriend) {
- // careful:
- // Since we add the branch manually we must
- // book and add it after WriteToTree
- // otherwise it is created twice,
- // once via writetotree and once here.
- // The case for AliESDfriend is now
- // caught also in AlIESDEvent::WriteToTree but
- // be careful when changing the name (AliESDfriend is not
- // a TNamed so we had to hardwire it)
- fesdf = new AliESDfriend();
- TBranch *br=ftree->Branch("ESDfriend.","AliESDfriend", &fesdf);
- br->SetFile("AliESDfriends.root");
+ ffileF = TFile::Open("AliESDfriends.root", "RECREATE");
+ ftreeF = new TTree("esdFriendTree", "Tree with ESD Friend objects");
+ fesdf = new AliESDfriend();
+ ftreeF->Branch("ESDfriend.","AliESDfriend", &fesdf);
fesd->AddObject(fesdf);
+ ffile->cd();
}
ftree->GetUserInfo()->Add(fesd);
fhlttree = new TTree("HLTesdTree", "Tree with HLT ESD objects");
fhltesd = new AliESDEvent();
fhltesd->CreateStdContent();
-
// read the ESD template from CDB
// HLT is allowed to put non-std content to its ESD, the non-std
// objects need to be created before invocation of WriteToTree in
//_____________________________________________________________________________
void AliReconstruction::Init(TTree *tree)
{
+ // Implementation of TSelector::Init()
+ // method
if (tree == 0) {
AliError("The input tree is not found!");
return;
// run the reconstruction over a single event
// The event loop is steered in Run method
+
+ static Long_t oldMres=0;
+ static Long_t oldMvir=0;
+ static Float_t oldCPU=0;
+ static Long_t aveDMres=0;
+ static Long_t aveDMvir=0;
+ static Float_t aveDCPU=0;
+
AliCodeTimerAuto("",0);
+ AliESDpid pid;
+
if (iEvent >= fRunLoader->GetNumberOfEvents()) {
fRunLoader->SetEventNumber(iEvent);
fRunLoader->GetHeader()->Reset(fRawReader->GetRunNumber(),
return kTRUE;
}
- AliInfo(Form("processing event %d", iEvent));
fRunLoader->GetEvent(iEvent);
// Fill Event-info object
GetEventInfo();
fRecoParam.SetEventSpecie(fRunInfo,fEventInfo,fListOfCosmicTriggers);
- AliInfo(Form("Current event specie: %s",fRecoParam.PrintEventSpecie()));
+
+ ProcInfo_t procInfo;
+ if(iEvent==fFirstEvent) {
+ gSystem->GetProcInfo(&procInfo);
+ oldMres=procInfo.fMemResident;
+ oldMvir=procInfo.fMemVirtual;
+ oldCPU=procInfo.fCpuUser+procInfo.fCpuSys;
+ }
+ AliInfo(Form("================================= Processing event %d of type %-10s ==================================", iEvent,fRecoParam.PrintEventSpecie()));
// Set the reco-params
{
if (reconstructor && fRecoParam.GetDetRecoParamArray(iDet)) {
const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
reconstructor->SetRecoParam(par);
+ reconstructor->GetPidSettings(&pid);
reconstructor->SetEventInfo(&fEventInfo);
if (fRunQA) {
AliQAManager::QAManager()->SetRecoParam(iDet, par) ;
- AliQAManager::QAManager()->SetEventSpecie(AliRecoParam::Convert(par->GetEventSpecie())) ;
+ if (par) AliQAManager::QAManager()->SetEventSpecie(AliRecoParam::Convert(par->GetEventSpecie())) ;
}
}
}
+ if (fRunQA) {
+ const AliDetectorRecoParam *grppar = fRecoParam.GetDetRecoParam(kNDetectors);
+ AliQAManager::QAManager()->SetRecoParam(AliQAv1::kGLOBAL, grppar) ;
+ AliQAManager::QAManager()->SetEventSpecie(AliRecoParam::Convert(grppar->GetEventSpecie())) ;
+ }
}
// QA on single raw
detectors=fRunLocalReconstruction;
detectors.ReplaceAll("HLT", "");
if (!RunLocalEventReconstruction(detectors)) {
- if (fStopOnError) {CleanUp(); return kFALSE;}
+ if (fStopOnError) {
+ CleanUp();
+ return kFALSE;
+ }
}
}
+
+ // fill Event header information from the RawEventHeader
+ if (fRawReader){FillRawEventHeaderESD(fesd);}
+ if (fRawReader){FillRawEventHeaderESD(fhltesd);}
+
fesd->SetRunNumber(fRunLoader->GetHeader()->GetRun());
fhltesd->SetRunNumber(fRunLoader->GetHeader()->GetRun());
+
+ ((AliESDRun*)fesd->GetESDRun())->SetDetectorsInDAQ(fRunInfo->GetDetectorMask());
+ ((AliESDRun*)fhltesd->GetESDRun())->SetDetectorsInDAQ(fRunInfo->GetDetectorMask());
+ ((AliESDRun*)fesd->GetESDRun())->SetDetectorsInReco(AliDAQ::DetectorPatternOffline(fFillESD.Data()));
+ ((AliESDRun*)fhltesd->GetESDRun())->SetDetectorsInReco(AliDAQ::DetectorPatternOffline(fFillESD.Data()));
+
fesd->SetEventNumberInFile(fRunLoader->GetHeader()->GetEventNrInRun());
fhltesd->SetEventNumberInFile(fRunLoader->GetHeader()->GetEventNrInRun());
fesd->SetMagneticField(AliTracker::GetBz());
fhltesd->SetMagneticField(AliTracker::GetBz());
//
+ ((AliESDRun*)fesd->GetESDRun())->SetBeamEnergyIsSqrtSHalfGeV();
+ ((AliESDRun*)fhltesd->GetESDRun())->SetBeamEnergyIsSqrtSHalfGeV();
+ //
AliMagF* fld = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
if (fld) { // set info needed for field initialization
fesd->SetCurrentL3(fld->GetCurrentSol());
// barrel tracking
if (!fRunTracking.IsNull()) {
- if (!RunTracking(fesd)) {
+ if (!RunTracking(fesd,pid)) {
if (fStopOnError) {CleanUp(); return kFALSE;}
}
}
if (fStopOnError) {CleanUp(); return kFALSE;}
}
}
-
- // fill Event header information from the RawEventHeader
- if (fRawReader){FillRawEventHeaderESD(fesd);}
- if (fRawReader){FillRawEventHeaderESD(fhltesd);}
-
+
// combined PID
- AliESDpid::MakePID(fesd);
+ pid.MakePID(fesd);
if (fFillTriggerESD) {
if (!FillTriggerESD(fesd)) {
ftVertexer->SetITSMode();
ftVertexer->SetConstraintOff();
// get cuts for vertexer from AliGRPRecoParam
+ Bool_t constrSPD=kFALSE;
if (grpRecoParam) {
Int_t nCutsVertexer = grpRecoParam->GetVertexerTracksNCuts();
Double_t *cutsVertexer = new Double_t[nCutsVertexer];
grpRecoParam->GetVertexerTracksCutsITS(cutsVertexer);
ftVertexer->SetCuts(cutsVertexer);
delete [] cutsVertexer; cutsVertexer = NULL;
- if(fDiamondProfile && grpRecoParam->GetVertexerTracksConstraintITS())
- ftVertexer->SetVtxStart(fDiamondProfile);
+ if(grpRecoParam->GetVertexerTracksConstraintITS()) {
+ if(fDiamondProfile && fDiamondProfile->GetXRes()<kRadius){
+ ftVertexer->SetVtxStart(fDiamondProfile); // apply constraint only if sigmax is smaller than the beam pipe radius
+ }else{
+ if(fDiamondProfileSPD && fDiamondProfileSPD->GetXRes()<kRadius){
+ ftVertexer->SetVtxStart(fDiamondProfileSPD);
+ constrSPD=kTRUE;
+ }
+ }
+ }
}
AliESDVertex *pvtx=ftVertexer->FindPrimaryVertex(fesd);
if (pvtx) {
+ if(constrSPD){
+ TString title=pvtx->GetTitle();
+ title.Append("SPD");
+ pvtx->SetTitle(title);
+ }
if (pvtx->GetStatus()) {
fesd->SetPrimaryVertexTracks(pvtx);
for (Int_t i=0; i<ntracks; i++) {
grpRecoParam->GetVertexerTracksCutsTPC(cutsVertexer);
ftVertexer->SetCuts(cutsVertexer);
delete [] cutsVertexer; cutsVertexer = NULL;
- if(fDiamondProfileTPC && grpRecoParam->GetVertexerTracksConstraintTPC())
- ftVertexer->SetVtxStart(fDiamondProfileTPC);
+ if(fDiamondProfileTPC && grpRecoParam->GetVertexerTracksConstraintTPC()) {
+ if(fDiamondProfileTPC->GetXRes()<kRadius) ftVertexer->SetVtxStart(fDiamondProfileTPC); // apply constraint only if sigmax is smaller than the beam pipe radius
+ }
}
pvtx=ftVertexer->FindPrimaryVertex(&trkArray,selectedIdx);
if (pvtx) {
}
delete[] selectedIdx;
- if(fDiamondProfile) fesd->SetDiamond(fDiamondProfile);
-
+ if(fDiamondProfile && fDiamondProfile->GetXRes()<kRadius) fesd->SetDiamond(fDiamondProfile);
+ else fesd->SetDiamond(fDiamondProfileSPD);
if (fRunV0Finder) {
// V0 finding
if (fRunQA && IsInTasks(AliQAv1::kESDS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- AliQAManager::QAManager()->RunOneEvent(fesd) ;
+ AliQAManager::QAManager()->RunOneEvent(fesd, fhltesd) ;
}
if (fRunGlobalQA) {
AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
qadm->Exec(AliQAv1::kESDS, fesd);
}
- if (fWriteESDfriend) {
- // fesdf->~AliESDfriend();
- // new (fesdf) AliESDfriend(); // Reset...
+ // copy HLT decision from HLTesd to esd
+ // the most relevant information is stored in a reduced container in the esd,
+ // while the full information can be found in the HLTesd
+ TObject* pHLTSrc=fhltesd->FindListObject(AliESDHLTDecision::Name());
+ TObject* pHLTTgt=fesd->FindListObject(AliESDHLTDecision::Name());
+ if (pHLTSrc && pHLTTgt) {
+ pHLTSrc->Copy(*pHLTTgt);
+ }
+
+ if (fWriteESDfriend)
fesd->GetESDfriend(fesdf);
- }
+
ftree->Fill();
+ if (fWriteESDfriend) ftreeF->Fill();
// Auto-save the ESD tree in case of prompt reco @P2
if (fRawReader && fRawReader->UseAutoSaveESD()) {
ftree->AutoSave("SaveSelf");
+ if (fWriteESDfriend) ftreeF->AutoSave("SaveSelf");
TFile *friendfile = (TFile *)(gROOT->GetListOfFiles()->FindObject("AliESDfriends.root"));
if (friendfile) friendfile->Save();
}
new (fesdf) AliESDfriend(); // Reset...
}
- ProcInfo_t procInfo;
gSystem->GetProcInfo(&procInfo);
- AliInfo(Form("Event %d -> Current memory usage %d %d",iEvent, procInfo.fMemResident, procInfo.fMemVirtual));
+ Long_t dMres=(procInfo.fMemResident-oldMres)/1024;
+ Long_t dMvir=(procInfo.fMemVirtual-oldMvir)/1024;
+ Float_t dCPU=procInfo.fCpuUser+procInfo.fCpuSys-oldCPU;
+ aveDMres+=(dMres-aveDMres)/(iEvent-fFirstEvent+1);
+ aveDMvir+=(dMvir-aveDMvir)/(iEvent-fFirstEvent+1);
+ aveDCPU+=(dCPU-aveDCPU)/(iEvent-fFirstEvent+1);
+ AliInfo(Form("======================= End Event %d: Res %d(%3d <%3d>) Vir %d(%3d <%3d>) CPU %5.2f <%5.2f> ===================",
+ iEvent, procInfo.fMemResident/1024, dMres, aveDMres, procInfo.fMemVirtual/1024, dMvir, aveDMvir, dCPU, aveDCPU));
+ oldMres=procInfo.fMemResident;
+ oldMvir=procInfo.fMemVirtual;
+ oldCPU=procInfo.fCpuUser+procInfo.fCpuSys;
fEventInfo.Reset();
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
ffile->cd();
- if (fWriteESDfriend)
- ftree->SetBranchStatus("ESDfriend*",0);
// we want to have only one tree version number
ftree->Write(ftree->GetName(),TObject::kOverwrite);
fhlttree->Write(fhlttree->GetName(),TObject::kOverwrite);
+ if (fWriteESDfriend) {
+ ffileF->cd();
+ ftreeF->Write(ftreeF->GetName(),TObject::kOverwrite);
+ }
+
// Finish with Plane Efficiency evaluation: before of CleanUp !!!
if (fRunPlaneEff && !FinishPlaneEff()) {
AliWarning("Finish PlaneEff evaluation failed");
TTree* digitsTree = loader->TreeD();
if (!digitsTree) {
AliError(Form("Can't get the %s digits tree", fgkDetectorName[iDet]));
- if (fStopOnError) return kFALSE;
+ if (fStopOnError)
+ return kFALSE;
} else {
reconstructor->Reconstruct(digitsTree, clustersTree);
if (fRunQA && IsInTasks(AliQAv1::kDIGITSR)) {
loader->UnloadRecPoints();
AliSysInfo::AddStamp(Form("LRec%s_%d",fgkDetectorName[iDet],eventNr), iDet,1,eventNr);
}
+ IsSelected("CTP", detStr);
if ((detStr.CompareTo("ALL") != 0) && !detStr.IsNull()) {
AliError(Form("the following detectors were not found: %s",
detStr.Data()));
- if (fStopOnError) return kFALSE;
+ if (fStopOnError)
+ return kFALSE;
}
eventNr++;
return kTRUE;
fSPDTrackleter->SetVertex(vtxPos, vtxErr);
// run trackleting
if (fSPDTrackleter->Clusters2Tracks(esd) != 0) {
- AliError("AliITSTrackleterSPDEff Clusters2Tracks failed");
+ AliWarning("AliITSTrackleterSPDEff Clusters2Tracks failed");
// fLoader[0]->UnloadRecPoints();
return kFALSE;
}
AliVertexer *vertexer = CreateVertexer();
if (!vertexer) return kFALSE;
- AliInfo("running the ITS vertex finder");
+ AliInfo(Form("running the ITS vertex finder: %s",vertexer->ClassName()));
AliESDVertex* vertex = NULL;
if (fLoader[0]) {
fLoader[0]->LoadRecPoints();
//_____________________________________________________________________________
-Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
+Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd,AliESDpid &PID)
{
// run the barrel tracking
static Int_t eventNr=0;
// preliminary PID in TPC needed by the ITS tracker
if (iDet == 1) {
GetReconstructor(1)->FillESD((TTree*)NULL, (TTree*)NULL, esd);
- AliESDpid::MakePID(esd);
+ PID.MakePID(esd,kTRUE);
}
AliSysInfo::AddStamp(Form("Tracking0%s_%d",fgkDetectorName[iDet],eventNr), iDet,3,eventNr);
}
}
// updated PID in TPC needed by the ITS tracker -MI
if (iDet == 1) {
- GetReconstructor(1)->FillESD((TTree*)NULL, (TTree*)NULL, esd);
- AliESDpid::MakePID(esd);
+ //GetReconstructor(1)->FillESD((TTree*)NULL, (TTree*)NULL, esd);
+ //AliESDpid::MakePID(esd);
+ PID.MakePID(esd,kTRUE);
}
AliSysInfo::AddStamp(Form("Tracking1%s_%d",fgkDetectorName[iDet],eventNr), iDet,3, eventNr);
}
static Int_t eventNr=0;
TString detStr = detectors;
+ AliSysInfo::AddStamp(Form("FillESDb%d",eventNr), -19,-19, eventNr);
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
if (!IsSelected(fgkDetectorName[iDet], detStr)) continue;
AliReconstructor* reconstructor = GetReconstructor(iDet);
fLoader[iDet]->UnloadRecPoints();
}
}
-
+
+ IsSelected("CTP", detStr);
if ((detStr.CompareTo("ALL") != 0) && !detStr.IsNull()) {
AliError(Form("the following detectors were not found: %s",
detStr.Data()));
if (fStopOnError) return kFALSE;
}
- AliSysInfo::AddStamp(Form("FillESD%d",eventNr), 0,1, eventNr);
+ AliSysInfo::AddStamp(Form("FillESDe%d",eventNr), -20,-20, eventNr);
eventNr++;
return kTRUE;
}
Int_t idx[200];
for (Int_t i=0; i<200; ++i) idx[i] = -1; //PH avoid uninitialized values
for (Int_t iDet = 5; iDet >= 0; iDet--) {// TOF, TRD, TPC, ITS clusters
- nsp += track->GetNcls(iDet);
+ nsp += (iDet==GetDetIndex("TRD")) ? track->GetTRDntracklets():track->GetNcls(iDet);
- if (iDet==0) { // ITS "extra" clusters
+ if (iDet==GetDetIndex("ITS")) { // ITS "extra" clusters
track->GetClusters(iDet,idx);
for (Int_t i=6; i<12; i++) if(idx[i] >= 0) nsp++;
}
for (Int_t iDet = 5; iDet >= 0; iDet--) {
AliTracker *tracker = fTracker[iDet];
if (!tracker) continue;
- Int_t nspdet = track->GetClusters(iDet,idx);
+ Int_t nspdet = (iDet==GetDetIndex("TRD")) ? track->GetTRDtracklets(idx):track->GetClusters(iDet,idx);
- if (iDet==0) // ITS "extra" clusters
+ if (iDet==GetDetIndex("ITS")) // ITS "extra" clusters
for (Int_t i=6; i<12; i++) if(idx[i] >= 0) nspdet++;
if (nspdet <= 0) continue;
}
isp2++;
if (!isvalid) continue;
- if (iDet==0 && (isp-1)>=6) p.SetExtra();
+ if (iDet==GetDetIndex("ITS") && (isp-1)>=6) p.SetExtra();
sp->AddPoint(isptrack,&p); isptrack++;
}
}
}
//_____________________________________________________________________________
-void AliReconstruction::CheckQA()
-{
+// void AliReconstruction::CheckQA()
+// {
// check the QA of SIM for this run and remove the detectors
// with status Fatal
// fRunLocalReconstruction = newRunLocalReconstruction ;
// fRunTracking = newRunTracking ;
// fFillESD = newFillESD ;
-}
+// }
//_____________________________________________________________________________
Int_t AliReconstruction::GetDetIndex(const char* detector)
// Input: none
// Return: kTRUE if all operations have been done properly, kFALSE otherwise
//
- AliWarning(Form("Implementation of this method not yet completed !! Method return kTRUE"));
fSPDTrackleter = NULL;
TString detStr = fLoadCDB;
}
Int_t colon = detAndAction.Index(":") ;
fQADetectors = detAndAction(0, colon) ;
- if (fQADetectors.Contains("ALL") ){
- TString tmp = fFillESD ;
- Int_t minus = fQADetectors.Last('-') ;
- TString toKeep = fFillESD ;
- TString toRemove("") ;
- while (minus >= 0) {
- toRemove = fQADetectors(minus+1, fQADetectors.Length()) ;
- toRemove = toRemove.Strip() ;
- toKeep.ReplaceAll(toRemove, "") ;
- fQADetectors.ReplaceAll(Form("-%s", toRemove.Data()), "") ;
- minus = fQADetectors.Last('-') ;
- }
- fQADetectors = toKeep ;
- }
- fQATasks = detAndAction(colon+1, detAndAction.Sizeof() ) ;
+ fQATasks = detAndAction(colon+1, detAndAction.Sizeof() ) ;
if (fQATasks.Contains("ALL") ) {
fQATasks = Form("%d %d %d %d", AliQAv1::kRAWS, AliQAv1::kDIGITSR, AliQAv1::kRECPOINTS, AliQAv1::kESDS) ;
} else {
Int_t nclasses = classesArray.GetEntriesFast();
for( Int_t iclass=0; iclass < nclasses; iclass++ ) {
AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass);
- if (trclass) {
+ if (trclass && trclass->GetMask()>0) {
Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMask()));
fesd->SetTriggerClass(trclass->GetName(),trindex);
if (fRawReader) fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
}
fEventInfo.SetTriggerClasses(trclasses);
+ // Write names of active trigger inputs in ESD Header
+ const TObjArray& inputsArray = config->GetInputs();
+ Int_t ninputs = inputsArray.GetEntriesFast();
+ for( Int_t iinput=0; iinput < ninputs; iinput++ ) {
+ AliTriggerInput* trginput = (AliTriggerInput*)inputsArray.At(iinput);
+ if (trginput && trginput->GetMask()>0) {
+ Int_t inputIndex = (Int_t)TMath::Nint(TMath::Log2(trginput->GetMask()));
+ AliESDHeader* headeresd = fesd->GetHeader();
+ Int_t trglevel = (Int_t)trginput->GetLevel();
+ if (trglevel == 0) headeresd->SetActiveTriggerInputs(trginput->GetInputName(), inputIndex);
+ if (trglevel == 1) headeresd->SetActiveTriggerInputs(trginput->GetInputName(), inputIndex+24);
+ if (trglevel == 2) headeresd->SetActiveTriggerInputs(trginput->GetInputName(), inputIndex+48);
+ }
+ }
+
// Set the information in ESD
fesd->SetTriggerMask(trmask);
fesd->SetTriggerCluster(clustmask);