]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/correlationHF/AliDxHFEParticleSelectionEl.h
Fix for coverity defects
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliDxHFEParticleSelectionEl.h
CommitLineData
72c0a987 1//-*- Mode: C++ -*-
b4779749 2// // $Id$
72c0a987 3
4//* This file is property of and copyright by the ALICE Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* See cxx source for full Copyright notice *
7
8/// @file AliDxHFEParticleSelectionEl.h
9/// @author Sedat Altinpinar, Hege Erdal, Matthias Richter
10/// @date 2012-03-19
11/// @brief Electron selection for D-HFE correlations
12///
13
14#ifndef ALIDXHFEPARTICLESELECTIONEL_H
15#define ALIDXHFEPARTICLESELECTIONEL_H
16
17#include "AliDxHFEParticleSelection.h"
7de5d5a3 18
7de5d5a3 19// 2012-09-17: there has been a problem in the dictionary generation for par file
20// compilation, so we have to include the header files indicated below
21// Generating dictionary ...
22// In file included from $ROOTSYS/include/TObject.h:230:0,
23// from G__PWGHFcorrelationHF.h:32,
24// from G__PWGHFcorrelationHF.cxx:17:
25// $ROOTSYS/include/TBuffer.h: In function ‘TBuffer& operator>>(TBuffer&, Tmpl*&) [with Tmpl = AliHFEcuts]’:
26// G__PWGHFcorrelationHF.cxx:1658:15: instantiated from here
27// $ROOTSYS/include/TBuffer.h:373:47: error: invalid use of incomplete type ‘struct AliHFEcuts’
28// correlationHF/AliDxHFEParticleSelectionEl.h:25:7: error: forward declaration of ‘struct AliHFEcuts’
b86451e1 29
7de5d5a3 30#include "AliHFEcuts.h" // need to directly include to avoid compilation error in the dictionary
31#include "AliHFEpid.h" // need to directly include to avoid compilation error in the dictionary
32
9535cec9 33class AliPID;
34class AliPIDResponse;
9535cec9 35class AliHFEvarManager;
9535cec9 36class AliHFEpidBase;
37class AliHFEtools;
38class AliVEvent;
fad30eb8 39class AliSelectNonHFE;
9535cec9 40class AliCFManager;
2229ac91 41class TList;
fad30eb8 42class AliESDtrackCuts;
2229ac91 43
72c0a987 44/**
45 * @class AliDxHFEParticleSelectionEl
46 * Electron selection for D-HFE correlations, implements the specific
47 * selection criteria.
48 */
49class AliDxHFEParticleSelectionEl : public AliDxHFEParticleSelection {
50 public:
51 /// constructor
52 AliDxHFEParticleSelectionEl(const char* opt="");
53 /// destructor
54 virtual ~AliDxHFEParticleSelectionEl();
b86451e1 55
9535cec9 56 enum {
57 kCutHFE = 0,
b4779749 58 kCutPIDTOFTPC = 1,
b86451e1 59 kCutPIDTOF = 2,
fad30eb8 60 kCutPIDTPC = 3,
2229ac91 61 kCutList=3,
9535cec9 62 kNCuts
63 };
64
d731501a 65 enum {
fad30eb8 66 kNotSelected=-2,
b4779749 67 kNoCuts=-1,
d731501a 68 kRecKineITSTPC=0,
69 kRecPrim,
70 kHFEcutsITS,
71 kHFEcutsTOF,
72 kHFEcutsTPC,
b86451e1 73 kPIDTOF,
fad30eb8 74 kPIDTPC,
b4779749 75 kPIDTOFTPC,
fad30eb8 76 kINVMASS,
d731501a 77 kSelected,
78 kNCutLabels
79 };
80
fad30eb8 81 enum {
82 kNoInvMass=0,
83 kInvMassSingleSelected, // based on AliSelectNonHFE, one partcle passing track cuts
84 // and 2nd particle passing weaker cut
85 kInvMassTwoSelected // pairs of particles both passing the track cuts
86 };
87
88
d731501a 89 ///overloaded from AliDxHFEParticleSelection: Init
90 virtual int Init();
91
9535cec9 92 /// overloaded from AliDxHFEParticleSelection: init the control objects
93 virtual int InitControlObjects();
dcf83226 94 virtual THnSparse* DefineTHnSparse();
9535cec9 95
72c0a987 96 /// overloaded from AliDxHFEParticleSelection: check particle
b4779749 97 virtual TObjArray* Select(const AliVEvent* pEvent);
98 using AliDxHFEParticleSelection::Select;
99
b32d523b 100 virtual int IsSelected(AliVParticle* p, const AliVEvent* pEvent);
9535cec9 101
102 virtual int HistogramParticleProperties(AliVParticle* p, int selected);
103
dcf83226 104 virtual int FillParticleProperties(AliVParticle* p, Double_t* date, int dimension) const;
9535cec9 105
106 /// set cuts object: a type cast check is implemented in the method
107 virtual void SetCuts(TObject* /*cuts*/, int /*level*/=0);
b4779749 108 virtual void SetFinalCutStep(int cutstep){fFinalCutStep=cutstep;}
fad30eb8 109 virtual void SetStoreLastCutStep(bool storecut){fStoreCutStepInfo=storecut;}
110
b86451e1 111 virtual void SetPIDResponse(const AliPIDResponse* const pidresp){fPIDResponse=(AliPIDResponse*)(pidresp);}
fad30eb8 112
113 Int_t GetLastSurvivedCutsStep() const{return fSurvivedCutStep;}
72c0a987 114
115 protected:
116
117 private:
b86451e1 118
72c0a987 119 /// copy contructor prohibited
120 AliDxHFEParticleSelectionEl(const AliDxHFEParticleSelectionEl&);
121 /// assignment operator prohibited
122 AliDxHFEParticleSelectionEl& operator=(const AliDxHFEParticleSelectionEl&);
b86451e1 123
9535cec9 124 /// check cut of specified step, e.g.
125 bool ProcessCutStep(Int_t cutStep, AliVParticle *track);
b4779749 126 int ParseArguments(const char* arguments);
127
128 virtual void InvMassFilter(TList* elList, Bool_t* selIndx);
9535cec9 129
b4779749 130 AliHFEpid* fPIDTOFTPC; //! the PID object
b86451e1 131 AliHFEpid* fPIDTOF; //! the PID TOF object
fad30eb8 132 AliHFEpid* fPIDTPC; //! the PID TOF object
9535cec9 133 THnSparse* fElectronProperties; // the particle properties of selected particles
2229ac91 134 TList* fHistoList; // list of histograms
135 TList* fCutPidList; // list for pid and cut objects
b86451e1 136 AliPIDResponse* fPIDResponse; // fPIDResponse
9535cec9 137 AliHFEcuts* fCuts; //! Cuts for HF electrons
fad30eb8 138 AliSelectNonHFE* fSelNHFE; // AliSelectNonHFE, inv-mass selection
139 AliESDtrackCuts* fTrackCuts; //! Track cuts for associated track for Inv Mass
9535cec9 140 AliCFManager* fCFM; //! Correction Framework Manager
b4779749 141 Int_t fFinalCutStep; // Holds the final cutstep
142 Double_t fInvMassLow; // lower inv-mass cut
fad30eb8 143 Int_t fUseInvMassCut; // whether to use inv mass cut
144 Int_t fSystem; // whether running on pp(0,default), PbPb(1) or pPb(2, not used yet)
145 Int_t fTrackNum; // Current track number
146 Double_t fImpactParamCutRadial; // cut on Impact parameter (when storing all tracks)
147 Double_t fEtaCut; // cut on eta (when storing all tracks)
148 Int_t fSurvivedCutStep; // Last cutstep it survived
149 Bool_t fStoreCutStepInfo; // Whether to store which cut step is the effective one
9535cec9 150
d731501a 151 static const char* fgkCutBinNames[]; //! bin labels for cuts histogram
9535cec9 152
fad30eb8 153 ClassDef(AliDxHFEParticleSelectionEl, 6);
72c0a987 154};
155
156#endif