]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TPC/AliMCInfoCuts.h
end-of-line normalization
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliMCInfoCuts.h
CommitLineData
7fac8669 1#ifndef ALIMCINFOCUTS_H
2#define ALIMCINFOCUTS_H
3
4//------------------------------------------------------------------------------
5// Class to keep selection cuts for MC tracks.
6//
7// Author: J.Otwinowski 04/02/2008
8//------------------------------------------------------------------------------
9
10#include <TPDGCode.h>
11#include "AliAnalysisCuts.h"
12
13class TArrayI;
14
15class AliMCInfoCuts : public AliAnalysisCuts
16{
17public:
18 AliMCInfoCuts(const Char_t* name ="AliMCInfoCuts", const Char_t *title ="");
19 virtual ~AliMCInfoCuts();
20
21 // setters
22 void SetMinRowsWithDigits(const Int_t min=0) {fMinRowsWithDigits = min;}
23 void SetMaxR(const Float_t max=1e99) {fMaxR = max;}
24 void SetMaxVz(const Float_t max=1e99) {fMaxVz = max;}
25 void SetRangeTPCSignal(const Float_t min=0, const Float_t max=1e99) {fMinTPCSignal = min; fMaxTPCSignal = max;}
26 void SetMinTrackLength(const Int_t min=0) {fMinTrackLength = min;}
27
28 // getters
29 Int_t GetMinRowsWithDigits() const {return fMinRowsWithDigits;}
30 Float_t GetMaxR() const {return fMaxR;}
31 Float_t GetMaxVz() const {return fMaxVz;}
32 Float_t GetMinTPCSignal() const {return fMinTPCSignal;}
33 Float_t GetMaxTPCSignal() const {return fMaxTPCSignal;}
34 Float_t GetMinTrackLength() const {return fMinTrackLength;}
35
36 Float_t GetEP() const {return ep;}
37 Float_t GetEM() const {return em;}
38 Float_t GetMuP() const {return mup;}
39 Float_t GetMuM() const {return mum;}
40 Float_t GetPiP() const {return pip;}
41 Float_t GetPiM() const {return pim;}
42 Float_t GetKP() const {return kp;}
43 Float_t GetKM() const {return km;}
44 Float_t GetProt() const {return prot;}
45 Float_t GetProtBar() const {return protbar;}
46
47 // cuts init function
48 void InitME();
49
50 // check MC tracks
51 virtual Bool_t IsSelected(TObject *) {return kTRUE;}
52 virtual Bool_t IsSelected(TList *) {return kTRUE;}
53
54 // add particle to array
55 void AddPdgParticle(Int_t idx=-1, Int_t pdgcode=0) const;
56
57 // check particle in array
58 Bool_t IsPdgParticle(Int_t pdgcode=0) const;
59
60 // check particle in array
61 Bool_t IsPosPdgParticle(Int_t pdgcode=0) const;
62
63 // Merge output objects (needed by PROOF)
64 virtual Long64_t Merge(TCollection* list);
65
66private:
67 Int_t fMinRowsWithDigits; // min. number of TPC raws with digits
68 Float_t fMaxR; // max. R distance from MC vertex
69 Float_t fMaxVz; // max. Z distance from MC vertex
70 Float_t fMinTPCSignal; // min. TPC Signal calculated from Bethe Bloch formula
71 Float_t fMaxTPCSignal; // max. TPC Signal calculated from Bethe Bloch formula
72 Float_t fMinTrackLength; // min. TPC minimum track length
73
74 TArrayI* aTrackParticles; // array of tracked particles
75
76 // PDG tracked particles (later added to aTrackParticles)
77 enum enumData {
78 kNParticles = 10, // number of particles below
79 ep = kPositron,
80 em = kElectron,
81 mup = kMuonPlus,
82 mum = kMuonMinus,
83 pip = kPiPlus,
84 pim = kPiMinus,
85 kp = kKPlus,
86 km = kKMinus,
87 prot = kProton,
88 protbar = kProtonBar
89 };
90
91 AliMCInfoCuts(const AliMCInfoCuts&); // not implemented
92 AliMCInfoCuts& operator=(const AliMCInfoCuts&); // not implemented
93
94 ClassDef(AliMCInfoCuts, 1)
95};
96
97#endif // ALIMCINFOCUTS_H