LCOV - code coverage report
Current view: top level - ANALYSIS/ESDfilter - AliAnalysisTaskESDfilter.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 37 10.8 %
Date: 2016-06-14 17:26:59 Functions: 5 41 12.2 %

          Line data    Source code
       1             : #ifndef ALIANALYSISTASKESDFILTER_H
       2             : #define ALIANALYSISTASKESDFILTER_H
       3             :  
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id$ */
       8             : 
       9             : #include <TList.h> 
      10             : #include <TF1.h> 
      11             : #include "AliAnalysisTaskSE.h"
      12             : #include "AliESDtrack.h"
      13             : #include "AliAODTrack.h"
      14             : #include "AliAODPid.h"
      15             : #include "AliESDpid.h"
      16             : 
      17             : class AliAnalysisFilter;
      18             : class AliStack;
      19             : class AliESDtrack;
      20             : class AliMCEventHandler;
      21             : class TRefArray;
      22             : class AliAODHeader;
      23             : class AliESDtrackCuts;
      24             : 
      25             : class AliAnalysisTaskESDfilter : public AliAnalysisTaskSE
      26             : {
      27             :  public:
      28             :   AliAnalysisTaskESDfilter();
      29             :   AliAnalysisTaskESDfilter(const char* name);
      30             :   virtual ~AliAnalysisTaskESDfilter();
      31             :   // Implementation of interface methods
      32             :   virtual void   UserCreateOutputObjects();
      33             :   virtual void   Init();
      34           4 :   virtual void   LocalInit() {Init();}
      35             :   virtual Bool_t Notify();
      36             :   virtual void   UserExec(Option_t *option);
      37             :   virtual void   Terminate(Option_t *option);
      38             :   virtual void   ConvertESDtoAOD();
      39             : 
      40             :   // Setters
      41           4 :   virtual void SetTrackFilter   (AliAnalysisFilter*   trackF)                {fTrackFilter                 = trackF;}
      42           0 :   virtual void SetTPCOnlyFilterMask (UInt_t filterMask)                      {SetTPCConstrainedFilterMask(filterMask);}
      43           0 :   virtual void SetTPCConstrainedFilterMask (UInt_t filterMask)               {fTPCConstrainedFilterMask    = filterMask;}
      44           0 :   virtual void SetHybridFilterMaskTPCConstrainedGlobal(UInt_t filterMask)    {fHybridFilterMaskTPCCG       = filterMask;}
      45           0 :   virtual void SetWriteHybridTPCConstrainedOnly(bool b)                      {fWriteHybridTPCCOnly         = b;}
      46           0 :   virtual void SetGlobalConstrainedFilterMask (UInt_t filterMask)            {fGlobalConstrainedFilterMask = filterMask;}
      47           0 :   virtual void SetHybridFilterMaskGlobalConstrainedGlobal(UInt_t filterMask) {fHybridFilterMaskGCG         = filterMask;}
      48           0 :   virtual void SetWriteHybridGlobalConstrainedOnly(bool b)    {fWriteHybridGCOnly = b;}
      49           0 :   virtual void SetKinkFilter    (AliAnalysisFilter*    KinkF) {fKinkFilter        = KinkF;}
      50           4 :   virtual void SetV0Filter      (AliAnalysisFilter*      V0F) {fV0Filter          = V0F;}
      51           0 :   virtual void SetCascadeFilter (AliAnalysisFilter* CascadeF) {fCascadeFilter     = CascadeF;}
      52           0 :   virtual void SetPthreshold    (Double_t p)                  {fHighPthreshold    = p;}
      53           0 :   virtual void SetPshape        (TF1 *func)                   {fPtshape           = func;}
      54           0 :   virtual void SetEnableFillAOD (Bool_t b)                    {fEnableFillAOD     = b;}
      55             :   virtual void SetAODPID(AliESDtrack *esdtrack, AliAODTrack *aodtrack, AliAODPid *detpid);
      56             :   void SetDetectorRawSignals(AliAODPid *aodpid, AliESDtrack *track);
      57           0 :   void SetV0Cuts(const Double_t cuts[7]) {for (Int_t icut = 0; icut<7; icut++) fV0Cuts[icut] = cuts[icut];}
      58           0 :   void SetCascadeCuts(const Double_t cuts[8]) {for (Int_t icut = 0; icut<8; icut++) fCascadeCuts[icut] = cuts[icut];} 
      59           0 :   void GetV0Cuts(Double_t cuts[7]) const {for (Int_t icut = 0; icut<7; icut++) cuts[icut] = fV0Cuts[icut];}
      60           0 :   void GetCascadeCuts(Double_t cuts[8]) const {for (Int_t icut = 0; icut<8; icut++) cuts[icut] = fCascadeCuts[icut];}
      61             :   Bool_t AddMetadataToUserInfo();
      62             :   void PrintTask(Option_t *option="all", Int_t indent=0) const;
      63           0 :   void DisableVZERO()        {fIsVZEROEnabled = kFALSE;}
      64           0 :   void DisableTZERO()        {fIsTZEROEnabled = kFALSE;}
      65           0 :   void DisableZDC()          {fIsZDCEnabled   = kFALSE;}
      66           0 :   void DisableAD()           {fIsADEnabled   = kFALSE;}
      67           0 :   void DisableCascades()     {fAreCascadesEnabled = kFALSE;}
      68           0 :   void DisableV0s()          {fAreV0sEnabled = kFALSE;}
      69           0 :   void DisableKinks()        {fAreKinksEnabled = kFALSE;}
      70           0 :   void DisableTracks()       {fAreTracksEnabled = kFALSE;}
      71           0 :   void DisablePmdClusters()  {fArePmdClustersEnabled = kFALSE;}
      72           0 :   void DisableCaloClusters() {fAreCaloClustersEnabled = kFALSE;}
      73           0 :   void DisableCells()        {fAreEMCALCellsEnabled = fArePHOSCellsEnabled = kFALSE; }
      74           0 :   void DisableCaloTrigger(TString calo = "PHOS") {if (calo.Contains("EMCAL")) fAreEMCALTriggerEnabled = kFALSE; else fArePHOSTriggerEnabled = kFALSE;}
      75           0 :   void DisableTracklets()    {fAreTrackletsEnabled = kFALSE;}
      76           0 :   void DisableHMPID()        {fIsHMPIDEnabled = kFALSE;} 
      77           0 :   void EnableV0CascadeVerticesReco() {fIsV0CascadeRecoEnabled = kTRUE;}
      78           0 :   void SetPropagateTrackToEMCal(Bool_t propagate) {fDoPropagateTrackToEMCal = propagate;}
      79           0 :   void SetEMCalSurfaceDistance(Double_t d)        {fEMCalSurfaceDistance = d;}
      80             :   void SetRefitVertexTracks(Int_t algo=6, Double_t* cuts=0);
      81             :   
      82             :   void SetMuonCaloPass();
      83             :   
      84             : private:
      85             :   AliAnalysisTaskESDfilter(const AliAnalysisTaskESDfilter&);
      86             :   AliAnalysisTaskESDfilter& operator=(const AliAnalysisTaskESDfilter&);
      87             :   void PrintMCInfo(AliStack *pStack,Int_t label); // for debugging
      88             :   Double_t Chi2perNDF(AliESDtrack* track);
      89             :     
      90             :   AliAODHeader* ConvertHeader(const AliESDEvent& esd);
      91             :   void ConvertCascades(const AliESDEvent& esd);
      92             :   void ConvertV0s(const AliESDEvent& esd);
      93             :   void ConvertKinks(const AliESDEvent& esd);
      94             :   void ConvertPrimaryVertices(const AliESDEvent& esd);
      95             :   void ConvertTracks(const AliESDEvent& esd);
      96             :   void ConvertPmdClusters(const AliESDEvent& esd);
      97             :   void ConvertCaloClusters(const AliESDEvent& esd);
      98             :   void ConvertEMCALCells(const AliESDEvent& esd);
      99             :   void ConvertPHOSCells(const AliESDEvent& esd);
     100             :   void ConvertCaloTrigger(TString calo, const AliESDEvent& esd);
     101             :   void ConvertTracklets(const AliESDEvent& esd);
     102             :   void ConvertTPCOnlyTracks(const AliESDEvent& esd);
     103             :   void ConvertGlobalConstrainedTracks(const AliESDEvent& esd);
     104             :   void ConvertVZERO(const AliESDEvent& esd);
     105             :   void ConvertTZERO(const AliESDEvent& esd);
     106             :   void ConvertZDC(const AliESDEvent& esd);
     107             :   void ConvertAD(const AliESDEvent& esd);
     108             :   Int_t ConvertHMPID(const AliESDEvent& esd);
     109             :   void ConvertTRD(const AliESDEvent& esd);
     110             :   void CopyCaloProps(AliESDtrack *esdt, AliAODTrack *aodt);
     111             : 
     112             :   TClonesArray& Tracks();
     113             :   TClonesArray& V0s();
     114             :   TClonesArray& Vertices();
     115             :   TClonesArray& Cascades();
     116             :   
     117             :   // Filtering
     118             :   AliAnalysisFilter* fTrackFilter;                 // Track   Filter
     119             :   AliAnalysisFilter* fKinkFilter;                  // Kink    Filter
     120             :   AliAnalysisFilter* fV0Filter;                    // V0      Filter
     121             :   AliAnalysisFilter* fCascadeFilter;               // Cascade Filter
     122             :   Double_t           fHighPthreshold;              // Pt threshold for detector signal setting
     123             :   TF1 *              fPtshape;                     // Pt spectrum distribution
     124             :   Bool_t             fEnableFillAOD;               // value that decides if this task activates AOD filling
     125             :   Bool_t*            fUsedTrack;                   //! indices of used tracks
     126             :   UInt_t*            fUsedTrackCopy;               //! filterbits of tracks for which a copy was added to the AODs
     127             :   Bool_t*            fUsedKink;                    //! indices of used kinks
     128             :   Bool_t*            fUsedV0;                      //! indices of used V0s
     129             :   TRefArray*         fAODTrackRefs;                // array of track references
     130             :   TRefArray*         fAODV0VtxRefs;                // array of v0 vertices references
     131             :   TRefArray*         fAODV0Refs;                   // array of v0s references
     132             :   AliMCEventHandler* fMChandler;                   // pointer to MC handler (if any)
     133             :   Int_t              fNumberOfTracks;              // current number of tracks
     134             :   Int_t              fNumberOfPositiveTracks;      // current number of positive tracks
     135             :   Int_t              fNumberOfV0s;                 // current number of v0s
     136             :   Int_t              fNumberOfVertices;            // current number of vertices
     137             :   Int_t              fNumberOfCascades;            // current number of cascades
     138             :   Int_t              fNumberOfKinks;               // current number of kinks
     139             :   Bool_t             fOldESDformat;                // is the ESD in old format ?
     140             :   AliAODVertex*      fPrimaryVertex;               // pointer to primary vertex of the event
     141             :   UInt_t             fTPCConstrainedFilterMask;    // Filter Mask used to select and store refitted TPC only tracks
     142             :   UInt_t             fHybridFilterMaskTPCCG;       // Filter Mask used to mark global tracks as hybrid
     143             :   Bool_t             fWriteHybridTPCCOnly;         // write only the complent tracks not all global constrained
     144             :   UInt_t             fGlobalConstrainedFilterMask; // Filter Mask used to select and store refitted TPC only tracks
     145             :   UInt_t             fHybridFilterMaskGCG;         // Filter Mask used to mark global tracks as hybrid
     146             :   Bool_t             fWriteHybridGCOnly;           // write only the complent tracks not all global constrained
     147             :   Bool_t             fIsVZEROEnabled;              // whether or not to fill the vzero branch (true by default)
     148             :   Bool_t             fIsTZEROEnabled;              // whether or not to fill the tzero branch (true by default)
     149             :   Bool_t             fIsZDCEnabled;                // whether or not to fill the zdc branch (true by default)
     150             :   Bool_t             fIsADEnabled;                 // whether or not to fill the ad branch (true by default) 
     151             :   Bool_t             fIsHMPIDEnabled;              // whether or not to fill the hmpid branch (true by default) 
     152             :   Bool_t             fIsV0CascadeRecoEnabled;      // whether or not to reconstruct again V0s and cascades (false by default)
     153             :   Bool_t             fAreCascadesEnabled;          // whether or not to fill the cascades branch (true by default)
     154             :   Bool_t             fAreV0sEnabled;               // whether or not to fill the v0 branch (true by default)
     155             :   Bool_t             fAreKinksEnabled;             // whether or not to fill the kinks (true by default)
     156             :   Bool_t             fAreTracksEnabled;            // whether or not to fill the (central) tracks branch (true by default)
     157             :   Bool_t             fArePmdClustersEnabled;       // whether or not to fill the pmd clusters (true by default)
     158             :   Bool_t             fAreCaloClustersEnabled;      // whether or not to fill the calo clusters (true by default)
     159             :   Bool_t             fAreEMCALCellsEnabled;        // whether or not to fill the emcal cells (true by default)
     160             :   Bool_t             fArePHOSCellsEnabled;         // whether or not to fill the phos cells (true by default)
     161             :   Bool_t             fAreEMCALTriggerEnabled;      // whether or not to fill the emcal trigger (true by default)
     162             :   Bool_t             fArePHOSTriggerEnabled;       // whether or not to fill the phos trigger (true by default)
     163             :   Bool_t             fAreTrackletsEnabled;         // whether or not to fill the tracklets (true by default)
     164             :   Bool_t             fIsTRDEnabled;                // whether or not to fill on-line tracklets and tracks from TRD (true by default)
     165             :   AliESDpid*         fESDpid;                      // esd pid
     166             :   Bool_t             fIsPidOwner;                  // whether we own fESDpid
     167             :   AliESDtrackCuts*   fTPCaloneTrackCuts;           // TPC stand-alone track cuts
     168             :   Double_t           fV0Cuts[7];                   // Array to store the values for the different reco selections V0 related
     169             :   Double_t           fCascadeCuts[8];              // Array to store the values for the different reco selections cascades related
     170             :   Bool_t             fDoPropagateTrackToEMCal;     // whether or not to propagate the tracks to the EMCal surface -- true by default
     171             :   Double_t           fEMCalSurfaceDistance;        // EMCal surface distance from the center of the detector (r = 440 by default)
     172             :   Int_t              fRefitVertexTracks;           // request to refit the vertex if >=0 (algoID if cuts not supplied, otherwise ncuts)
     173             :   Int_t              fRefitVertexTracksNCuts;      // number of cut parameters
     174             :   Double_t*          fRefitVertexTracksCuts;       //[fRefitVertexTracksNCuts] optional cuts for vertex refit
     175             :   Bool_t fIsMuonCaloPass; /// whether or not this filtering is used on a muon_calo ESD
     176             :   
     177         324 :   ClassDef(AliAnalysisTaskESDfilter, 21); // Analysis task for standard ESD filtering
     178             : };
     179             : 
     180             : #endif

Generated by: LCOV version 1.11