Ad-hoc implementation of cuts for pions/kaons/protons for 2010 analysis
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnTarget.h
CommitLineData
a6bda389 1#ifndef ALIRSNTARGET_H
2#define ALIRSNTARGET_H
3
7356f978 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////////////
8//
9// General class for cut/computation target objects (daughter/pair/event).
10//
11////////////////////////////////////////////////////////////////////////////////
12
a6bda389 13#include "TNamed.h"
14
fec82aba 15#include "AliRsnEvent.h"
16
6aff5015 17class AliRsnDaughter;
18class AliRsnMother;
19
2a1c7696 20class AliRsnTarget : public TNamed {
21public:
22
23 enum ETargetType {
a6bda389 24 kDaughter,
25 kMother,
26 kEvent,
27 kTargetTypes
2a1c7696 28 };
29
30 AliRsnTarget() : fTargetType(kTargetTypes), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
c865cb1d 31 AliRsnTarget(const char *name, ETargetType type = kTargetTypes) : TNamed(name, ""), fTargetType(type), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
2a1c7696 32 AliRsnTarget(const AliRsnTarget& copy) : TNamed(copy), fTargetType(copy.fTargetType), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
eaa44581 33 AliRsnTarget& operator=(const AliRsnTarget& copy) { TNamed::operator=(copy); fTargetType = copy.fTargetType; return (*this); }
2a1c7696 34 virtual ~AliRsnTarget() { /*nothing*/ }
35
99261e24 36 Bool_t IsAllNull() {return (!fDaughter && !fMother && !fEvent);}
2a1c7696 37 Bool_t IsTarget(ETargetType targetType) {return (fTargetType == targetType);}
d7712d44 38 Bool_t TargetOK(TObject *object);
39
40 void SetTargetType(ETargetType type) {fTargetType = type;}
2a1c7696 41 ETargetType GetTargetType() const {return fTargetType;}
42 Char_t GetTargetTypeChar() const;
43 const char* GetTargetTypeName() const;
d7712d44 44
2a1c7696 45 AliRsnDaughter* GetTargetDaughter() {return fDaughter;}
46 AliRsnMother* GetTargetMother() {return fMother;}
47 AliRsnEvent* GetTargetEvent() {return fEvent;}
2a1c7696 48
49protected:
50
eaa44581 51 ETargetType fTargetType; // target type selected for this object
52 AliRsnDaughter *fDaughter; //! internal pointer to which any checked object is cast if it matches expected type
53 AliRsnMother *fMother; //! internal pointer to which any checked object is cast if it matches expected type
54 AliRsnEvent *fEvent; //! internal pointer to which any checked object is cast if it matches expected type
2a1c7696 55
2a1c7696 56 // ROOT dictionary
d7712d44 57 ClassDef(AliRsnTarget, 2)
a6bda389 58};
59
60typedef AliRsnTarget::ETargetType RSNTARGET;
61
62#endif