//_____________________________________________________________________________
-void AliRsnAnalysisSimple::Clear(Option_t *option)
+void AliRsnAnalysisSimple::Clear(Option_t* /*option*/)
{
//
// Clear heap
//
// General implementation of a single cut strategy, which can be:
// - a value contained in a given interval [--> IsBetween()]
-// - a value equal to a given reference [--> IsEqual() ]
+// - a value equal to a given reference [--> MatchesValue() ]
// In all cases, the reference value(s) is (are) given as data members
// and each kind of cut requires a given value type (Int, UInt, Double),
// but the cut check procedure is then automatized and chosen thanks to
}
//________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const Int_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const Int_t &theValue)
{
//
// Reference check.
}
//________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const UInt_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const UInt_t &theValue)
{
//
// Reference check.
}
//________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const Double_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const Double_t &theValue)
{
//
// Reference check.
case kChargeNeg:
return (daughter->Charge() < 0);
case kPIDType:
- return IsEqual((Int_t)daughter->PIDType());
+ return MatchesValue((Int_t)daughter->PIDType());
/*
case kEtaMC:
if (mcinfo) return IsBetween (mcinfo->Eta());
case kEsdNSigmaCalculate:
return IsBetween (daughter->GetESDInfo()->GetNSigmaCalculate());
*/
+ default:
+ AliWarning("Requested a cut which cannot be applied to a single track");
+ return kTRUE;
}
return kTRUE;
return pair->IsLabelEqual();
case kIsTruePair:
return pair->IsTruePair(fIMin);
+ default:
+ AliWarning("Requested a cut which cannot be applied to a pair");
+ return kTRUE;
}
return kTRUE;
void PrintAllValues();
Bool_t IsBetween (const Double_t &theValue);
- Bool_t IsEqual (const Int_t &theValue);
- Bool_t IsEqual (const UInt_t &theValue);
- Bool_t IsEqual (const Double_t &theValue);
+ Bool_t MatchesValue (const Int_t &theValue);
+ Bool_t MatchesValue (const UInt_t &theValue);
+ Bool_t MatchesValue (const Double_t &theValue);
private:
class AliRsnCutMgr : public TNamed
{
public:
-
+
// enum ECutSetType {
// kParticle= 0,
// kPair,
// kLastCutSetIndex
// };
-
+
AliRsnCutMgr();
AliRsnCutMgr(const char *name, const char* title);
~AliRsnCutMgr();
-
+
void SetCutSet(AliRsnCut::ECutSetType type,AliRsnCutSet* cutset);
AliRsnCutSet* GetCutSet(AliRsnCut::ECutSetType type) { return fCutSets[type];}
-
+
Bool_t IsSelected(AliRsnCut::ECutSetType type,TObject *obj);
private:
+ AliRsnCutMgr(const AliRsnCutMgr &cut):TNamed(cut) {}
+ AliRsnCutMgr& operator=(const AliRsnCutMgr& /*cut*/) {return *this;}
+
AliRsnCutSet *fCutSets[AliRsnCut::kLastCutSetIndex];
-
+
ClassDef ( AliRsnCutMgr,1 );
};
ClassImp ( AliRsnCutSet )
AliRsnCutSet::AliRsnCutSet()
- : TNamed(),fNumOfCuts ( 0 ),
+ : TNamed(),fCuts(0),fNumOfCuts ( 0 ),
fCutScheme ( "" ),
fCutSchemeIndexed ( "" ),
- fBoolValues ( 0 ),fIsScheme ( kFALSE )
+ fBoolValues ( 0 ),fIsScheme ( kFALSE ),fExpression(0)
{
fBoolValues = new Bool_t[1];
// fExpression = new AliRsnExpression ( fCutSchemeIndexed );
- fExpression = 0;
AliRsnExpression::sCutSet = this;
}
AliRsnCutSet::AliRsnCutSet ( TString name )
- : TNamed ( name,name ),fNumOfCuts ( 0 ),
+ : TNamed ( name,name ),fCuts(0),fNumOfCuts ( 0 ),
fCutScheme ( "" ),
fCutSchemeIndexed ( "" ),
- fBoolValues ( 0 ),fIsScheme ( kFALSE )
+ fBoolValues ( 0 ),fIsScheme ( kFALSE ),fExpression(0)
{
fBoolValues = new Bool_t[1];
fExpression = 0;
: TNamed ( ( TNamed ) copy ),fCuts ( copy.fCuts ),fNumOfCuts ( copy.fNumOfCuts ),
fCutScheme ( copy.fCutScheme ),
fCutSchemeIndexed ( copy.fCutSchemeIndexed ),
+ fBoolValues(0),
fIsScheme ( copy.fIsScheme ),
fExpression ( copy.fExpression )
{
void AliRsnCutSet::SetCutSchemeIndexed ( TString theValue )
{
AliDebug ( AliLog::kDebug,"<-" );
+ theValue.Append(" ");
// fCutSchemeIndexed = theValue;
fCutSchemeIndexed = GetCutSchemeIndexed();
AliDebug ( AliLog::kDebug,"->" );
// set->SetCutScheme ( "(aaa&!(ccc))&(bbb&!(ccc))" );
//
// set->ShowCuts ();
+ AliDebug(1, opt.Data());
return 0;
}
#include <TObjArray.h>
#include "AliRsnCut.h"
-// class AliRsnCut;
+// class AliRsnCut;
class AliRsnCutMgr;
class AliRsnDaughter;
class AliRsnCutSet : public TNamed
{
-
+
public:
AliRsnCutSet();
AliRsnCutSet ( TString name );
private:
+
+ AliRsnCutSet& operator=(const AliRsnCutSet& /*copy*/) {return (*this);}
+
TObjArray fCuts; // array of cuts
Int_t fNumOfCuts; // number of cuts
TString fCutScheme; // cut scheme
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice *
**************************************************************************/
-
+
//
// Class AliRsnEventBuffer
//
void SetDeleteBufferWhenReset (const Bool_t& theValue = kTRUE) { fDeleteBufferWhenReset = theValue; }
Bool_t GetDeleteBufferWhenReset() const { return fDeleteBufferWhenReset; }
-
+
Int_t NEmptySlots();
private:
-
- AliRsnEventBuffer (const AliRsnEventBuffer& /*buf*/) :
- fDeleteBufferWhenReset(0),fEventsBufferSize(0),fEventsBufferIndex(0) {}
+
+ AliRsnEventBuffer (const AliRsnEventBuffer& buf) :
+ TObject(buf), fDeleteBufferWhenReset(0),fEventsBufferSize(0),fEventsBufferIndex(0) {}
const AliRsnEventBuffer& operator=(const AliRsnEventBuffer& /*buf*/) {return (*this);}
Bool_t fDeleteBufferWhenReset; // flag if buffer should be deleted when reset is done
}
// AliDebug(AliLog::kDebug,Form("fOperator %d",fOperator));
-
+
switch ( fOperator )
{
// TObjString* val3 = ( TObjString* ) tokens->At ( i );
// AliInfo ( Form ( "%d %s",i,val3->String().Data() ) );
// }
-//
-//
+//
+//
delete valtok;
delete optok;
ClassImp ( AliRsnVariableExpression )
//______________________________________________________________________________
-Bool_t AliRsnVariableExpression::Value ( TObjArray& pgm )
+Bool_t AliRsnVariableExpression::Value ( TObjArray& /*pgm*/)
{
-
+
// Int_t indexx = sCutSet->GetIndexByCutName ( fVname.Data() );
AliDebug(AliLog::kDebug,Form("Vname %s",fVname.Data()));
// return sCutSet->GetBoolValue ( indexx );
// Prints AliRsnPIDIndex info
//
Int_t i, j;
+ if (!option) return;
for (i = 0; i < 2; i++) {
for (j = 0; j < AliRsnPID::kSpecies + 1; j++) {
AliInfo (Form (" [%d][%d] %d %d", i, j, fIndex[i][j].GetSize(), fNumOfIndex[i][j]));
// The index argument refers to the used track among the two of the pair.
//
- Int_t i;
- Double_t p2Tot = 0.0;
if (mass > 0 && index >= 0 && index < 2) {
AliRsnDaughter temp(*fDaughter[index]);
temp.SetM(mass);