2 // *** Class AliRsnMonitor ***
4 // "Core" method for defining the work on a pari of particles.
5 // For one analysis, one must setup one of this for each pair he wants to analyze,
6 // adding to it all analysis which he desires to do.
7 // Here he defines the cuts, and the particle types and charges, and can add
8 // functions which do different operations on the same pair, and some binning
9 // with respect to some kinematic variables (eta, momentum)
11 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
12 // M. Vala (email: martin.vala@cern.ch)
17 #include "AliRsnTarget.h"
18 #include "AliRsnEvent.h"
19 #include "AliRsnValue.h"
21 #include "AliRsnMonitor.h"
23 ClassImp(AliRsnMonitor)
25 //_____________________________________________________________________________
26 AliRsnMonitor::AliRsnMonitor(const char *name, AliRsnDaughterDef *def) :
31 fCuts(Form("cuts_%s", name), AliRsnTarget::kDaughter),
35 // Default constructor
39 //_____________________________________________________________________________
40 AliRsnMonitor::AliRsnMonitor(const AliRsnMonitor& copy) :
42 fOnlyTrue(copy.fOnlyTrue),
44 fDaughterDef(copy.fDaughterDef),
46 fDaughter(copy.fDaughter)
49 // Default constructor
53 //_____________________________________________________________________________
54 AliRsnMonitor& AliRsnMonitor::operator=(const AliRsnMonitor& copy)
56 fOnlyTrue = copy.fOnlyTrue;
59 fDaughter = copy.fDaughter;
60 fDaughterDef = copy.fDaughterDef;
65 //_____________________________________________________________________________
66 AliRsnMonitor::~AliRsnMonitor()
73 //_____________________________________________________________________________
74 void AliRsnMonitor::Print(Option_t* /*option*/) const
77 // Prints info about pair
81 //_____________________________________________________________________________
82 Bool_t AliRsnMonitor::Fill(AliRsnDaughter *daughter)
85 // Sets the two passed daughters to the AliRsnMother data member of this object
86 // which is used to perform all computations to fill the value list.
87 // This operation is done successfully only when the first passed object matches
88 // the required object type (track/V0) and the required charge for first element in pair def,
89 // and the second passed object does the same w.r. to the second element in pair def.
90 // Moreover, all cuts are checked and the operation fails if a cut check is unsuccessful.
91 // Finally, if a true pair is required, this is checked at the end.
94 AliDebug(AliLog::kDebug + 2, "<-");
96 // check match with prototype
97 // include check on true PID if required
98 if (!fDaughterDef->MatchesDaughter(daughter, fOnlyTrue)) return kFALSE;
100 // if matching is successful
101 // update track data member and assigh default mass
102 fDaughter = *daughter;
103 daughter->SetMass(fDaughterDef->GetMass());
106 if (!fCuts.IsSelected(daughter)) return kFALSE;
108 // if track is accepted increment counter
114 //_____________________________________________________________________________
115 void AliRsnMonitor::Compute()
118 // Virtual method to compute pair quantities of interest
121 AliWarning("Implement this method in derived classes");
124 //_____________________________________________________________________________
125 void AliRsnMonitor::Init(const char* /*prefix*/, TList* /*list*/)
128 // Virtual method to compute pair quantities of interest
131 AliWarning("Implement this method in derived classes");