Possibility to filter the ESD friends and add objects to AliESDfriends.root. Major...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jan 2010 15:13:42 +0000 (15:13 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jan 2010 15:13:42 +0000 (15:13 +0000)
23 files changed:
ANALYSIS/ANALYSIScalibLinkDef.h [new file with mode: 0644]
ANALYSIS/AliAnalysisManager.cxx
ANALYSIS/AliAnalysisTaskAddObject.cxx [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskAddObject.h [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskCopyESD.cxx [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskCopyESD.h [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilter.cxx [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilter.h [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilterFriend.cxx [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilterFriend.h [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilterFriendSecond.cxx [new file with mode: 0644]
ANALYSIS/AliAnalysisTaskFilterFriendSecond.h [new file with mode: 0644]
ANALYSIS/libANALYSIScalib.pkg [new file with mode: 0644]
STEER/AliESDHandler.cxx [new file with mode: 0644]
STEER/AliESDHandler.h [new file with mode: 0644]
STEER/AliESDfriend.cxx
STEER/AliESDfriend.h
STEER/AliESDfriendTrack.cxx
STEER/AliESDfriendTrack.h
STEER/AliESDtrack.cxx
STEER/ESDLinkDef.h
STEER/libESD.pkg
build/module.dep

diff --git a/ANALYSIS/ANALYSIScalibLinkDef.h b/ANALYSIS/ANALYSIScalibLinkDef.h
new file mode 100644 (file)
index 0000000..88aed78
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliAnalysisTaskCopyESD+;
+#pragma link C++ class AliAnalysisTaskFilter+;
+#pragma link C++ class AliAnalysisTaskFilterFriend+;
+#pragma link C++ class AliAnalysisTaskFilterFriendSecond+;
+#pragma link C++ class AliAnalysisTaskAddObject+;
+
+#endif
index ecd2bdf..d3967ab 100644 (file)
@@ -773,7 +773,9 @@ void AliAnalysisManager::Terminate()
       TFile *file = output->GetFile();
       if (!file) file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
       if (!file) {
-         if (handlerFile == filename && !gSystem->AccessPathName(filename)) open_option = "UPDATE";
+             printf("Terminate : handlerFile = %s, filename = %s\n",handlerFile.Data(),filename);
+             //if (handlerFile == filename && !gSystem->AccessPathName(filename)) open_option = "UPDATE";
+         if (!gSystem->AccessPathName(filename)) open_option = "UPDATE";
          file = new TFile(filename, open_option);
       }
       if (file->IsZombie()) {
diff --git a/ANALYSIS/AliAnalysisTaskAddObject.cxx b/ANALYSIS/AliAnalysisTaskAddObject.cxx
new file mode 100644 (file)
index 0000000..6190d18
--- /dev/null
@@ -0,0 +1,143 @@
+/**************************************************************************
+ * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*$Id$*/
+
+/////////////////////////////////////////////////////////////
+//
+//   Test task to add an object to the new AliESDfriends file
+//
+// /////////////////////////////////////////////////////////////
+
+#include <TTree.h>
+#include <TChain.h>
+#include <TFile.h>
+#include <TH1D.h>
+
+#include "AliLog.h"
+#include "AliESDInputHandler.h"
+#include "AliESDtrack.h"
+#include "AliESDEvent.h"
+#include "AliESDfriend.h"
+#include "AliAnalysisTask.h"
+#include "AliAnalysisManager.h"
+#include "AliAnalysisTaskAddObject.h"
+
+
+ClassImp(AliAnalysisTaskAddObject)
+
+
+//________________________________________________________________________
+AliAnalysisTaskAddObject::AliAnalysisTaskAddObject():
+AliAnalysisTask(),
+fESDInput(0x0),
+fESDfriendInput(0x0),
+fESDhandler(0x0),
+fh(0x0)
+{
+       // Dummy Constructor
+       
+}
+
+//________________________________________________________________________
+AliAnalysisTaskAddObject::AliAnalysisTaskAddObject(const char* name):
+AliAnalysisTask(name,"Adding an object"),
+fESDInput(0),
+fESDfriendInput(0),
+fESDhandler(0x0),
+fh(0x0)
+{
+       // Constructor
+       
+       // Define input and output slots here
+       // Input slot #0 works with a TChain
+       DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //      DefineOutput(0,TTree::Class());  
+       // Output slot #1 writes into a TH1D
+       DefineOutput(0,TH1D::Class());  
+}
+
+//________________________________________________________________________
+AliAnalysisTaskAddObject::~AliAnalysisTaskAddObject()
+{
+
+       // dtor
+       if (fh){
+               delete fh;
+               fh = 0x0;
+       }
+}  
+
+//______________________________________________________________________________
+void AliAnalysisTaskAddObject::ConnectInputData(Option_t* /*option*/)
+{
+       //
+       // Connect the input data
+       //
+
+       printf("AliAnalysisTaskAddObject::ConnectInputData()\n");
+       AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+       if (!mgr) AliFatal("No analysis manager available");
+       fESDhandler = dynamic_cast<AliESDInputHandler *>(mgr->GetInputEventHandler());
+    
+       if (fESDhandler) {
+               fESDInput = fESDhandler->GetEvent();
+       } else {
+               AliFatal("No ESD input event handler connected") ; 
+       }
+}
+//________________________________________________________________________
+void AliAnalysisTaskAddObject::CreateOutputObjects()
+{
+       //
+       // Create the output container
+       //
+       //OpenFile(0,"UPDATE");
+       fh = new TH1D("fh1","Integrated Length",100,0,1000);
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskAddObject::Exec(Option_t */*option*/)
+{
+
+       //      if (fDebug > 1) {
+               Long_t entry = fESDhandler->GetReadEntry();
+               Printf("AliAnalysisTaskAddObject::Exec() %s ==> processing event %lld\n", fESDhandler->GetTree()->GetCurrentFile()->GetName(),entry);
+               //}  
+       fESDInput = fESDhandler->GetEvent();
+       if(!fESDInput) {
+               printf("AliAnalysisTaskAddObject::Exec(): no ESD \n");
+               return;
+       } 
+       for (Int_t i = 0; i< fESDInput->GetNumberOfTracks(); i++){
+               AliESDtrack* t = fESDInput->GetTrack(i);
+               Double_t l = t->GetIntegratedLength();
+               fh->Fill(l);
+       }
+       PostData(0,fh);
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskAddObject::Terminate(Option_t */*option*/)
+{
+       // Terminate analysis
+       //
+       AliDebug(2,"AliAnalysisTaskAddObject: Terminate() \n");
+       
+       return;
+}
diff --git a/ANALYSIS/AliAnalysisTaskAddObject.h b/ANALYSIS/AliAnalysisTaskAddObject.h
new file mode 100644 (file)
index 0000000..c539c58
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef ALIANALYSISTASKADDOBJECT_H
+#define ALIANALYSISTASKADDOBJECT_H
+
+/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*$Id$*/
+
+//*************************************************************************
+// Class AliAnalysisTaskAddObject
+// Test Task to add an object to the new ESDfriends file 
+//*************************************************************************
+
+class TH1D;
+
+#include "AliAnalysisTask.h"
+
+class AliESDInputHandler;
+class AliESDEvent;
+class AliESDfriend;
+
+class AliAnalysisTaskAddObject : public AliAnalysisTask
+{
+ public:
+
+       AliAnalysisTaskAddObject();
+       AliAnalysisTaskAddObject(const char *name);
+       virtual ~AliAnalysisTaskAddObject();
+       // Implementation of interface methods
+       virtual void CreateOutputObjects();
+       virtual void Exec(Option_t *option);
+       virtual void Terminate(Option_t *option);
+       virtual void ConnectInputData(Option_t *option = "");
+               
+ private:
+       
+       AliAnalysisTaskAddObject(const AliAnalysisTaskAddObject &);
+       AliAnalysisTaskAddObject& operator=(const AliAnalysisTaskAddObject&);
+       
+       AliESDEvent  *fESDInput;        // ESD input object
+       AliESDfriend *fESDfriendInput;  // ESD input friend object
+       AliESDInputHandler *fESDhandler;     // Pointer to ESD input handler
+       TH1D* fh; // histogram
+       
+ ClassDef(AliAnalysisTaskAddObject,1); // AliAnalysisTask to create an extra object
+};
+
+#endif
+
diff --git a/ANALYSIS/AliAnalysisTaskCopyESD.cxx b/ANALYSIS/AliAnalysisTaskCopyESD.cxx
new file mode 100644 (file)
index 0000000..23ab60e
--- /dev/null
@@ -0,0 +1,99 @@
+/**************************************************************************
+* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+*                                                                        *
+* Author: The ALICE Off-line Project.                                    *
+* Contributors are mentioned in the code where appropriate.              *
+*                                                                        *
+* Permission to use, copy, modify and distribute this software and its   *
+* documentation strictly for non-commercial purposes is hereby granted   *
+* without fee, provided that the above copyright notice appears in all   *
+* copies and that both the copyright notice and this permission notice   *
+* appear in the supporting documentation. The authors make no claims     *
+* about the suitability of this software for any purpose. It is          *
+* provided "as is" without express or implied warranty.                  *
+**************************************************************************/
+
+/* $Id$ */
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Task to Copy ESDs
+//
+////////////////////////////////////////////////////////////////////////
+
+
+#include <TTree.h>
+
+#include "AliAnalysisTaskFilter.h"
+#include "AliAnalysisTaskCopyESD.h"
+#include "AliESDEvent.h"
+#include "AliLog.h"
+#include "AliESDfriend.h"
+
+ClassImp(AliAnalysisTaskCopyESD)
+
+////////////////////////////////////////////////////////////////////////
+
+AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD():
+       AliAnalysisTaskFilter(),
+       fESDEvent(0x0),
+       fESDfriend(0x0)
+{
+       // Default constructor
+       //DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //DefineOutput(0,TTree::Class());  //My private output
+}
+//-------------------------------------------------------------------------------
+AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD(const char* name):
+       AliAnalysisTaskFilter(name),
+       fESDEvent(0x0),
+       fESDfriend(0x0)
+{
+       // Constructor
+}
+
+//-------------------------------------------------------------------------------
+void AliAnalysisTaskCopyESD::UserCreateOutputObjects()
+{
+       // Create the output container
+       AliInfo("In UserCreateOuptputObject");
+}
+
+//-------------------------------------------------------------------------------
+void AliAnalysisTaskCopyESD::Init()
+{
+       // Initialization
+       if (fDebug > 1) AliInfo("Init() \n");
+}
+
+
+//-------------------------------------------------------------------------------
+void AliAnalysisTaskCopyESD::UserExec(Option_t */*option*/)
+{
+       // Execute analysis for current event
+       //
+       
+       Long64_t ientry = Entry();
+
+       AliInfo("Copying event");       
+       AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent());
+       fESDEvent = ESDEvent(); // get the output ESD
+       fESDfriend = ESDfriend();  // get the output friend
+       esd->Copy(*fESDEvent);
+
+       // releasing tracks to avoid copying them 
+       //      for (Int_t i = 0; i<fESDEvent->GetNumberOfTracks(); i++){
+       //      fESDEvent->GetTrack(i)->ReleaseESDfriendTrack();
+       //}
+}
+
+
+//-------------------------------------------------------------------------------
+void AliAnalysisTaskCopyESD::Terminate(Option_t */*option*/)
+{
+       // Terminate analysis
+       //
+       if (fDebug > 1) printf("AnalysisCopyESD: Terminate() \n");
+}
+
diff --git a/ANALYSIS/AliAnalysisTaskCopyESD.h b/ANALYSIS/AliAnalysisTaskCopyESD.h
new file mode 100644 (file)
index 0000000..6917401
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef ALIANALYSISTASKCOPYESD_H
+#define ALIANALYSISTASKCOPYESD_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include "AliAnalysisTaskFilter.h"
+#include "AliESDtrack.h"
+#include "AliESDEvent.h"
+#include "AliESDfriend.h"
+
+class AliAnalysisTaskCopyESD : public AliAnalysisTaskFilter
+{
+ public:
+       AliAnalysisTaskCopyESD();
+       AliAnalysisTaskCopyESD(const char* name);
+       virtual ~AliAnalysisTaskCopyESD() {;}
+       // Implementation of interface methods
+       virtual void   UserCreateOutputObjects();
+       virtual void   Init();
+       virtual void   LocalInit() {Init();}
+       virtual void   UserExec(Option_t *option);
+       virtual void   Terminate(Option_t *option);
+       
+       
+ private:
+       AliAnalysisTaskCopyESD(const AliAnalysisTaskCopyESD&);
+       AliAnalysisTaskCopyESD& operator=(const AliAnalysisTaskCopyESD&);
+       
+       AliESDEvent* fESDEvent;
+       AliESDfriend* fESDfriend;
+
+       
+       ClassDef(AliAnalysisTaskCopyESD, 1);
+};
+
+#endif
diff --git a/ANALYSIS/AliAnalysisTaskFilter.cxx b/ANALYSIS/AliAnalysisTaskFilter.cxx
new file mode 100644 (file)
index 0000000..ce9e98f
--- /dev/null
@@ -0,0 +1,228 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//////////////////////////////////////////////////////////////////////////
+//
+//  Base class for filtering friends
+//
+//////////////////////////////////////////////////////////////////////////
+#include <TChain.h>
+#include <TFile.h>
+#include <TList.h>
+
+#include "AliAnalysisTaskFilter.h"
+#include "AliAnalysisManager.h"
+#include "AliAnalysisDataSlot.h"
+#include "AliESDEvent.h"
+#include "AliESD.h"
+#include "AliVEvent.h"
+#include "AliESDHandler.h"
+#include "AliInputEventHandler.h"
+#include "AliLog.h"
+#include "AliESDfriend.h"
+#include "AliESDfriendTrack.h"
+
+
+ClassImp(AliAnalysisTaskFilter)
+
+////////////////////////////////////////////////////////////////////////
+
+AliAnalysisTaskFilter::AliAnalysisTaskFilter():
+       AliAnalysisTask(),
+       fDebug(0),
+       fEntry(0),
+       fInputEvent(0x0),
+       fInputHandler(0x0),
+       fOutputESD(0x0),
+       fOutputESDfriend(0x0),
+       fTreeE(0x0)
+{
+       //
+       // Default constructor
+       //
+}
+
+//______________________________________________________________________
+
+AliAnalysisTaskFilter::AliAnalysisTaskFilter(const char* name):
+       AliAnalysisTask(name, "AnalysisTaskFilter"),
+       fDebug(0),
+       fEntry(0),
+       fInputEvent(0x0),
+       fInputHandler(0x0),
+       fOutputESD(0x0),
+       fOutputESDfriend(0x0),
+       fTreeE(0x0)
+{
+       //
+       // Default constructor
+       //
+
+       DefineInput (0, TChain::Class());
+       DefineOutput(0,  TTree::Class());
+}
+
+//______________________________________________________________________
+
+AliAnalysisTaskFilter::AliAnalysisTaskFilter(const AliAnalysisTaskFilter& obj):
+       AliAnalysisTask(obj),
+       fDebug(0),
+       fEntry(0),
+       fInputEvent(0x0),
+       fInputHandler(0x0),
+       fOutputESD(0x0),
+       fOutputESDfriend(0x0),
+       fTreeE(0x0)
+{
+       //
+       // Copy constructor
+       //
+
+       fDebug        = obj.fDebug;
+       fEntry        = obj.fEntry;
+       fInputEvent   = obj.fInputEvent;
+       fInputHandler = obj.fInputHandler;
+       fOutputESD    = obj.fOutputESD;
+       fOutputESDfriend = obj.fOutputESDfriend;
+       fTreeE        = obj.fTreeE;    
+}
+
+
+//______________________________________________________________________
+
+AliAnalysisTaskFilter& AliAnalysisTaskFilter::operator=(const AliAnalysisTaskFilter& other)
+{
+       //
+       // Assignment
+       //
+
+       AliAnalysisTask::operator=(other);
+       fDebug        = other.fDebug;
+       fEntry        = other.fEntry;
+       fInputEvent   = other.fInputEvent;
+       fInputHandler = other.fInputHandler;
+       fOutputESD    = other.fOutputESD;
+       fOutputESDfriend = other.fOutputESDfriend;
+       fTreeE        = other.fTreeE;    
+       return *this;
+}
+
+
+//______________________________________________________________________
+
+void AliAnalysisTaskFilter::ConnectInputData(Option_t* /*option*/)
+{
+       //
+       // Connect the input data
+       //
+
+       if (fDebug > 1) printf("AnalysisTaskFilter::ConnectInputData() \n");
+       fInputHandler = (AliInputEventHandler*) 
+               ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
+       if (fInputHandler) {
+               fInputEvent = fInputHandler->GetEvent();
+       } else {
+               AliError("No Input Event Handler connected") ; 
+               return ; 
+       }
+}
+
+//______________________________________________________________________
+
+void AliAnalysisTaskFilter::CreateOutputObjects()
+{
+       //
+       // Create the output container
+       //
+
+       if (fDebug > 1) printf("AnalysisTaskFilter::CreateOutPutData() \n");
+
+       AliESDHandler* handler = (AliESDHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
+    
+       if (handler) {
+               fOutputESD   = handler->GetESD();
+               fTreeE = handler->GetTree();
+               fOutputESD->GetStdContent();
+       }
+       else {
+               AliWarning("No AOD Event Handler connected.") ; 
+       }
+
+       UserCreateOutputObjects();
+}
+
+//______________________________________________________________________
+
+void AliAnalysisTaskFilter::Exec(Option_t* option)
+{
+       //
+       // Exec analysis of one event
+       //
+
+       if (fDebug > 1) AliInfo("AliAnalysisTaskFilter::Exec() \n");
+
+       if( fInputHandler ) {
+               fEntry = fInputHandler->GetReadEntry();
+       }
+    
+          
+       if ( !((Entry()-1)%100) && fDebug > 0) {
+               AliInfo(Form("%s ----> Processing event # %lld", CurrentFileName(), Entry()));
+       }
+       AliESDHandler* handler = (AliESDHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
+       
+       if (UserSelectESDfriendForCurrentEvent()){
+               // Call the user analysis only if the event was selected   
+               fOutputESDfriend   = handler->GetESDfriend();
+               UserExec(option);
+       }
+
+       // Added protection in case the derived task is not an AOD producer.
+       AliAnalysisDataSlot *out0 = GetOutputSlot(0);
+       if (out0 && out0->IsConnected()) PostData(0, fTreeE);    
+}
+
+//______________________________________________________________________
+
+const char* AliAnalysisTaskFilter::CurrentFileName()
+{
+       // Returns the current file name    
+       if( fInputHandler ){
+               return fInputHandler->GetTree()->GetCurrentFile()->GetName();
+       }
+       else return "";
+}
+
+//______________________________________________________________________
+
+void AliAnalysisTaskFilter::AddFriendTrackAt(AliESDfriendTrack* t, Int_t index)
+{
+       //
+       // Adds the friend track at the i-th position in the TClonesArray
+       // of the ESD friend tracks
+       //
+
+       AliESDfriendTrack* currentTrack = (AliESDfriendTrack*)fOutputESDfriend->GetTrack(index);
+       if(currentTrack && currentTrack->GetCalibObject(0)){
+               AliWarning("Friend already there");
+       }
+       else {
+               //              AliInfo("Adding track");
+               fOutputESDfriend->AddTrackAt(t,index);
+       }
+}
diff --git a/ANALYSIS/AliAnalysisTaskFilter.h b/ANALYSIS/AliAnalysisTaskFilter.h
new file mode 100644 (file)
index 0000000..f13889c
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef ALIANALYSISTASKFILTER_H
+#define ALIANALYSISTASKFILTER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+//////////////////////////////////////////////////////////////////////////
+//
+//  Base class for filtering friends
+//
+//////////////////////////////////////////////////////////////////////////
+
+#include "AliAnalysisTask.h"
+class AliVEvent;
+class AliESDEvent;
+class AliESDfriend;
+class AliInputEventHandler;
+class AliESDfriendTrack;
+
+class TTree;
+
+class AliAnalysisTaskFilter : public AliAnalysisTask
+{
+ public:
+       AliAnalysisTaskFilter();
+       AliAnalysisTaskFilter(const char* name);
+       AliAnalysisTaskFilter(const AliAnalysisTaskFilter& obj);
+       AliAnalysisTaskFilter& operator=(const AliAnalysisTaskFilter& other);
+       virtual ~AliAnalysisTaskFilter() {;}
+
+       // Implementation of interface methods
+       virtual void ConnectInputData(Option_t *option = "");
+       virtual void CreateOutputObjects();
+       virtual void Exec(Option_t* option);
+       virtual void SetDebugLevel(Int_t level) {fDebug = level;}
+       virtual void Init() {;}
+       virtual void UserCreateOutputObjects()  {;}
+       virtual void UserExec(Option_t* /*option*/) {;}
+
+       // To be implemented by user
+       virtual Bool_t UserSelectESDfriendForCurrentEvent(){return kTRUE;}
+
+       // Getters
+       virtual Int_t         DebugLevel()  {return fDebug;     }
+       virtual AliVEvent*    InputEvent()  {return fInputEvent;}
+       virtual AliESDEvent*  ESDEvent()    {return fOutputESD; }
+       virtual AliESDfriend* ESDfriend()   {return fOutputESDfriend; }
+       virtual TTree*        OutputTree()  {return fTreeE;     }
+       virtual Long64_t      Entry()       {return fEntry;     }
+       virtual const char*   CurrentFileName();
+
+       // To add a friend track
+       void AddFriendTrackAt(AliESDfriendTrack* t, Int_t index);
+
+ protected:
+       Int_t                 fDebug;           //  Debug flag
+       Int_t                 fEntry;           //  Current entry in the chain
+       AliVEvent*            fInputEvent;      //! VEvent Input
+       AliInputEventHandler* fInputHandler;    //! Input Handler
+       AliESDEvent*          fOutputESD;       //! ESD out 
+       AliESDfriend*         fOutputESDfriend; //! ESD friend out 
+       TTree*                fTreeE;           //  ESD output Tree
+       
+       ClassDef(AliAnalysisTaskFilter, 1); // Analysis task for filtering friends
+};
+
+#endif
diff --git a/ANALYSIS/AliAnalysisTaskFilterFriend.cxx b/ANALYSIS/AliAnalysisTaskFilterFriend.cxx
new file mode 100644 (file)
index 0000000..628cde3
--- /dev/null
@@ -0,0 +1,174 @@
+/**************************************************************************
+ * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*$Id$*/
+
+/////////////////////////////////////////////////////////////
+//
+//   Test task
+//
+// /////////////////////////////////////////////////////////////
+
+#include <TTree.h>
+#include <TChain.h>
+
+#include "AliLog.h"
+#include "AliESDInputHandler.h"
+#include "AliESDtrack.h"
+#include "AliESDEvent.h"
+#include "AliESDfriend.h"
+#include "AliAnalysisTaskFilter.h"
+#include "AliAnalysisManager.h"
+#include "AliAnalysisTaskFilterFriend.h"
+
+
+ClassImp(AliAnalysisTaskFilterFriend)
+
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriend::AliAnalysisTaskFilterFriend():
+AliAnalysisTaskFilter(),
+fESDInput(0),
+fESDfriendInput(0)
+{
+       // Constructor
+       
+       // Define input and output slots here
+       // Input slot #0 works with a TChain
+       DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //DefineOutput(0,TTree::Class());  
+}
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriend::AliAnalysisTaskFilterFriend(const char* name):
+AliAnalysisTaskFilter(name),
+fESDInput(0),
+fESDfriendInput(0)
+{
+       // Constructor
+       
+       // Define input and output slots here
+       // Input slot #0 works with a TChain
+       DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //DefineOutput(0,TTree::Class());  
+}
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriend::~AliAnalysisTaskFilterFriend()
+{
+
+       // dtor
+
+}  
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriend::Init()
+{
+       // Initialization
+       
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriend::UserCreateOutputObjects()
+{
+       //
+       // Create the output container
+       //
+       
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriend::UserExec(Option_t */*option*/)
+{
+
+       AliInfo("Filling Friends");
+
+       fESDInput = dynamic_cast<AliESDEvent*>(InputEvent()); // get the input ESD
+       fESDfriendInput = (AliESDfriend*)(fESDInput->FindListObject("AliESDfriend"));
+       if(!fESDInput) {
+               printf("AliAnalysisTaskFilterFriend::Exec(): no ESD \n");
+               return;
+       } 
+       if(!fESDfriendInput) {
+               printf("AliAnalysisTaskFilterFriend::Exec(): no ESDfriend \n");
+               return;
+       } 
+       // attach ESDfriend
+       AliESDEvent* esdEventOutput = (AliESDEvent*)ESDEvent();
+       
+       AliESDfriend* esdFriendOutput = (AliESDfriend*)ESDfriend();  
+       AliInfo(Form("Number of ESD tracks in input = %d ",fESDInput->GetNumberOfTracks()));
+       AliInfo(Form("Number of ESD tracks in output = %d ",esdEventOutput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in input friends = %d ",fESDfriendInput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in output friendsNew before filtering = %d ",esdFriendOutput->GetNumberOfTracks()));
+       
+       AliESDfriendTrack* tNull = new AliESDfriendTrack();
+
+       for (Int_t i = 0; i< fESDInput->GetNumberOfTracks(); i++){
+               if (i%2 ==0){
+                       // keep friend
+                       AliInfo(Form("Keeping %d-th track",i));
+                       esdEventOutput->GetTrack(i);
+                       AliESDfriendTrack* tOld = (AliESDfriendTrack*)fESDfriendInput->GetTrack(i);
+                       AliDebug(2,Form("1P of the %d-th track = %f",i,tOld->Get1P()));
+                       AliInfo(Form("1P of the %d-th track = %f",i,tOld->Get1P()));
+                       AliInfo(Form("MaxITScluster %d-th track = %d",i,tOld->GetMaxITScluster()));
+                       //      tOld->Dump();
+                       AddFriendTrackAt(tOld,i);
+               
+               }
+               else {
+                       //discard friend 
+                       AddFriendTrackAt(tNull,i);
+               }
+               
+       } 
+       AliInfo(Form("Number of tracks in output friendsNew after filtering = %d ",esdFriendOutput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in output friendsNew after filtering with GetEntries() = %d ",esdFriendOutput->GetEntriesInTracks()));
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriend::Terminate(Option_t */*option*/)
+{
+       // Terminate analysis
+       //
+       AliDebug(2,"AliAnalysisTaskFilterFriend: Terminate() \n");
+       
+       return;
+}
+//________________________________________________________________________
+Bool_t AliAnalysisTaskFilterFriend::UserSelectESDfriendForCurrentEvent()
+{
+       // 
+       // Selecting or discarding current event
+       //
+
+       
+       fESDInput = dynamic_cast<AliESDEvent*>(InputEvent()); // get the input ESD
+       if ((fESDInput->GetNumberOfTracks())%2 == 0) {
+               AliInfo("Selecting event");
+               return kTRUE;
+       }
+       AliInfo("Discarding event");    
+       return kFALSE;
+       /*
+       return kTRUE;
+       */
+}
diff --git a/ANALYSIS/AliAnalysisTaskFilterFriend.h b/ANALYSIS/AliAnalysisTaskFilterFriend.h
new file mode 100644 (file)
index 0000000..3cd4d75
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef ALIANALYSISTASKFILTERFRIEND_H
+#define ALIANALYSISTASKFILTERFRIEND_H
+
+/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*$Id$*/
+
+//*************************************************************************
+// Class AliAnalysisTaskFilterFriend
+// Test Task 
+//*************************************************************************
+
+#include "AliAnalysisTaskFilter.h"
+
+class AliAnalysisTaskFilterFriend : public AliAnalysisTaskFilter
+{
+ public:
+
+  AliAnalysisTaskFilterFriend();
+  AliAnalysisTaskFilterFriend(const char *name);
+  virtual ~AliAnalysisTaskFilterFriend();
+
+  // Implementation of interface methods
+  virtual void UserCreateOutputObjects();
+  virtual Bool_t UserSelectESDfriendForCurrentEvent();
+  virtual void Init();
+  virtual void LocalInit() {Init();}
+  virtual void UserExec(Option_t *option);
+  virtual void Terminate(Option_t *option);
+
+ private:
+
+  AliAnalysisTaskFilterFriend(const AliAnalysisTaskFilterFriend &);
+  AliAnalysisTaskFilterFriend& operator=(const AliAnalysisTaskFilterFriend&);
+
+  AliESDEvent  *fESDInput;        // ESD input object
+  AliESDfriend *fESDfriendInput;  // ESD input friend object
+  ClassDef(AliAnalysisTaskFilterFriend,1); 
+};
+
+#endif
+
diff --git a/ANALYSIS/AliAnalysisTaskFilterFriendSecond.cxx b/ANALYSIS/AliAnalysisTaskFilterFriendSecond.cxx
new file mode 100644 (file)
index 0000000..2deceb8
--- /dev/null
@@ -0,0 +1,170 @@
+/**************************************************************************
+ * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*$Id$*/
+
+/////////////////////////////////////////////////////////////
+//
+//   Test task
+//
+// /////////////////////////////////////////////////////////////
+
+#include <TTree.h>
+#include <TChain.h>
+
+#include "AliLog.h"
+#include "AliESDInputHandler.h"
+#include "AliESDtrack.h"
+#include "AliESDEvent.h"
+#include "AliESDfriend.h"
+#include "AliAnalysisTaskFilter.h"
+#include "AliAnalysisManager.h"
+#include "AliAnalysisTaskFilterFriendSecond.h"
+
+
+ClassImp(AliAnalysisTaskFilterFriendSecond)
+
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriendSecond::AliAnalysisTaskFilterFriendSecond():
+AliAnalysisTaskFilter(),
+fESDInput(0),
+fESDfriendInput(0)
+{
+       // Constructor
+       
+       // Define input and output slots here
+       // Input slot #0 works with a TChain
+       DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //      DefineOutput(0,TTree::Class());  
+}
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriendSecond::AliAnalysisTaskFilterFriendSecond(const char* name):
+AliAnalysisTaskFilter(name),
+fESDInput(0),
+fESDfriendInput(0)
+{
+       // Constructor
+       
+       // Define input and output slots here
+       // Input slot #0 works with a TChain
+       DefineInput(0, TChain::Class());
+       // Output slot #0 writes into a TTree
+       //DefineOutput(0,TTree::Class());  
+}
+
+//________________________________________________________________________
+AliAnalysisTaskFilterFriendSecond::~AliAnalysisTaskFilterFriendSecond()
+{
+
+       // dtor
+
+}  
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriendSecond::Init()
+{
+       // Initialization
+       
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriendSecond::UserCreateOutputObjects()
+{
+       //
+       // Create the output container
+       //
+       
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriendSecond::UserExec(Option_t */*option*/)
+{
+
+       AliInfo("Filling Friends");
+
+       fESDInput = dynamic_cast<AliESDEvent*>(InputEvent()); // get the input ESD
+       fESDfriendInput = (AliESDfriend*)(fESDInput->FindListObject("AliESDfriend"));
+       if(!fESDInput) {
+               printf("AliAnalysisTaskFilterFriendSecond::Exec(): no ESD \n");
+               return;
+       } 
+       if(!fESDfriendInput) {
+               printf("AliAnalysisTaskFilterFriendSecond::Exec(): no ESDfriend \n");
+               return;
+       } 
+       // attach ESDfriend
+       AliESDEvent* esdEventOutput = (AliESDEvent*)ESDEvent();
+       
+       AliESDfriend* esdFriendOutput = (AliESDfriend*)ESDfriend();  
+       AliInfo(Form("Number of ESD tracks in input = %d ",fESDInput->GetNumberOfTracks()));
+       AliInfo(Form("Number of ESD tracks in output = %d ",esdEventOutput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in input friends = %d ",fESDfriendInput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in output friendsNew before filtering = %d ",esdFriendOutput->GetNumberOfTracks()));
+       
+       AliESDfriendTrack* tNull = new AliESDfriendTrack();
+
+       for (Int_t i = 0; i< fESDInput->GetNumberOfTracks(); i++){
+               if (i%3 == 0){
+                       // keep friend
+                       AliInfo(Form("Keeping %d-th track",i));
+                       esdEventOutput->GetTrack(i);
+                       AliESDfriendTrack* tOld = (AliESDfriendTrack*)fESDfriendInput->GetTrack(i);
+                       AliDebug(2,Form("1P of the %d-th track = %f",i,tOld->Get1P()));
+                       AddFriendTrackAt(tOld,i);
+                       //      tOld->Dump();
+               }
+               else {
+                       //discard friend 
+                       AddFriendTrackAt(tNull,i);
+               }
+       } 
+       AliInfo(Form("Number of tracks in output friendsNew after filtering = %d ",esdFriendOutput->GetNumberOfTracks()));
+       AliInfo(Form("Number of tracks in output friendsNew after filtering with GetEntries() = %d ",esdFriendOutput->GetEntriesInTracks()));
+       return;
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskFilterFriendSecond::Terminate(Option_t */*option*/)
+{
+       // Terminate analysis
+       //
+       AliDebug(2,"AliAnalysisTaskFilterFriendSecond: Terminate() \n");
+       
+       return;
+}
+//________________________________________________________________________
+Bool_t AliAnalysisTaskFilterFriendSecond::UserSelectESDfriendForCurrentEvent()
+{
+       // 
+       // Selecting or discarding current event
+       //
+
+               
+       fESDInput = dynamic_cast<AliESDEvent*>(InputEvent()); // get the input ESD
+       if ((fESDInput->GetNumberOfTracks())%2 == 1){
+               AliInfo("Selecting event");
+               return kTRUE;
+       }
+       
+       AliInfo("Discarding event");    
+       return kFALSE;
+       
+       //return kTRUE;
+}
diff --git a/ANALYSIS/AliAnalysisTaskFilterFriendSecond.h b/ANALYSIS/AliAnalysisTaskFilterFriendSecond.h
new file mode 100644 (file)
index 0000000..ff9b9e7
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef ALIANALYSISTASKFILTERFRIENDSECOND_H
+#define ALIANALYSISTASKFILTERFRIENDSECOND_H
+
+/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*$Id$*/
+
+//*************************************************************************
+// Class AliAnalysisTaskFilterFriendSecond
+// Test Task 
+//*************************************************************************
+
+#include <TString.h>
+#include "AliAnalysisTaskFilter.h"
+
+class AliAnalysisTaskFilterFriendSecond : public AliAnalysisTaskFilter
+{
+ public:
+
+  AliAnalysisTaskFilterFriendSecond();
+  AliAnalysisTaskFilterFriendSecond(const char *name);
+  virtual ~AliAnalysisTaskFilterFriendSecond();
+
+
+  // Implementation of interface methods
+  virtual void UserCreateOutputObjects();
+  virtual Bool_t UserSelectESDfriendForCurrentEvent();
+  virtual void Init();
+  virtual void LocalInit() {Init();}
+  virtual void UserExec(Option_t *option);
+  virtual void Terminate(Option_t *option);
+
+ private:
+
+  AliAnalysisTaskFilterFriendSecond(const AliAnalysisTaskFilterFriendSecond &);
+  AliAnalysisTaskFilterFriendSecond& operator=(const AliAnalysisTaskFilterFriendSecond&);
+
+  AliESDEvent  *fESDInput;        // ESD input object
+  AliESDfriend *fESDfriendInput;  // ESD input friend object
+  ClassDef(AliAnalysisTaskFilterFriendSecond,1); 
+};
+
+#endif
+
diff --git a/ANALYSIS/libANALYSIScalib.pkg b/ANALYSIS/libANALYSIScalib.pkg
new file mode 100644 (file)
index 0000000..13fab97
--- /dev/null
@@ -0,0 +1,30 @@
+#-*- Mode: Makefile -*-
+
+SRCS =         AliAnalysisTaskCopyESD.cxx \
+       AliAnalysisTaskFilter.cxx \
+       AliAnalysisTaskFilterFriend.cxx \
+       AliAnalysisTaskFilterFriendSecond.cxx \
+       AliAnalysisTaskAddObject.cxx
+
+
+
+ifeq (yes,$(CHECKALIEN))
+PACKCXXFLAGS := $(CXXFLAGS) -DWITHALIEN
+endif
+
+
+HDRS:= $(SRCS:.cxx=.h) 
+
+DHDR= ANALYSIScalibLinkDef.h
+
+EXPORT:=$(SRCS:.cxx=.h)
+
+EINCLUDE:=ANALYSIS/Aliengui
+
+ifeq (win32gcc,$(ALICE_TARGET))
+PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) \
+                         -lANALYSIS -lSTEERBase -lAOD -lESD \
+                         -L$(ROOTLIBDIR) -lTreePlayer -lXMLIO
+endif
+
+
diff --git a/STEER/AliESDHandler.cxx b/STEER/AliESDHandler.cxx
new file mode 100644 (file)
index 0000000..962d555
--- /dev/null
@@ -0,0 +1,210 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*$Id$*/
+
+//-------------------------------------------------------------------------
+//
+//     Implementation of the Virtual Event Handler Interface for ESD
+//
+//-------------------------------------------------------------------------
+
+
+#include <TTree.h>
+#include <TFile.h>
+#include <TString.h>
+#include <TROOT.h>
+
+#include "AliLog.h"
+#include "AliESDHandler.h"
+#include "AliESDEvent.h"
+#include "AliESDfriend.h"
+
+
+ClassImp(AliESDHandler)
+
+//______________________________________________________________________________
+AliESDHandler::AliESDHandler() :
+       AliVEventHandler(),
+       fESDEvent(NULL),
+       fesdf(NULL),
+       fTreeE(NULL),
+       fFileE(NULL),
+       fFileEF(NULL),
+       fFileName("")
+{
+       // default constructor
+}
+
+//______________________________________________________________________________
+AliESDHandler::AliESDHandler(const char* name, const char* title):
+       AliVEventHandler(name, title),
+       fESDEvent(NULL),
+       fesdf(NULL),
+       fTreeE(NULL),
+       fFileE(NULL),
+       fFileEF(NULL),
+       fFileName("")
+{
+
+       // constructor with name and title
+
+}
+
+//______________________________________________________________________________
+AliESDHandler::~AliESDHandler() 
+{
+       // Destructor.
+       delete fESDEvent;
+       delete fesdf;
+       if(fFileE){
+               // is already handled in TerminateIO
+               fFileE->Close();
+               delete fFileE;
+       }
+       if(fFileEF){
+               // is already handled in TerminateIO
+               fFileEF->Close();
+               delete fFileEF;
+       }
+       delete fTreeE;
+}
+
+//______________________________________________________________________________
+Bool_t AliESDHandler::Init(Option_t* opt)
+{
+       //
+       // Initialize IO
+       //
+       
+       // File opening according to execution mode
+       TString option(opt);
+       option.ToLower();
+       TDirectory *owd = gDirectory;
+       if (option.Contains("proof")) {
+               // proof
+               // Merging via files. Need to access analysis manager via interpreter.
+               gROOT->ProcessLine(Form("AliAnalysisManager::GetAnalysisManager()->OpenProofFile(\"%s\", \"RECREATE\");", fFileName.Data()));
+               gROOT->ProcessLine(Form("AliAnalysisManager::GetAnalysisManager()->GetCommonOutputContainer()->SetFile((TFile*)0x%lx);", gFile));
+               fFileE = gFile;
+       } else {
+               // local and grid
+               fFileE = new TFile(fFileName.Data(), "RECREATE");
+       }
+       CreateTree(1);
+       CreateFriends(1);
+       owd->cd();
+       
+       return kTRUE;
+}
+
+
+//______________________________________________________________________________
+Bool_t AliESDHandler::FinishEvent()
+{
+       //
+       // Fill the tree 
+       //
+
+       FillTree();
+       
+       // resetting
+       fESDEvent->Reset();
+       fesdf->~AliESDfriend();
+       new(fesdf) AliESDfriend();  
+       return kTRUE;
+}
+
+//______________________________________________________________________________
+Bool_t AliESDHandler::Terminate()
+{
+       //
+       // Terminate 
+       //
+
+       AddESDtoTreeUserInfo();
+       return kTRUE;
+}
+
+//______________________________________________________________________________
+Bool_t AliESDHandler::TerminateIO()
+{
+       //
+       // Terminate IO
+       //
+
+       if (fFileE) {
+               fFileE->cd();
+               fTreeE->Write();
+               fFileE->Close();
+               delete fFileE;
+               fFileE = 0;
+       }
+
+       return kTRUE;
+}
+
+
+//______________________________________________________________________________
+void AliESDHandler::CreateTree(Int_t flag)
+{
+       //
+       // Creates the ESD Tree
+       // 
+
+       fTreeE = new TTree("esdTree", "AliESD tree");
+       // Create the ESDevent object
+       if(!fESDEvent){
+               fESDEvent = new AliESDEvent();
+               fESDEvent->CreateStdContent();
+       }
+       fESDEvent->WriteToTree(fTreeE);
+}
+//______________________________________________________________________________
+void AliESDHandler::CreateFriends(Int_t flag)
+{
+       fesdf = new AliESDfriend();
+
+       TBranch *br=fTreeE->Branch("ESDfriend.","AliESDfriend", &fesdf);
+       br->SetFile("AliESDfriends_v1.root");
+       fESDEvent->AddObject(fesdf);
+}
+
+//______________________________________________________________________________
+void AliESDHandler::FillTree()
+{
+       //
+       // Fill the ESD Tree
+       //
+
+       AliDebug(2,Form("number of friend tracks = %d\n",fesdf->GetNumberOfTracks()));
+
+       fFileE->cd();
+       fTreeE->Fill();
+}
+
+//______________________________________________________________________________
+void AliESDHandler::AddESDtoTreeUserInfo()
+{
+       //
+       // Add aod event to tree user info
+       //
+
+       fTreeE->GetUserInfo()->Add(fESDEvent);
+}
+
+
+
diff --git a/STEER/AliESDHandler.h b/STEER/AliESDHandler.h
new file mode 100644 (file)
index 0000000..072180b
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef ALIESDHANDLER_H
+#define ALIESDHANDLER_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+//
+//     Implementation of the Event Handler Interface for ESD
+//
+//-------------------------------------------------------------------------
+
+#include "AliVEventHandler.h"
+
+class AliESDEvent;
+class AliESDfriend;
+class TFile;
+class TTree;
+
+class AliESDHandler : public AliVEventHandler {
+    
+ public:
+       AliESDHandler();
+       AliESDHandler(const char* name, const char* title);
+       virtual ~AliESDHandler();
+       virtual void SetOutputFileName(const char* fname){fFileName = fname;}
+       virtual const char* GetOutputFileName(){return fFileName.Data();}
+       virtual Bool_t Init(Option_t* option);
+       virtual Bool_t Init(TTree* /*tree*/, Option_t* /*option*/)  {return kTRUE;}
+       virtual Bool_t BeginEvent(Long64_t /*entry*/){return kTRUE;}
+       virtual Bool_t Notify() {return AliVEventHandler::Notify(); };
+       virtual Bool_t Notify(const char * /* path */) {return kTRUE;}
+       virtual Bool_t FinishEvent();
+       virtual Bool_t Terminate();
+       virtual Bool_t TerminateIO();
+       
+       AliESDEvent* GetESD()  {return fESDEvent;}
+       AliESDfriend* GetESDfriend()  {return fesdf;}
+       virtual TTree* GetTree() const {return fTreeE;}
+       void CreateTree(Int_t flag);
+       void CreateFriends(Int_t flag);
+       void FillTree();
+       void AddESDtoTreeUserInfo();
+       void SetInputTree(TTree* /*tree*/) {;}
+ private:
+
+       AliESDHandler(const AliESDHandler&);             // Not implemented
+       AliESDHandler& operator=(const AliESDHandler&);  // Not implemented
+       
+       AliESDEvent* fESDEvent; //! Pointer to the ESD event
+       AliESDfriend* fesdf;    //! Pointer to the ESD friend
+       TTree* fTreeE;          //! tree for ESD persistency
+       TFile* fFileE;          //! Output file
+       TFile* fFileEF;         //! Output file for friends
+       TString fFileName;      //  Output file name
+       
+    ClassDef(AliESDHandler, 1)
+};
+#endif
index 0bf5925..5f42097 100644 (file)
@@ -30,6 +30,7 @@ AliESDfriend::AliESDfriend(): TObject(), fTracks("AliESDfriendTrack",15000),
  //
  // Default constructor
  //
+       //fTracks.BypassStreamer(kFALSE);
 }
 
 AliESDfriend::AliESDfriend(const AliESDfriend &f) :
index d2afe70..82baf87 100644 (file)
@@ -25,13 +25,22 @@ public:
   AliESDfriendTrack *GetTrack(Int_t i) const {
      return (AliESDfriendTrack *)fTracks.UncheckedAt(i);
   }
+  Int_t GetEntriesInTracks() const {return fTracks.GetEntries();}
   void AddTrack(const AliESDfriendTrack *t) {
      new(fTracks[fTracks.GetEntriesFast()]) AliESDfriendTrack(*t);
   }
 
+  void AddTrackAt(const AliESDfriendTrack *t, Int_t i) {
+     new(fTracks[i]) AliESDfriendTrack(*t);
+  }
+
   void SetVZEROfriend(AliESDVZEROfriend * obj);
   AliESDVZEROfriend *GetVZEROfriend(){ return fESDVZEROfriend; }
 
+  void Ls(){
+         return fTracks.ls();
+  }
+
 protected:
   TClonesArray fTracks;    // ESD friend tracks
   AliESDVZEROfriend *fESDVZEROfriend; // VZERO object containing complete raw data
index 2373b86..0ae5774 100644 (file)
@@ -28,6 +28,12 @@ ClassImp(AliESDfriendTrack)
 AliESDfriendTrack::AliESDfriendTrack(): 
 TObject(), 
 f1P(0), 
+fnMaxITScluster(0),
+fnMaxTPCcluster(0),
+fnMaxTRDcluster(0),
+fITSindex(0x0),
+fTPCindex(0x0),
+fTRDindex(0x0),
 fPoints(0),
 fCalibContainer(0),
 fITStrack(0),
@@ -39,15 +45,24 @@ fTRDIn(0)
   //
   // Default constructor
   //
-  Int_t i;
-  for (i=0; i<kMaxITScluster; i++) fITSindex[i]=-2;
-  for (i=0; i<kMaxTPCcluster; i++) fTPCindex[i]=-2;
-  for (i=0; i<kMaxTRDcluster; i++) fTRDindex[i]=-2;
+       //  Int_t i;
+  //  fITSindex = new Int_t[fnMaxITScluster];
+  //fTPCindex = new Int_t[fnMaxTPCcluster];
+  //fTRDindex = new Int_t[fnMaxTRDcluster];
+  //for (i=0; i<kMaxITScluster; i++) fITSindex[i]=-2;
+  //for (i=0; i<kMaxTPCcluster; i++) fTPCindex[i]=-2;
+  //for (i=0; i<kMaxTRDcluster; i++) fTRDindex[i]=-2;
 }
 
 AliESDfriendTrack::AliESDfriendTrack(const AliESDfriendTrack &t): 
 TObject(t),
 f1P(t.f1P),
+fnMaxITScluster(t.fnMaxITScluster),
+fnMaxTPCcluster(t.fnMaxTPCcluster),
+fnMaxTRDcluster(t.fnMaxTRDcluster),
+fITSindex(0x0),
+fTPCindex(0x0),
+fTRDindex(0x0),
 fPoints(0),
 fCalibContainer(0),
 fITStrack(0),
@@ -59,10 +74,24 @@ fTRDIn(0)
   //
   // Copy constructor
   //
+  AliDebug(2,"Calling copy constructor");
+
   Int_t i;
-  for (i=0; i<kMaxITScluster; i++) fITSindex[i]=t.fITSindex[i];
-  for (i=0; i<kMaxTPCcluster; i++) fTPCindex[i]=t.fTPCindex[i];
-  for (i=0; i<kMaxTRDcluster; i++) fTRDindex[i]=t.fTRDindex[i];
+  if (fnMaxITScluster != 0){
+         fITSindex = new Int_t[fnMaxITScluster];
+         for (i=0; i<fnMaxITScluster; i++) fITSindex[i]=t.fITSindex[i];
+  }
+  if (fnMaxTPCcluster != 0){
+         fTPCindex = new Int_t[fnMaxTPCcluster];
+         for (i=0; i<fnMaxTPCcluster; i++) fTPCindex[i]=t.fTPCindex[i];
+  }
+  if (fnMaxTRDcluster != 0){
+         fTRDindex = new Int_t[fnMaxTRDcluster];
+         for (i=0; i<fnMaxTRDcluster; i++) fTRDindex[i]=t.fTRDindex[i]; 
+  }
+  AliDebug(2,Form("fnMaxITScluster = %d",fnMaxITScluster));
+  AliDebug(2,Form("fnMaxTPCcluster = %d",fnMaxTPCcluster));
+  AliDebug(2,Form("fnMaxTRDcluster = %d",fnMaxTRDcluster));
   if (t.fPoints) fPoints=new AliTrackPointArray(*t.fPoints);
   if (t.fCalibContainer) {
      fCalibContainer = new TObjArray(5);
@@ -76,6 +105,7 @@ fTRDIn(0)
   if (t.fTPCOut) fTPCOut = new AliExternalTrackParam(*(t.fTPCOut));
   if (t.fITSOut) fITSOut = new AliExternalTrackParam(*(t.fITSOut));
   if (t.fTRDIn)  fTRDIn = new AliExternalTrackParam(*(t.fTRDIn));
+
 }
 
 AliESDfriendTrack::~AliESDfriendTrack() {
@@ -90,6 +120,9 @@ AliESDfriendTrack::~AliESDfriendTrack() {
    delete fTPCOut;
    delete fITSOut;
    delete fTRDIn;
+   delete fITSindex;
+   delete fTPCindex;
+   delete fTRDindex;
 }
 
 
@@ -134,3 +167,54 @@ void AliESDfriendTrack::SetTRDIn(const AliExternalTrackParam  &param)  {
   fTRDIn=new AliExternalTrackParam(param);
 } 
 
+void AliESDfriendTrack::SetITSIndices(Int_t* indices, Int_t n){
+
+       //
+       // setting fITSindex
+       // instantiating the pointer if still NULL
+       //
+
+       fnMaxITScluster = n;
+       AliDebug(2,Form("fnMaxITScluster = %d",fnMaxITScluster));
+       if (fITSindex == 0x0){
+               fITSindex = new Int_t[fnMaxITScluster];
+       }
+       for (Int_t i = 0; i < fnMaxITScluster; i++){
+               fITSindex[i] = indices[i];
+       }
+}
+
+void AliESDfriendTrack::SetTPCIndices(Int_t* indices, Int_t n){
+
+       //
+       // setting fTPCindex
+       // instantiating the pointer if still NULL
+       //
+
+       fnMaxTPCcluster = n;
+       AliDebug(2,Form("fnMaxTPCcluster = %d",fnMaxTPCcluster));
+       if (fTPCindex == 0x0){
+               fTPCindex = new Int_t[fnMaxTPCcluster];
+       }
+       for (Int_t i = 0; i < fnMaxTPCcluster; i++){
+               fTPCindex[i] = indices[i];
+       }
+}
+
+void AliESDfriendTrack::SetTRDIndices(Int_t* indices, Int_t n){
+
+       //
+       // setting fTRDindex
+       // instantiating the pointer if still NULL
+       //
+
+       fnMaxTRDcluster = n;
+       AliDebug(2,Form("fnMaxTRDcluster = %d",fnMaxTRDcluster));
+       if (fTRDindex == 0x0){
+               fTRDindex = new Int_t[fnMaxTRDcluster];
+       }
+       for (Int_t i = 0; i < fnMaxTRDcluster; i++){
+               fTRDindex[i] = indices[i];
+       }
+}
+
index e8ad549..efacc03 100644 (file)
@@ -51,11 +51,23 @@ public:
   const AliExternalTrackParam * GetITSOut() { return fITSOut;} 
   const AliExternalTrackParam * GetTRDIn() { return fTRDIn;} 
 
+  void SetITSIndices(Int_t* indices, Int_t n);
+  void SetTPCIndices(Int_t* indices, Int_t n);
+  void SetTRDIndices(Int_t* indices, Int_t n);
+
+  Int_t GetMaxITScluster() {return fnMaxITScluster;}
+  Int_t GetMaxTPCcluster() {return fnMaxTPCcluster;}
+  Int_t GetMaxTRDcluster() {return fnMaxTRDcluster;}
+
 protected:
   Float_t f1P;                     // 1/P (1/(GeV/c))
-  Int_t fITSindex[kMaxITScluster]; // indices of the ITS clusters 
-  Int_t fTPCindex[kMaxTPCcluster]; // indices of the TPC clusters
-  Int_t fTRDindex[kMaxTRDcluster]; // indices of the TRD clusters
+  Int_t fnMaxITScluster; // Max number of ITS clusters
+  Int_t fnMaxTPCcluster; // Max number of TPC clusters
+  Int_t fnMaxTRDcluster; // Max number of TRD clusters
+  Int_t* fITSindex; //[fnMaxITScluster] indices of the ITS clusters 
+  Int_t* fTPCindex; //[fnMaxTPCcluster] indices of the TPC clusters
+  Int_t* fTRDindex; //[fnMaxTRDcluster] indices of the TRD clusters
+
   AliTrackPointArray *fPoints;//Array of track space points in the global frame
   TObjArray      *fCalibContainer; //Array of objects for calibration    
   AliKalmanTrack *fITStrack; //! pointer to the ITS track (debug purposes) 
@@ -69,7 +81,7 @@ protected:
 private:
   AliESDfriendTrack &operator=(const AliESDfriendTrack & /* t */) {return *this;}
 
-  ClassDef(AliESDfriendTrack,3) //ESD friend track
+  ClassDef(AliESDfriendTrack,4) //ESD friend track
 };
 
 #endif
index c99baee..97487b2 100644 (file)
@@ -1161,7 +1161,6 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
   //
   // This function updates track's running parameters 
   //
-  Int_t *index=0;
   Bool_t rc=kTRUE;
 
   SetStatus(flags);
@@ -1181,16 +1180,21 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
   switch (flags) {
     
   case kITSin: case kITSout: case kITSrefit:
+    {
     fITSClusterMap=0;
     fITSncls=t->GetNumberOfClusters();
-    index=fFriendTrack->GetITSindices(); 
+    Int_t* indexITS = new Int_t[AliESDfriendTrack::kMaxITScluster];
     for (Int_t i=0;i<AliESDfriendTrack::kMaxITScluster;i++) {
-        index[i]=t->GetClusterIndex(i);
+       indexITS[i]=t->GetClusterIndex(i);
+
        if (i<fITSncls) {
-           Int_t l=(index[i] & 0xf0000000) >> 28;
+         Int_t l=(indexITS[i] & 0xf0000000) >> 28;
            SETBIT(fITSClusterMap,l);                 
         }
     }
+    fFriendTrack->SetITSIndices(indexITS,AliESDfriendTrack::kMaxITScluster);
+    delete [] indexITS;
+
     fITSchi2=t->GetChi2();
     fITSsignal=t->GetPIDsignal();
     fITSLabel = t->GetLabel();
@@ -1200,9 +1204,11 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
       else 
         fOp->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
     }   
+    }
     break;
     
   case kTPCin: case kTPCrefit:
+    {
     fTPCLabel = t->GetLabel();
     if (flags==kTPCin)  {
       fTPCInner=new AliExternalTrackParam(*t); 
@@ -1212,8 +1218,10 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
     if (!fIp) fIp=new AliExternalTrackParam(*t);
     else 
       fIp->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
+    }
   case kTPCout:
-    index=fFriendTrack->GetTPCindices(); 
+    {
+    Int_t* indexTPC = new Int_t[AliESDfriendTrack::kMaxTPCcluster];
     if (flags & kTPCout){
       if (!fOp) fOp=new AliExternalTrackParam(*t);
       else 
@@ -1228,8 +1236,8 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
        //       for (Int_t i=0;i<fTPCncls;i++) 
        for (Int_t i=0;i<AliESDfriendTrack::kMaxTPCcluster;i++) 
         {
-          index[i]=t->GetClusterIndex(i);
-          Int_t idx = index[i];
+         indexTPC[i]=t->GetClusterIndex(i);
+         Int_t idx = indexTPC[i];
 
          if (idx<0) continue; 
 
@@ -1272,20 +1280,30 @@ Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
            }
           // End Of Piotr's Cluster Map for HBT
         }
+       fFriendTrack->SetTPCIndices(indexTPC,AliESDfriendTrack::kMaxTPCcluster);
+       delete [] indexTPC;
+
      }
     fTPCsignal=t->GetPIDsignal();
+    }
     break;
 
   case kTRDin: case kTRDrefit:
     break;
   case kTRDout:
-    index     = fFriendTrack->GetTRDindices();
+    {
     fTRDLabel = t->GetLabel(); 
     fTRDchi2  = t->GetChi2();
     fTRDncls  = t->GetNumberOfClusters();
-    for (Int_t i=0;i<6;i++) index[i]=t->GetTrackletIndex(i);
+      Int_t* indexTRD = new Int_t[AliESDfriendTrack::kMaxTRDcluster];
+      for (Int_t i=0;i<AliESDfriendTrack::kMaxTRDcluster;i++) indexTRD[i]=-2;
+      for (Int_t i=0;i<6;i++) indexTRD[i]=t->GetTrackletIndex(i);
+      fFriendTrack->SetTRDIndices(indexTRD,AliESDfriendTrack::kMaxTRDcluster);
+      delete [] indexTRD;
+    
     
     fTRDsignal=t->GetPIDsignal();
+    }
     break;
   case kTRDbackup:
     if (!fOp) fOp=new AliExternalTrackParam(*t);
@@ -1551,12 +1569,17 @@ Char_t AliESDtrack::GetITSclusters(Int_t *idx) const {
   //---------------------------------------------------------------------
   // This function returns indices of the assgined ITS clusters 
   //---------------------------------------------------------------------
-  if (idx!=0) {
-     Int_t *index=fFriendTrack->GetITSindices();
-     for (Int_t i=0; i<AliESDfriendTrack::kMaxITScluster; i++) {
-         if ( (i>=fITSncls) && (i<6) ) idx[i]=-1;
-         else idx[i]=index[i];
-     }
+  if (idx) {
+    Int_t *index=fFriendTrack->GetITSindices();
+    for (Int_t i=0; i<AliESDfriendTrack::kMaxITScluster; i++) {
+      if ( (i>=fITSncls) && (i<6) ) idx[i]=-1;
+      else {
+       if (index) {
+         idx[i]=index[i];
+       }
+       else idx[i]= -2;
+      }
+    }
   }
   return fITSncls;
 }
@@ -1623,9 +1646,15 @@ UShort_t AliESDtrack::GetTPCclusters(Int_t *idx) const {
   //---------------------------------------------------------------------
   // This function returns indices of the assgined ITS clusters 
   //---------------------------------------------------------------------
-  if (idx!=0) {
+  if (idx) {
     Int_t *index=fFriendTrack->GetTPCindices();
-    for (Int_t i=0; i<AliESDfriendTrack::kMaxTPCcluster; i++) idx[i]=index[i];
+
+    if (index){
+      for (Int_t i=0; i<AliESDfriendTrack::kMaxTPCcluster; i++) idx[i]=index[i];
+    }
+    else {
+      for (Int_t i=0; i<AliESDfriendTrack::kMaxTPCcluster; i++) idx[i]=-2;
+    }
   }
   return fTPCncls;
 }
@@ -1667,9 +1696,15 @@ UChar_t AliESDtrack::GetTRDclusters(Int_t *idx) const {
   //---------------------------------------------------------------------
   // This function returns indices of the assgined TRD clusters 
   //---------------------------------------------------------------------
-  if (idx!=0) {
-     Int_t *index=fFriendTrack->GetTRDindices();
-     for (Int_t i=0; i<AliESDfriendTrack::kMaxTRDcluster; i++) idx[i]=index[i];
+  if (idx) {
+    Int_t *index=fFriendTrack->GetTRDindices();
+
+    if (index) {
+      for (Int_t i=0; i<AliESDfriendTrack::kMaxTRDcluster; i++) idx[i]=index[i];
+    }
+    else {
+      for (Int_t i=0; i<AliESDfriendTrack::kMaxTRDcluster; i++) idx[i]=-2;
+    }
   }
   return fTRDncls;
 }
@@ -1687,10 +1722,14 @@ UChar_t AliESDtrack::GetTRDtracklets(Int_t *idx) const {
 //      Therefore tracks with TRD gaps contain default values for indices [-1] 
 
   if (!idx) return GetTRDntracklets();
-  Int_t *index=fFriendTrack->GetTRDindices(), n(0);
+  Int_t *index=fFriendTrack->GetTRDindices();
+  Int_t n = 0;
   for (Int_t i=0; i<kTRDnPlanes; i++){ 
-    if(index[i]>=0) n++;
-    idx[i]=index[i];
+    if (index){
+      if(index[i]>=0) n++;
+      idx[i]=index[i];
+    }
+    else idx[i] = -2;
   }
   return n;
 }
index fd8178c..c50a590 100644 (file)
 #pragma read sourceClass="AliESDtrack" targetClass="AliESDtrack" source="UChar_t fTRDpidQuality"  version="[-49]" target="fTRDntracklets" targetType="UChar_t" code="{fTRDntracklets = onfile.fTRDpidQuality;}"
 // see http://root.cern.ch/svn/root/trunk/io/doc/DataModelEvolution.txt
 #pragma link C++ class  AliESDtrack+;
+#pragma read sourceClass="AliESDfriendTrack" targetClass="AliESDfriendTrack" source="Int_t fITSindex" version="[-3]" \
+        target="fnMaxITScluster, fITSindex" targetType="Int_t, Int_t*" code="{fnMaxITScluster = 12; fITSindex= new Int_t[fnMaxITScluster]; memcpy(fITSindex, &(onfile.fITSindex), fnMaxITScluster*sizeof(Int_t));}"
+#pragma read sourceClass="AliESDfriendTrack" targetClass="AliESDfriendTrack" source="Int_t fTPCindex" version="[-3]" \
+        target="fnMaxTPCcluster, fTPCindex" targetType="Int_t, Int_t*" code="{fnMaxTPCcluster = 160; fTPCindex= new Int_t[fnMaxTPCcluster]; memcpy(fTPCindex, &(onfile.fTPCindex), fnMaxTPCcluster*sizeof(Int_t));}"
+#pragma read sourceClass="AliESDfriendTrack" targetClass="AliESDfriendTrack" source="Int_t fTRDindex" version="[-3]" \
+        target="fnMaxTRDcluster, fTRDindex" targetType="Int_t, Int_t*" code="{fnMaxTRDcluster = 180; fTRDindex= new Int_t[fnMaxTRDcluster]; memcpy(fTRDindex, &(onfile.fTRDindex), fnMaxTRDcluster*sizeof(Int_t));}"
+
 #pragma link C++ class  AliESDfriendTrack+;
 #pragma link C++ class  AliESDMuonTrack+;
 #pragma link C++ class  AliESDPmdTrack+;
@@ -79,6 +86,7 @@
 
 #pragma link C++ class  AliTriggerScalersESD+;
 #pragma link C++ class  AliTriggerScalersRecordESD+;
+#pragma link C++ class  AliESDHandler+;
 
 #pragma link C++ function operator*(const AliFMDMap&,const AliFMDMap&);
 #pragma link C++ function operator/(const AliFMDMap&,const AliFMDMap&);
index be380ef..5f135f2 100644 (file)
@@ -29,7 +29,8 @@ SRCS = AliESDEvent.cxx AliESDInputHandler.cxx AliESDInputHandlerRP.cxx AliESDfri
        AliTriggerIR.cxx \
        AliESDVZEROfriend.cxx \
        AliTriggerScalersESD.cxx \
-       AliTriggerScalersRecordESD.cxx
+       AliTriggerScalersRecordESD.cxx \
+       AliESDHandler.cxx       
 
 HDRS:= $(SRCS:.cxx=.h) 
 
index f1d4b4f..5d93530 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 
 ALIROOT/module.mk:     ALIROOT/binaliroot.pkg 
-ANALYSIS/module.mk:    ANALYSIS/libANALYSIS.pkg ANALYSIS/libANALYSISalice.pkg ANALYSIS/libANALYSISRL.pkg ANALYSIS/libAliengui.pkg ANALYSIS/binaliengui.pkg
+ANALYSIS/module.mk:    ANALYSIS/libANALYSIS.pkg ANALYSIS/libANALYSISalice.pkg ANALYSIS/libANALYSIScalib.pkg ANALYSIS/libANALYSISRL.pkg ANALYSIS/libAliengui.pkg ANALYSIS/binaliengui.pkg
 ACORDE/module.mk:      ACORDE/libACORDEbase.pkg ACORDE/libACORDErec.pkg ACORDE/libACORDEsim.pkg
 EMCAL/module.mk:       EMCAL/libEMCALbase.pkg EMCAL/libEMCALsim.pkg EMCAL/libEMCALrec.pkg  EMCAL/libEMCALUtils.pkg
 EPOS/module.mk:                EPOS/libEPOS.pkg