ROOT logo
/**************************************************************************
* 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.                  *
**************************************************************************/
//
// Debug tree to look at the distribution of the variable we are cutting on
//
//
#ifndef ALIHFEDEBUGTREETASK_H
#define ALIHFEDEBUGTREETASK_H

#include "AliAnalysisTaskSE.h"

class AliHFEcuts;
class AliHFEsignalCuts;
class AliTrackReference;
class TString;
class TTreeSRedirector;
class AliHFEpidTRD;
class AliHFEpidTPC;

class AliHFEdebugTreeTask : public AliAnalysisTaskSE{
  public:
    AliHFEdebugTreeTask();
    AliHFEdebugTreeTask(const char *name);
    virtual ~AliHFEdebugTreeTask();

    virtual void UserCreateOutputObjects();
    virtual void UserExec(Option_t *);
    virtual void Terminate(Option_t *) {};

    // Setters for cuts
    void SetFileName(const char *filename);
    void SetMinNclustersTPC(Int_t mincl) { fNclustersTPC = mincl; };
    void SetMinNclustersTPCPID(Int_t mincl) { fNclustersTPCPID = mincl; };
    void SetMinNclustersITS(Int_t mincl) { fNclustersITS = mincl; };
    Int_t GetElecSourceMC(TParticle * const mcpart); // return electron source id
    AliHFEpidTPC *GetTPCResponse() { return fTPCpid; }
    
  private:
    AliHFEdebugTreeTask(const AliHFEdebugTreeTask &);
    AliHFEdebugTreeTask &operator=(const AliHFEdebugTreeTask &);

    AliTrackReference *FindTrackReference(AliMCParticle *track, Float_t minRadius, Float_t maxRadius, Int_t detectorID);
    Bool_t CheckITSstatus( const AliESDtrack * const esdtrack, Int_t layer) const;
    
    AliHFEcuts *fTrackCuts;           // Track
    AliHFEsignalCuts *fSignalCuts;    // Signal Cuts
    AliHFEpidTRD *fTRDpid;            // TRD PID
    AliHFEpidTPC *fTPCpid;            // TPC PID
    AliHFEextraCuts *fExtraCuts;      // HFE IP info
    Int_t fNclustersTPC;              // Min Number of clusters in TPC
    Int_t fNclustersTPCPID;           // Min Number of clusters for TPC PID
    Int_t fNclustersITS;              // Min Number of clusters in ITS
    TString fFilename;                // file name for the debug tree
    TTreeSRedirector *fDebugTree;     // Debug Tree
    Int_t fNparents; // number of heavy hadrons to be considered
    Int_t fParentSelect[2][7]; // heavy hadron species
    static const Int_t fgkGluon=21; // gluon pdg code
    static const Int_t fgkMaxGener=10; // ancester level wanted to be checked 
    static const Int_t fgkMaxIter=100; // number of iteration to find out matching particle 
    static const Int_t fgkqType=7; // number of particle type to be checked
    static const Int_t fgkEtaRanges=3; // cuts for different eta ranges
    ClassDef(AliHFEdebugTreeTask, 1)
};
#endif

 AliHFEdebugTreeTask.h:1
 AliHFEdebugTreeTask.h:2
 AliHFEdebugTreeTask.h:3
 AliHFEdebugTreeTask.h:4
 AliHFEdebugTreeTask.h:5
 AliHFEdebugTreeTask.h:6
 AliHFEdebugTreeTask.h:7
 AliHFEdebugTreeTask.h:8
 AliHFEdebugTreeTask.h:9
 AliHFEdebugTreeTask.h:10
 AliHFEdebugTreeTask.h:11
 AliHFEdebugTreeTask.h:12
 AliHFEdebugTreeTask.h:13
 AliHFEdebugTreeTask.h:14
 AliHFEdebugTreeTask.h:15
 AliHFEdebugTreeTask.h:16
 AliHFEdebugTreeTask.h:17
 AliHFEdebugTreeTask.h:18
 AliHFEdebugTreeTask.h:19
 AliHFEdebugTreeTask.h:20
 AliHFEdebugTreeTask.h:21
 AliHFEdebugTreeTask.h:22
 AliHFEdebugTreeTask.h:23
 AliHFEdebugTreeTask.h:24
 AliHFEdebugTreeTask.h:25
 AliHFEdebugTreeTask.h:26
 AliHFEdebugTreeTask.h:27
 AliHFEdebugTreeTask.h:28
 AliHFEdebugTreeTask.h:29
 AliHFEdebugTreeTask.h:30
 AliHFEdebugTreeTask.h:31
 AliHFEdebugTreeTask.h:32
 AliHFEdebugTreeTask.h:33
 AliHFEdebugTreeTask.h:34
 AliHFEdebugTreeTask.h:35
 AliHFEdebugTreeTask.h:36
 AliHFEdebugTreeTask.h:37
 AliHFEdebugTreeTask.h:38
 AliHFEdebugTreeTask.h:39
 AliHFEdebugTreeTask.h:40
 AliHFEdebugTreeTask.h:41
 AliHFEdebugTreeTask.h:42
 AliHFEdebugTreeTask.h:43
 AliHFEdebugTreeTask.h:44
 AliHFEdebugTreeTask.h:45
 AliHFEdebugTreeTask.h:46
 AliHFEdebugTreeTask.h:47
 AliHFEdebugTreeTask.h:48
 AliHFEdebugTreeTask.h:49
 AliHFEdebugTreeTask.h:50
 AliHFEdebugTreeTask.h:51
 AliHFEdebugTreeTask.h:52
 AliHFEdebugTreeTask.h:53
 AliHFEdebugTreeTask.h:54
 AliHFEdebugTreeTask.h:55
 AliHFEdebugTreeTask.h:56
 AliHFEdebugTreeTask.h:57
 AliHFEdebugTreeTask.h:58
 AliHFEdebugTreeTask.h:59
 AliHFEdebugTreeTask.h:60
 AliHFEdebugTreeTask.h:61
 AliHFEdebugTreeTask.h:62
 AliHFEdebugTreeTask.h:63
 AliHFEdebugTreeTask.h:64
 AliHFEdebugTreeTask.h:65
 AliHFEdebugTreeTask.h:66
 AliHFEdebugTreeTask.h:67
 AliHFEdebugTreeTask.h:68
 AliHFEdebugTreeTask.h:69
 AliHFEdebugTreeTask.h:70
 AliHFEdebugTreeTask.h:71
 AliHFEdebugTreeTask.h:72
 AliHFEdebugTreeTask.h:73
 AliHFEdebugTreeTask.h:74
 AliHFEdebugTreeTask.h:75
 AliHFEdebugTreeTask.h:76
 AliHFEdebugTreeTask.h:77