Update in cuts for Sigma* and update for lego_train macros (M.Vala)
authorfbellini <fbellini@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Apr 2012 09:59:23 +0000 (09:59 +0000)
committerfbellini <fbellini@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Apr 2012 09:59:23 +0000 (09:59 +0000)
23 files changed:
PWGLF/RESONANCES/AliRsnAction.h
PWGLF/RESONANCES/AliRsnCut.cxx
PWGLF/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.cxx
PWGLF/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.h
PWGLF/RESONANCES/AliRsnCutV0.cxx
PWGLF/RESONANCES/AliRsnCutV0.h
PWGLF/RESONANCES/AliRsnDaughterSelector.cxx
PWGLF/RESONANCES/AliRsnDaughterSelector.h
PWGLF/RESONANCES/AliRsnEvent.cxx
PWGLF/RESONANCES/AliRsnListOutput.cxx
PWGLF/RESONANCES/AliRsnLoopDaughter.cxx
PWGLF/RESONANCES/AliRsnLoopEvent.cxx
PWGLF/RESONANCES/AliRsnLoopPair.cxx
PWGLF/RESONANCES/AliRsnMiniAnalysisTask.cxx
PWGLF/RESONANCES/AliRsnValueEvent.cxx
PWGLF/RESONANCES/AliRsnValueEvent.h
PWGLF/RESONANCES/AliRsnVariableExpression.cxx
PWGLF/RESONANCES/macros/lego_train/AddAMRsn.C
PWGLF/RESONANCES/macros/lego_train/AddPIDResponseInputHandler.C
PWGLF/RESONANCES/macros/lego_train/AddRsnDaughterCutsPDG.C
PWGLF/RESONANCES/macros/lego_train/AddRsnDaughterCutsPhi2010.C
PWGLF/RESONANCES/macros/lego_train/RsnConfig.C
PWGLF/RESONANCES/macros/lego_train/RsnManager.C

index 8e95d07..d663ef6 100755 (executable)
 
 class AliRsnAction : public TNamed {
 public:
-   AliRsnAction(const char* name="noName",const char *title="No Title");
+   AliRsnAction(const char *name="noName",const char *title="No Title");
    AliRsnAction(const AliRsnAction &copy);
    AliRsnAction &operator=(const AliRsnAction &copy);
    virtual ~AliRsnAction();
-   
+
    virtual Bool_t InitAction(TList *outList=0,TObjArray *objects=0);
    virtual Bool_t ExecAction(TObjArray *objects=0);
 
 protected:
-   
+
    ClassDef(AliRsnAction, 1)
 };
 
index 464e092..3dd21b4 100644 (file)
@@ -110,7 +110,7 @@ AliRsnCut &AliRsnCut::operator=(const AliRsnCut &copy)
 }
 
 //______________________________________________________________________________
-Bool_t AliRsnCut::IsSelected(TObject* /*object*/)
+Bool_t AliRsnCut::IsSelected(TObject * /*object*/)
 {
 //
 // Virtual cut-checking method.
index 8a1b0d9..23a60a4 100644 (file)
@@ -18,7 +18,8 @@ ClassImp(AliRsnCutDaughterSigmaStar2010PP)
 AliRsnCutDaughterSigmaStar2010PP::AliRsnCutDaughterSigmaStar2010PP(const char *name, AliPID::EParticleType pid) :
    AliRsnCut(name, AliRsnTarget::kDaughter),
    fPID(pid),
-   fCutQuality(Form("%sQuality", name))
+   fCutQuality(Form("%sQuality", name)),
+   fPIDCut(3.0)
 {
 //
 // Constructor
@@ -76,9 +77,9 @@ Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
    //Bool_t   isTOF  = MatchTOF(track);
    //Double_t pTPC   = track->GetTPCmomentum();
    //Double_t p      = track->P();
-   //*Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
+   Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
    //Double_t nsTOF  = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
-   //*Double_t maxTPC = 1E20;
+   Double_t maxTPC = 1E20;
    //Double_t maxTOF = 1E20;
 
    // applies the cut differently depending on the PID and the momentum
@@ -108,8 +109,9 @@ Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
       maxTPC = 2.0;
    else
       return kFALSE;*/
-   //* maxTPC = 3.0;
-   //*return (nsTPC <= maxTPC);
+   //maxTPC = 3.0;
+   maxTPC = fPIDCut;
+   return (nsTPC <= maxTPC);
 
    AliDebugClass(2, "Good Pion (hallelujah)");
    return kTRUE;
index 5599bdc..12a1c37 100644 (file)
@@ -19,17 +19,23 @@ public:
    AliRsnCutDaughterSigmaStar2010PP(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
    virtual ~AliRsnCutDaughterSigmaStar2010PP() { }
 
-   void                   SetPID(AliPID::EParticleType type) {fPID = type;}
+   //void                   SetPID(AliPID::EParticleType type) {fPID = type;}
    AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
    Bool_t                 MatchTOF(const AliVTrack *vtrack);
    virtual Bool_t         IsSelected(TObject *obj);
 
+   void           SetPIDCut(Double_t value)                  {fPIDCut = value;}
+
 private:
 
    AliPID::EParticleType fPID;              // PID for track
    AliRsnCutTrackQuality fCutQuality;       // track quality cut
 
-   ClassDef(AliRsnCutDaughterSigmaStar2010PP,1) // cut definitions for Sigma*
+   ClassDef(AliRsnCutDaughterSigmaStar2010PP,2) // cut definitions for Sigma*
+
+protected:
+
+   Double_t         fPIDCut;          // nsigmas for pions
 
 };
 
index a93f3e2..04bd3d3 100644 (file)
 ClassImp(AliRsnCutV0)
 
 //_________________________________________________________________________________________________
-AliRsnCutV0::AliRsnCutV0(const char *name, Int_t hypothesis) :
+//AliRsnCutV0::AliRsnCutV0(const char *name, Int_t hypothesis) :
+AliRsnCutV0::AliRsnCutV0(const char *name, Int_t hypothesis, AliPID::EParticleType pid, AliPID::EParticleType pid2) :
    AliRsnCut(name, AliRsnTarget::kDaughter),
    fHypothesis(0),
    fMass(0.0),
-   fTolerance(0.2),
+   fTolerance(0.01),
    fMaxDCAVertex(0.3),
    fMinCosPointAngle(0.95),
-   fMaxDaughtersDCA(0.1),
+   fMaxDaughtersDCA(0.5),
+   fMaxRapidity(0.8),
+   fPID(pid),
+   fPID2(pid2),
+   fPIDCut1(4.0),
+   fPIDCut2(3.0),
+   fPIDCut3(3.0),
    fESDtrackCuts(0x0)
 {
 //
@@ -57,6 +64,12 @@ AliRsnCutV0::AliRsnCutV0(const AliRsnCutV0 &copy) :
    fMaxDCAVertex(copy.fMaxDCAVertex),
    fMinCosPointAngle(copy.fMinCosPointAngle),
    fMaxDaughtersDCA(copy.fMaxDaughtersDCA),
+   fMaxRapidity(copy.fMaxRapidity),
+   fPID(copy.fPID),
+   fPID2(copy.fPID2),
+   fPIDCut1(copy.fPIDCut1),
+   fPIDCut2(copy.fPIDCut2),
+   fPIDCut3(copy.fPIDCut3),
    fESDtrackCuts(copy.fESDtrackCuts)
 {
 //
@@ -75,13 +88,18 @@ AliRsnCutV0 &AliRsnCutV0::operator=(const AliRsnCutV0 &copy)
 
    if (this == &copy)
       return *this;
-
    fHypothesis = copy.fHypothesis;
    fMass = copy.fMass;
    fTolerance = copy.fTolerance;
    fMaxDCAVertex = copy.fMaxDCAVertex;
    fMinCosPointAngle = copy.fMinCosPointAngle;
    fMaxDaughtersDCA = copy.fMaxDaughtersDCA;
+   fMaxRapidity = copy.fMaxRapidity;
+   fPID = copy.fPID;
+   fPID2 = copy.fPID2;
+   fPIDCut1 = copy.fPIDCut1;
+   fPIDCut2 = copy.fPIDCut2;
+   fPIDCut3 = copy.fPIDCut3;
    fESDtrackCuts = copy.fESDtrackCuts;
 
    return (*this);
@@ -157,10 +175,11 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
    }
 
    // filter like-sign V0
-   //if ((TMath::Abs(pTrack->GetSign()) - TMath::Abs(nTrack->GetSign()) ) < 0.1) {
-   //   AliDebugClass(2, "Failed like-sign V0 check");
-   //   return kFALSE;
-   //}
+   if ( TMath::Abs( ((pTrack->GetSign()) - (nTrack->GetSign())) ) < 0.1) {
+      AliDebugClass(2, "Failed like-sign V0 check");
+      return kFALSE;
+   }
+
 
    // check compatibility with expected species hypothesis
    v0->ChangeMassHypothesis(fHypothesis);
@@ -182,6 +201,104 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
       AliDebugClass(2, "Failed check on DCA between daughters");
       return kFALSE;
    }
+   if (TMath::Abs(v0->Y(fHypothesis)) > fMaxRapidity) {
+      AliDebugClass(2, "Failed check on V0 rapidity");
+      return kFALSE;
+   }
+
+
+   // check PID on proton or antiproton from V0
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   // check if TOF is matched
+   // and computes all values used in the PID cut
+   //Bool_t   isTOFpos  = MatchTOF(ptrack);
+   //Bool_t   isTOFneg  = MatchTOF(ntrack);
+   Double_t pospTPC   = pTrack->GetTPCmomentum();
+   Double_t negpTPC   = nTrack->GetTPCmomentum();
+   //Double_t posp      = pTrack->P();
+   //Double_t negp      = nTrack->P();
+   Double_t posnsTPC   = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, fPID));
+   Double_t posnsTPC2  = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, fPID2));
+   //Double_t posnsTOF  = TMath::Abs(pid->NumberOfSigmasTOF(ptrack, fPID));
+   Double_t negnsTPC   = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, fPID));
+   Double_t negnsTPC2  = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, fPID2));
+   //Double_t negnsTOF  = TMath::Abs(pid->NumberOfSigmasTOF(ntrack, fPID));
+   Double_t maxTPC = 1E20;
+   Double_t maxTPC2 = 1E20;
+   //Double_t maxTOF = 1E20;
+
+   // applies the cut differently depending on the PID and the momentum
+
+   if(fHypothesis==kLambda0) {
+      //if (isTOFpos) {
+      // TPC: 5sigma cut for all
+      //if (posnsTPC > 5.0) return kFALSE;
+      // TOF: 3sigma
+      // maxTOF = 3.0;
+      //return (posnsTOF <= maxTOF);
+      //} else {
+      // TPC:
+      // below 600 MeV: 4sigma
+      // above 600 MeV: 3sigma
+
+      if (pospTPC <= 0.6 && fPID==AliPID::kProton)
+         //maxTPC = 4.0;
+         maxTPC = fPIDCut1;
+      else if (pospTPC > 0.6 && fPID==AliPID::kProton)
+         //maxTPC = 3.0;
+         maxTPC = fPIDCut2;
+      //else
+      //return kFALSE;
+
+      //maxTPC2 = 3.0;
+      maxTPC2 = fPIDCut3;
+
+      if (! ((posnsTPC <= maxTPC) && (negnsTPC2 <= maxTPC2)) ) {
+         AliDebugClass(2, "Failed check on V0 PID");
+         return kFALSE;
+      }
+   }
+
+   //}
+
+   if(fHypothesis==kLambda0Bar) {
+      //if (isTOFneg) {
+      // TPC: 5sigma cut for all
+      //if (negnsTPC > 5.0) return kFALSE;
+      // TOF: 3sigma
+      // maxTOF = 3.0;
+      //return (negnsTOF <= maxTOF);
+      //} else {
+      // TPC:
+      // below 600 MeV: 4sigma
+      // above 600 MeV: 3sigma
+
+      if (negpTPC <= 0.6 && fPID==AliPID::kProton)
+         //maxTPC = 4.0;
+         maxTPC = fPIDCut1;
+      else if (negpTPC > 0.6 && fPID==AliPID::kProton)
+         //maxTPC = 3.0;
+         maxTPC = fPIDCut2;
+      else
+         return kFALSE;
+
+      //maxTPC2 = 3.0;
+      maxTPC2 = fPIDCut3;
+
+      if(! ((negnsTPC <= maxTPC) && (posnsTPC2 <= maxTPC2)) ) {
+         AliDebugClass(2, "Failed check on V0 PID");
+         return kFALSE;
+      }
+   }
+   //}
+
 
    // if we reach this point, all checks were successful
    AliDebugClass(2, "Good V0 (hallelujah)");
index 05a7dfe..9ca7b15 100644 (file)
@@ -5,15 +5,19 @@
 #include <TString.h>
 
 #include "AliRsnCut.h"
+#include "AliPIDResponse.h"
 
 class AliESDtrack;
 class AliAODTrack;
 
+
 class AliRsnCutV0 : public AliRsnCut {
 
 public:
 
-   AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0);
+
+   //AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0);
+   AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0, AliPID::EParticleType pid = AliPID::kProton, AliPID::EParticleType pid2 = AliPID::kPion);
    AliRsnCutV0(const AliRsnCutV0 &copy);
    AliRsnCutV0 &operator=(const AliRsnCutV0 &copy);
    virtual ~AliRsnCutV0() { }
@@ -24,6 +28,11 @@ public:
    void           SetMaxDCAVertex(Double_t value)          {fMaxDCAVertex = value;}
    void           SetMinCosPointingAngle(Double_t value)   {fMinCosPointAngle = value;}
    void           SetMaxDaughtersDCA(Double_t value)       {fMaxDaughtersDCA = value;}
+   void           SetMaxRapidity(Double_t value)           {fMaxRapidity = value;}
+
+   void           SetPIDCut1(Double_t value)               {fPIDCut1 = value;}
+   void           SetPIDCut2(Double_t value)               {fPIDCut2 = value;}
+   void           SetPIDCut3(Double_t value)               {fPIDCut3 = value;}
 
    virtual Bool_t IsSelected(TObject *obj);
    virtual void   Print(const Option_t *option = "") const;
@@ -39,9 +48,15 @@ protected:
    Double_t         fMaxDCAVertex;     // max allowed DCA from primary vertex
    Double_t         fMinCosPointAngle; // min allowed cosine of pointing angle
    Double_t         fMaxDaughtersDCA;  // max allowed DCA between the two daughers
-   //AliPID::EParticleType fRefPID[2];
-   //Double_t              fNSigmaTPC[2];
-   //Double_t              fNSigmaTOF[3];
+   Double_t         fMaxRapidity;      // max allowed V0 rapidity
+
+   AliPID::EParticleType fPID;         // PID for track
+   AliPID::EParticleType fPID2;        // PID for track
+
+   Double_t         fPIDCut1;          // nsigmas for protons < 600 MeV/c
+   Double_t         fPIDCut2;          // nsigmas for protons > 600 MeV/c
+   Double_t         fPIDCut3;          // nsigmas for pions
+
 
    AliESDtrackCuts *fESDtrackCuts;     // quality cuts for v0 daughters
 
@@ -59,6 +74,7 @@ inline void AliRsnCutV0::SetHypothesis(Int_t code)
 
    switch (fHypothesis) {
       case kLambda0:
+         fMass = 1.11568;
       case kLambda0Bar:
          fMass = 1.11568;
          break;
index 3fe7015..da71044 100644 (file)
@@ -196,7 +196,7 @@ void AliRsnDaughterSelector::ExecActions(AliRsnEvent *ev)
 //
 
    if (!ev) return;
-   
+
    TObjArray objects;
    objects.Add(ev);
 
index 44d778c..c751d5d 100644 (file)
@@ -35,10 +35,10 @@ public:
 
    TClonesArray *GetCutSetC() {return &fCutSetsC;}
    TClonesArray *GetCutSetN() {return &fCutSetsN;}
-   
+
    void          AddAction(AliRsnAction *action);
    TObjArray    *GetActions() { return &fActions; }
-   
+
    void SetLabelCheck(Bool_t useLabelCheck = kTRUE) { fUseLabelCheck = useLabelCheck;}
 
 private:
@@ -49,9 +49,9 @@ private:
    TClonesArray fEntryListsN;     // entry lists for neutrals
    TClonesArray fEntryListsP;     // entry lists for charged (one per sign)
    TClonesArray fEntryListsM;     // entry lists for charged (one per sign)
-   
+
    Bool_t       fUseLabelCheck;   // flag is reapiting of label should be checked
-   
+
    TObjArray    fActions;
 
    ClassDef(AliRsnDaughterSelector, 3)
index c5eeb07..20410c6 100644 (file)
@@ -70,6 +70,7 @@ AliRsnEvent &AliRsnEvent::operator= (const AliRsnEvent &event)
 //
 // Works in the same way as the copy constructor.
 //
+
    TObject::operator=(event);
    if (this == &event)
       return *this;
@@ -110,37 +111,38 @@ void AliRsnEvent::SetDaughter(AliRsnDaughter &out, Int_t index, Bool_t fromMC)
    if (!InputOK()) return;
    Bool_t inputESD = IsESD();
 
-
-   Int_t trueIndex;
-   AliRsnDaughter::ERefType type;
-   if (!ConvertAbsoluteIndex(index, trueIndex, type)) {
-      AliError(Form("Failed to convert absolute index %d", index));
-      return;
-   }
-   switch (type) {
-      case AliRsnDaughter::kTrack:
-         if (inputESD) {
-            SetDaughterESDtrack(out, trueIndex);
-
-         } else {
-            SetDaughterAODtrack(out, trueIndex);
-         }
-         break;
-      case AliRsnDaughter::kV0:
-         if (inputESD) SetDaughterESDv0(out, trueIndex); else SetDaughterAODv0(out, trueIndex);
-         break;
-      case AliRsnDaughter::kCascade:
-         if (inputESD) SetDaughterESDcascade(out, trueIndex); else SetDaughterAODcascade(out, trueIndex);
-         break;
-      default:
-         AliError("Unrecognized daughter type");
-         return;
-   }
-
    // if it is pure MC, the index tells what particle
    // to be read in the stack of MC particles, otherwise
    // it is converted into a real collection index
-   if (fromMC) out.SetRef(out.GetRefMC());
+   if (fromMC) {
+      out.SetLabel(index);
+      Bool_t ok = (inputESD ? SetMCInfoESD(out) : SetMCInfoAOD(out));
+      if (ok) {
+         out.SetGood();
+         out.SetRef(out.GetRefMC());
+      }
+   } else {
+      Int_t trueIndex;
+      AliRsnDaughter::ERefType type;
+      if (!ConvertAbsoluteIndex(index, trueIndex, type)) {
+         AliError(Form("Failed to convert absolute index %d", index));
+         return;
+      }
+      switch (type) {
+         case AliRsnDaughter::kTrack:
+            if (inputESD) SetDaughterESDtrack(out, trueIndex); else SetDaughterAODtrack(out, trueIndex);
+            break;
+         case AliRsnDaughter::kV0:
+            if (inputESD) SetDaughterESDv0(out, trueIndex); else SetDaughterAODv0(out, trueIndex);
+            break;
+         case AliRsnDaughter::kCascade:
+            if (inputESD) SetDaughterESDcascade(out, trueIndex); else SetDaughterAODcascade(out, trueIndex);
+            break;
+         default:
+            AliError("Unrecognized daughter type");
+            return;
+      }
+   }
 }
 
 //_____________________________________________________________________________
@@ -384,7 +386,7 @@ Bool_t AliRsnEvent::SetMCInfoESD(AliRsnDaughter &out)
    if (imum >= 0 && imum < nMC) {
       AliMCParticle *mcMother = (AliMCParticle *)mc->GetTrack(imum);
       if (mcMother) {
-         out.SetMotherPDG(TMath::Abs(mcMother->Particle()->GetPdgCode()));
+         out.SetMotherPDG(mcMother->Particle()->GetPdgCode());
       } else {
          AliWarning(Form("Stack discontinuity: label mother %d refers to a NULL object", imum));
       }
@@ -435,7 +437,7 @@ Bool_t AliRsnEvent::SetMCInfoAOD(AliRsnDaughter &out)
    if (imum >= 0 && imum < nMC) {
       AliAODMCParticle *mcMother = (AliAODMCParticle *)mcArray->At(imum);
       if (mcMother) {
-         out.SetMotherPDG(TMath::Abs(mcMother->GetPdgCode()));
+         out.SetMotherPDG(mcMother->GetPdgCode());
       } else {
          AliWarning(Form("Stack discontinuity: label mother %d refers to a NULL object", imum));
       }
index 516914b..26dcab8 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "AliRsnListOutput.h"
 
-
 ClassImp(AliRsnListOutput)
 
 //________________________________________________________________________________________
@@ -164,8 +163,17 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
    // resize the output array
    fArray.Set(fNValues);
 
+
+   Bool_t isPair=kFALSE;
+
    // create the name
-   TString name(Form("%s_%s", prefix, GetName()));
+   TString name(GetName());
+   if (!name.CompareTo("pair")) isPair = kTRUE;
+   if (isPair) name = "";
+   else name.Prepend(".");
+   name.Prepend(prefix);
+
+//    TString name(Form("%s.%s", prefix, GetName()));
    AliRsnValue *val = 0x0;
    for (i = 0; i < fNValues; i++) {
       val = GetValue(i);
@@ -173,8 +181,10 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
          AliError(Form("Slot %d in value list is NULL", i));
          return kFALSE;
       }
-      name += '_';
-      name += val->GetName();
+      if (!isPair) {
+         name += '_';
+         name += val->GetName();
+      }
    }
 
    // allowed objects
@@ -184,15 +194,15 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
    // and, if successful, insert into the list
    switch (fType) {
       case kHistoDefault:
-         name.Append("_hist");
+//          name.Append("_hist");
          object = CreateHistogram(name.Data());
          break;
       case kHistoSparse:
-         name.Append("_hsparse");
+//          name.Append("_hsparse");
          object = CreateHistogramSparse(name.Data());
          break;
       case kCFContainer:
-         name.Append("_cf");
+//          name.Append("_cf");
          object = CreateCFContainer(name.Data());
          break;
       default:
@@ -276,7 +286,10 @@ THnSparseF *AliRsnListOutput::CreateHistogramSparse(const char *name)
    hist->Sumw2();
 
    // update the various axes using the definitions given in the array of axes here
+   AliRsnValue *val = 0x0;
    for (i = 0; i < fNValues; i++) {
+      val = GetValue(i);
+      if (val) hist->GetAxis(i)->SetName(val->GetName());
       hist->GetAxis(i)->Set(nbins[i], array[i].GetArray());
    }
 
index 3bec78c..49235c6 100644 (file)
@@ -78,7 +78,7 @@ AliRsnLoopDaughter::~AliRsnLoopDaughter()
 }
 
 //_____________________________________________________________________________
-void AliRsnLoopDaughter::Print(Option_t* /*option*/) const
+void AliRsnLoopDaughter::Print(Option_t * /*option*/) const
 {
 //
 // Prints info about pair
index 481b0cd..62e74f9 100644 (file)
@@ -52,7 +52,7 @@ AliRsnLoopEvent::~AliRsnLoopEvent()
 }
 
 //_____________________________________________________________________________
-void AliRsnLoopEvent::Print(Option_t* /*option*/) const
+void AliRsnLoopEvent::Print(Option_t * /*option*/) const
 {
 //
 // Prints info about pair
index fd64c2b..9fe239e 100644 (file)
@@ -101,7 +101,7 @@ AliRsnLoopPair::~AliRsnLoopPair()
 }
 
 //_____________________________________________________________________________
-void AliRsnLoopPair::Print(Option_t* /*option*/) const
+void AliRsnLoopPair::Print(Option_t * /*option*/) const
 {
 //
 // Prints info about pair
@@ -124,10 +124,9 @@ Bool_t AliRsnLoopPair::Init(const char *prefix, TList *list)
    AliInfo(Form("[%s] Initialization", GetName()));
 
    TString name(prefix);
-   name += '_';
+   name += '.';
    name += GetName();
-//    if (IsMixed()) name.Prepend("mix_");
-   if (IsMixed()) name.Append("_mix");
+//    if (IsMixed()) name.Append("_mix");
 
    return AliRsnLoop::Init(name.Data(), list);
 }
index 411b46d..be893b6 100644 (file)
@@ -756,17 +756,17 @@ Double_t AliRsnMiniAnalysisTask::ComputeCentrality(Bool_t isESD)
 //
 
    if (fUseCentrality) {
-     
-     if ((!fUseMC) && (!isESD) && (fUseAOD049CentralityPatch)) {
-       return ApplyCentralityPatchAOD049();
-     } else {
-       AliCentrality *centrality = fInputEvent->GetCentrality();
-       if (!centrality) {
-        AliError("Cannot compute centrality!");
-        return -1.0;
-       }
-       return centrality->GetCentralityPercentile(fCentralityType.Data());
-     }
+
+      if ((!fUseMC) && (!isESD) && (fUseAOD049CentralityPatch)) {
+         return ApplyCentralityPatchAOD049();
+      } else {
+         AliCentrality *centrality = fInputEvent->GetCentrality();
+         if (!centrality) {
+            AliError("Cannot compute centrality!");
+            return -1.0;
+         }
+         return centrality->GetCentralityPercentile(fCentralityType.Data());
+      }
    } else {
       if (!fCentralityType.CompareTo("TRACKS"))
          return fInputEvent->GetNumberOfTracks();
@@ -948,77 +948,78 @@ Bool_t AliRsnMiniAnalysisTask::EventsMatch(AliRsnMiniEvent *event1, AliRsnMiniEv
 //---------------------------------------------------------------------
 Double_t AliRsnMiniAnalysisTask::ApplyCentralityPatchAOD049()
 {
-  //
-  //Apply centrality patch for AOD049 outliers
-  //
-  if (fInputEvent->InheritsFrom(AliESDEvent::Class())){
-    AliWarning("Requested patch for AOD049 for ESD. ");
-    return -999.0;
-  }
-  
-  if (fCentralityType!="V0M"){
-    AliWarning("Requested patch forAOD049 for wrong value (not centrality from V0).");
-    return -999.0;
-  }
-  
-  AliCentrality *centrality = fInputEvent->GetCentrality();
-  if (!centrality) {
-    AliWarning("Cannot get centrality from AOD event.");
-    return -999.0;
-  }
-
-  Float_t cent = (Float_t)(centrality->GetCentralityPercentile("V0M"));
-  /*
-  Bool_t isSelRun = kFALSE;
-  Int_t selRun[5] = {138364, 138826, 138828, 138836, 138871};  
-  if(cent<0){
-    Int_t quality = centrality->GetQuality();
-    if(quality<=1){
-      cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
-    } else {
-      Int_t runnum=aodEvent->GetRunNumber();
-      for(Int_t ir=0;ir<5;ir++){
-       if(runnum==selRun[ir]){
-         isSelRun=kTRUE;
-         break;
-       }
-      }
-      if((quality==8||quality==9)&&isSelRun) cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
-    }  
-  } 
-  */
-  
-  if(cent>=0.0) {
-    Float_t v0 = 0.0;
-    AliAODEvent *aodEvent = (AliAODEvent *)fInputEvent;
-    AliAODVZERO* aodV0 = (AliAODVZERO*) aodEvent->GetVZEROData();
-    v0+=aodV0->GetMTotV0A();
-    v0+=aodV0->GetMTotV0C();
-    if ( (cent==0) && (v0<19500) ) {
-      AliDebug(3, Form("Filtering issue in centrality -> cent = %5.2f",cent));
+   //
+   //Apply centrality patch for AOD049 outliers
+   //
+   if (fInputEvent->InheritsFrom(AliESDEvent::Class())) {
+      AliWarning("Requested patch for AOD049 for ESD. ");
       return -999.0;
-    }
-    Float_t tkl = (Float_t)(aodEvent->GetTracklets()->GetNumberOfTracklets());
-    Float_t val = 1.30552 +  0.147931 * v0;
-    
-    Float_t tklSigma[101] = {176.644, 156.401, 153.789, 153.015, 142.476, 137.951, 136.127, 129.852, 127.436, 124.86, 
-                            120.788, 115.611, 113.172, 110.496, 109.127, 104.421, 102.479, 99.9766, 97.5152, 94.0654, 
-                            92.4602, 89.3364, 87.1342, 83.3497, 82.6216, 81.1084, 78.0793, 76.1234, 72.9434, 72.1334, 
-                            68.0056, 68.2755, 66.0376, 62.9666, 62.4274, 59.65, 58.3776, 56.6361, 54.5184, 53.4224, 
-                            51.932, 50.8922, 48.2848, 47.912, 46.5717, 43.4114, 43.2083, 41.3065, 40.1863, 38.5255, 
-                            37.2851, 37.5396, 34.4949, 33.8366, 31.8043, 31.7412, 30.8392, 30.0274, 28.8793, 27.6398, 
-                            26.6488, 25.0183, 25.1489, 24.4185, 22.9107, 21.2002, 21.6977, 20.1242, 20.4963, 19.0235, 
-                            19.298, 17.4103, 16.868, 15.2939, 15.2939, 16.0295, 14.186, 14.186, 15.2173, 12.9504, 12.9504, 
-                            12.9504, 15.264, 12.3674, 12.3674, 12.3674, 12.3674, 12.3674, 18.3811, 13.7544, 13.7544, 
-                            13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544 };
-
-    if ( TMath::Abs(tkl-val) > 6.*tklSigma[(Int_t)cent] )  {
-      AliDebug(3, Form("Outlier event in centrality -> cent = %5.2f",cent));
+   }
+
+   if (fCentralityType!="V0M") {
+      AliWarning("Requested patch forAOD049 for wrong value (not centrality from V0).");
       return -999.0;
-    }
-  } else {
-    //force it to be -999. whatever the negative value was
-    cent = -999.;
-  }
-  return cent;
+   }
+
+   AliCentrality *centrality = fInputEvent->GetCentrality();
+   if (!centrality) {
+      AliWarning("Cannot get centrality from AOD event.");
+      return -999.0;
+   }
+
+   Float_t cent = (Float_t)(centrality->GetCentralityPercentile("V0M"));
+   /*
+   Bool_t isSelRun = kFALSE;
+   Int_t selRun[5] = {138364, 138826, 138828, 138836, 138871};
+   if(cent<0){
+     Int_t quality = centrality->GetQuality();
+     if(quality<=1){
+       cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
+     } else {
+       Int_t runnum=aodEvent->GetRunNumber();
+       for(Int_t ir=0;ir<5;ir++){
+   if(runnum==selRun[ir]){
+     isSelRun=kTRUE;
+     break;
+   }
+       }
+       if((quality==8||quality==9)&&isSelRun) cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
+     }
+   }
+   */
+
+   if(cent>=0.0) {
+      Float_t v0 = 0.0;
+      AliAODEvent *aodEvent = (AliAODEvent *)fInputEvent;
+      AliAODVZERO *aodV0 = (AliAODVZERO *) aodEvent->GetVZEROData();
+      v0+=aodV0->GetMTotV0A();
+      v0+=aodV0->GetMTotV0C();
+      if ( (cent==0) && (v0<19500) ) {
+         AliDebug(3, Form("Filtering issue in centrality -> cent = %5.2f",cent));
+         return -999.0;
+      }
+      Float_t tkl = (Float_t)(aodEvent->GetTracklets()->GetNumberOfTracklets());
+      Float_t val = 1.30552 +  0.147931 * v0;
+
+      Float_t tklSigma[101] = {176.644, 156.401, 153.789, 153.015, 142.476, 137.951, 136.127, 129.852, 127.436, 124.86,
+                               120.788, 115.611, 113.172, 110.496, 109.127, 104.421, 102.479, 99.9766, 97.5152, 94.0654,
+                               92.4602, 89.3364, 87.1342, 83.3497, 82.6216, 81.1084, 78.0793, 76.1234, 72.9434, 72.1334,
+                               68.0056, 68.2755, 66.0376, 62.9666, 62.4274, 59.65, 58.3776, 56.6361, 54.5184, 53.4224,
+                               51.932, 50.8922, 48.2848, 47.912, 46.5717, 43.4114, 43.2083, 41.3065, 40.1863, 38.5255,
+                               37.2851, 37.5396, 34.4949, 33.8366, 31.8043, 31.7412, 30.8392, 30.0274, 28.8793, 27.6398,
+                               26.6488, 25.0183, 25.1489, 24.4185, 22.9107, 21.2002, 21.6977, 20.1242, 20.4963, 19.0235,
+                               19.298, 17.4103, 16.868, 15.2939, 15.2939, 16.0295, 14.186, 14.186, 15.2173, 12.9504, 12.9504,
+                               12.9504, 15.264, 12.3674, 12.3674, 12.3674, 12.3674, 12.3674, 18.3811, 13.7544, 13.7544,
+                               13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544
+                              };
+
+      if ( TMath::Abs(tkl-val) > 6.*tklSigma[(Int_t)cent] )  {
+         AliDebug(3, Form("Outlier event in centrality -> cent = %5.2f",cent));
+         return -999.0;
+      }
+   } else {
+      //force it to be -999. whatever the negative value was
+      cent = -999.;
+   }
+   return cent;
 }
index 3136b52..2c0d877 100644 (file)
@@ -222,88 +222,89 @@ Bool_t AliRsnValueEvent::Eval(TObject *object)
 //___________________________________________________________________
 void AliRsnValueEvent::ApplyCentralityPatchAOD049(TObject *object)
 {
-  //
-  //Apply centrality patch for AOD049 outliers
-  //
-  fComputedValue = -999.;
-  if (!TargetOK(object)) return;
-  if  (fEvent->IsESD()) {
-    AliWarning(Form("Requested patch for AOD049 for ESD. Setting cent = %5.2f", fComputedValue));
-    return;
-  }
-
-  if (fType!=AliRsnValueEvent::kCentralityV0){
-    AliWarning(Form("Requested patch forAOD049 for wrong value (not centrality from V0). Setting cent = %5.2f", fComputedValue));
-    return;
-  }
-  
-  AliAODEvent * aodEvent = (AliAODEvent*)fEvent->GetRefAOD();
-  if (!aodEvent) {
-    AliWarning(Form("NULL ref to AOD event. Setting cent = %5.2f", fComputedValue));
-    return;
-  }
-  
-  // declare support variables
-  AliCentrality *centrality = aodEvent->GetCentrality();
-  if (!centrality) {
-    AliWarning(Form("Cannot get centrality from AOD event. Setting cent = %5.2f", fComputedValue));
-    return;
-  }
+   //
+   //Apply centrality patch for AOD049 outliers
+   //
+   fComputedValue = -999.;
+   if (!TargetOK(object)) return;
+   if  (fEvent->IsESD()) {
+      AliWarning(Form("Requested patch for AOD049 for ESD. Setting cent = %5.2f", fComputedValue));
+      return;
+   }
 
-  Float_t cent = (Float_t)(centrality->GetCentralityPercentile("V0M"));
-  
-  /*
-  Bool_t isSelRun = kFALSE;
-  Int_t selRun[5] = {138364, 138826, 138828, 138836, 138871};
-    if(cent<0){
-    Int_t quality = centrality->GetQuality();
-    if(quality<=1){
-      cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
-    } else {
-      Int_t runnum=aodEvent->GetRunNumber();
-      for(Int_t ir=0;ir<5;ir++){
-       if(runnum==selRun[ir]){
-         isSelRun=kTRUE;
-         break;
-       }
-      }
-      if((quality==8||quality==9)&&isSelRun) cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
-    }  
-  } 
-  */
-  if(cent>=0.0) {
-    Float_t v0 = 0.0;
-    AliAODVZERO* aodV0 = (AliAODVZERO*) aodEvent->GetVZEROData();
-    v0+=aodV0->GetMTotV0A();
-    v0+=aodV0->GetMTotV0C();
-    if ( (cent==0) && (v0<19500) ) {
-      fComputedValue = -999.;//filtering issue
-      AliDebug(3, Form("Filtering issue in centrality -> cent = %5.2f",fComputedValue));
+   if (fType!=AliRsnValueEvent::kCentralityV0) {
+      AliWarning(Form("Requested patch forAOD049 for wrong value (not centrality from V0). Setting cent = %5.2f", fComputedValue));
       return;
-    }
-    Float_t tkl = (Float_t)(aodEvent->GetTracklets()->GetNumberOfTracklets());
-    Float_t val = 1.30552 +  0.147931 * v0;
+   }
 
-    Float_t tklSigma[101] = {176.644, 156.401, 153.789, 153.015, 142.476, 137.951, 136.127, 129.852, 127.436, 124.86, 
-                            120.788, 115.611, 113.172, 110.496, 109.127, 104.421, 102.479, 99.9766, 97.5152, 94.0654, 
-                            92.4602, 89.3364, 87.1342, 83.3497, 82.6216, 81.1084, 78.0793, 76.1234, 72.9434, 72.1334, 
-                            68.0056, 68.2755, 66.0376, 62.9666, 62.4274, 59.65, 58.3776, 56.6361, 54.5184, 53.4224, 
-                            51.932, 50.8922, 48.2848, 47.912, 46.5717, 43.4114, 43.2083, 41.3065, 40.1863, 38.5255, 
-                            37.2851, 37.5396, 34.4949, 33.8366, 31.8043, 31.7412, 30.8392, 30.0274, 28.8793, 27.6398, 
-                            26.6488, 25.0183, 25.1489, 24.4185, 22.9107, 21.2002, 21.6977, 20.1242, 20.4963, 19.0235, 
-                            19.298, 17.4103, 16.868, 15.2939, 15.2939, 16.0295, 14.186, 14.186, 15.2173, 12.9504, 12.9504, 
-                            12.9504, 15.264, 12.3674, 12.3674, 12.3674, 12.3674, 12.3674, 18.3811, 13.7544, 13.7544, 
-                            13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544 };
+   AliAODEvent *aodEvent = (AliAODEvent *)fEvent->GetRefAOD();
+   if (!aodEvent) {
+      AliWarning(Form("NULL ref to AOD event. Setting cent = %5.2f", fComputedValue));
+      return;
+   }
 
-    if ( TMath::Abs(tkl-val) > 6.*tklSigma[(Int_t)cent] )  {
-      fComputedValue = -999.;//outlier
-      AliDebug(3, Form("Outlier event in centrality -> cent = %5.2f",fComputedValue));
+   // declare support variables
+   AliCentrality *centrality = aodEvent->GetCentrality();
+   if (!centrality) {
+      AliWarning(Form("Cannot get centrality from AOD event. Setting cent = %5.2f", fComputedValue));
       return;
-    }
-  } else {
-    //force it to be -999. whatever the negative value was
-    cent = -999.;
-  }
-  fComputedValue=cent;
-  return;
+   }
+
+   Float_t cent = (Float_t)(centrality->GetCentralityPercentile("V0M"));
+
+   /*
+   Bool_t isSelRun = kFALSE;
+   Int_t selRun[5] = {138364, 138826, 138828, 138836, 138871};
+     if(cent<0){
+     Int_t quality = centrality->GetQuality();
+     if(quality<=1){
+       cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
+     } else {
+       Int_t runnum=aodEvent->GetRunNumber();
+       for(Int_t ir=0;ir<5;ir++){
+   if(runnum==selRun[ir]){
+     isSelRun=kTRUE;
+     break;
+   }
+       }
+       if((quality==8||quality==9)&&isSelRun) cent=(Float_t)centrality->GetCentralityPercentileUnchecked("V0M");
+     }
+   }
+   */
+   if(cent>=0.0) {
+      Float_t v0 = 0.0;
+      AliAODVZERO *aodV0 = (AliAODVZERO *) aodEvent->GetVZEROData();
+      v0+=aodV0->GetMTotV0A();
+      v0+=aodV0->GetMTotV0C();
+      if ( (cent==0) && (v0<19500) ) {
+         fComputedValue = -999.;//filtering issue
+         AliDebug(3, Form("Filtering issue in centrality -> cent = %5.2f",fComputedValue));
+         return;
+      }
+      Float_t tkl = (Float_t)(aodEvent->GetTracklets()->GetNumberOfTracklets());
+      Float_t val = 1.30552 +  0.147931 * v0;
+
+      Float_t tklSigma[101] = {176.644, 156.401, 153.789, 153.015, 142.476, 137.951, 136.127, 129.852, 127.436, 124.86,
+                               120.788, 115.611, 113.172, 110.496, 109.127, 104.421, 102.479, 99.9766, 97.5152, 94.0654,
+                               92.4602, 89.3364, 87.1342, 83.3497, 82.6216, 81.1084, 78.0793, 76.1234, 72.9434, 72.1334,
+                               68.0056, 68.2755, 66.0376, 62.9666, 62.4274, 59.65, 58.3776, 56.6361, 54.5184, 53.4224,
+                               51.932, 50.8922, 48.2848, 47.912, 46.5717, 43.4114, 43.2083, 41.3065, 40.1863, 38.5255,
+                               37.2851, 37.5396, 34.4949, 33.8366, 31.8043, 31.7412, 30.8392, 30.0274, 28.8793, 27.6398,
+                               26.6488, 25.0183, 25.1489, 24.4185, 22.9107, 21.2002, 21.6977, 20.1242, 20.4963, 19.0235,
+                               19.298, 17.4103, 16.868, 15.2939, 15.2939, 16.0295, 14.186, 14.186, 15.2173, 12.9504, 12.9504,
+                               12.9504, 15.264, 12.3674, 12.3674, 12.3674, 12.3674, 12.3674, 18.3811, 13.7544, 13.7544,
+                               13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544, 13.7544
+                              };
+
+      if ( TMath::Abs(tkl-val) > 6.*tklSigma[(Int_t)cent] )  {
+         fComputedValue = -999.;//outlier
+         AliDebug(3, Form("Outlier event in centrality -> cent = %5.2f",fComputedValue));
+         return;
+      }
+   } else {
+      //force it to be -999. whatever the negative value was
+      cent = -999.;
+   }
+   fComputedValue=cent;
+   return;
 }
index 8c509e5..abf7b3b 100644 (file)
@@ -39,7 +39,7 @@ public:
 
    virtual Bool_t   Eval(TObject *object);
    void             ApplyCentralityPatchAOD049(TObject *object);
-   
+
 protected:
 
    EType           fType;         //  type from enumeration
index 283ed55..76680ee 100644 (file)
@@ -15,7 +15,7 @@
 ClassImp(AliRsnVariableExpression)
 
 //______________________________________________________________________________
-Bool_t AliRsnVariableExpression::Value(TObjArray& /*pgm*/)
+Bool_t AliRsnVariableExpression::Value(TObjArray & /*pgm*/)
 {
 
 //   Int_t indexx = fgCutSet->GetIndexByCutName ( fVname.Data() );
index adb4668..e723288 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef __CINT__
+#endif
 Bool_t AddAMRsn(TString analysisSource = "proof", TString analysisMode = "test",TString input="aod",TString inputMC="", TString postfix = "",TString idStr="0")
 {
 
@@ -14,10 +16,11 @@ Bool_t AddAMRsn(TString analysisSource = "proof", TString analysisMode = "test",
    Int_t rsnParDev = AliAnalysisManager::GetGlobalInt("rsnUseRSNParDev",valid);
    if (eventMixinPar) rsnPar = 1;
    if (rsnPar&&rsnParDev>=0) rsnParDev=1;
-   
+
    Int_t pidResponse = AliAnalysisManager::GetGlobalInt("rsnUsePIDResponse",valid);
    Int_t useRsnIH = AliAnalysisManager::GetGlobalInt("rsnUseRsnInputHandler",valid);
    Int_t physSel = AliAnalysisManager::GetGlobalInt("rsnUsePhysSel",valid);
+   Int_t useCentralityTask = AliAnalysisManager::GetGlobalInt("rsnUseCentralityTask",valid);
    Int_t splitMgrByTask = AliAnalysisManager::GetGlobalInt("rsnSplitMgrByTasks",valid);
 
    Int_t useMixing = AliAnalysisManager::GetGlobalInt("rsnUseMixing",valid);
@@ -43,25 +46,30 @@ Bool_t AddAMRsn(TString analysisSource = "proof", TString analysisMode = "test",
       if (rsnPar) { AliAnalysisAlien::SetupPar(rsnLibName.Data()); myAdditionalLibs += Form(" %s.par",rsnLibName.Data()); }
       else { gSystem->Load(Form("lib%s.so",rsnLibName.Data())); myAdditionalLibs += Form(" lib%s.so",rsnLibName.Data()); }
    }
-   
 
-   
    if (rsnParDev>=0) {
-     if (rsnParDev) { AliAnalysisAlien::SetupPar("PWGLFresonancesdev"); myAdditionalLibs += " PWGLFresonancesdev.par"; }
-     else { gSystem->Load("libPWGLFresonancesdev.so"); myAdditionalLibs += " libPWGLFresonancesdev.so"; }
+      if (rsnParDev) { AliAnalysisAlien::SetupPar("PWGLFresonancesdev"); myAdditionalLibs += " PWGLFresonancesdev.par"; }
+      else { gSystem->Load("libPWGLFresonancesdev.so"); myAdditionalLibs += " libPWGLFresonancesdev.so"; }
    }
    analysisPlugin->SetAdditionalLibs(myAdditionalLibs.Data());
 
-   AliMultiInputEventHandler *multiInputHandler = mgr->GetInputEventHandler();
+   AliMultiInputEventHandler *multiInputHandler = 0;
+   AliInputEventHandler *inputHandler = mgr->GetInputEventHandler();
+   
+   TString className = inputHandler->ClassName();
+   if (!className.CompareTo("AliMultiInputEventHandler")) {
+      multiInputHandler = (AliMultiInputEventHandler*)inputHandler;
+   }
+
    AliRsnInputHandler *rsnIH=0;
 
-   if (pidResponse) {
+   if (multiInputHandler && pidResponse) {
       // add PID Response Handler
       if (!RsnLoadMacro("AddPIDResponseInputHandler.C")) return kFALSE;
       AddPIDResponseInputHandler(multiInputHandler,useMC);
    }
 
-   if (useRsnIH) {
+   if (multiInputHandler && useRsnIH) {
       // add Rsn input handler (it has to be after ESD,MC,Tender input handler, but before Mixing)
       AliRsnInputHandler *rsnIH = new AliRsnInputHandler();
       multiInputHandler->AddInputEventHandler(rsnIH);
@@ -72,15 +80,17 @@ Bool_t AddAMRsn(TString analysisSource = "proof", TString analysisMode = "test",
       AddTaskPhysicsSelection(useMC);
 
       // maybe we can put it in $ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C
-      AliMultiInputEventHandler *multiIH = dynamic_cast<AliMultiInputEventHandler *>(mgr->GetInputEventHandler());
-      if (multiIH) {
-         AliESDInputHandler *esdIH = dynamic_cast<AliESDInputHandler *>(multiIH->GetFirstInputEventHandler());
-         if (esdIH) esdIH->SetEventSelection(multiIH->GetEventSelection());
-         AliAODInputHandler *aodIH = dynamic_cast<AliAODInputHandler *>(multiIH->GetFirstInputEventHandler());
-         if (aodIH) aodIH->SetEventSelection(multiIH->GetEventSelection());
+      if (multiInputHandler) {
+         AliInputEventHandler *ih = multiInputHandler->GetFirstInputEventHandler();
+         ih->SetEventSelection(multiIH->GetEventSelection());
       }
    }
-   
+
+   if (useCentralityTask) {
+      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
+      AliCentralitySelectionTask *centralityTask = AddTaskCentrality(kFALSE);
+   }
+
    // load and run AddTask macro
    if (!RsnLoadMacro("AddRsnAnalysisTask.C")) return kFALSE;
    if (!RsnLoadMacro("RsnConfig.C")) return kFALSE;
index 4ca9fe8..f8169c2 100644 (file)
@@ -5,8 +5,8 @@
 void AddPIDResponseInputHandler(AliMultiInputEventHandler *multiInputHandler,Bool_t isMC=kFALSE)
 {
    if (multiInputHandler) {
-      AliPIDResponseInputHandler *pidResponseIH = new AliPIDResponseInputHandler();
-      pidResponseIH->SetIsMC(isMC);
-      multiInputHandler->AddInputEventHandler(pidResponseIH);
+        AliPIDResponseInputHandler *pidResponseIH = new AliPIDResponseInputHandler();
+        pidResponseIH->SetIsMC(isMC);
+        multiInputHandler->AddInputEventHandler(pidResponseIH);
    }
 }
index 9bb80d7..6f75c22 100644 (file)
@@ -56,11 +56,11 @@ Int_t AddRsnDaughterCutsPDG(AliPID::EParticleType type1,AliPID::EParticleType ty
       scheme += cutEta1->GetName();
    }
    if (useQuality) {
-      AliRsnCutKaonForPhi2010 *cutQuality1 = new AliRsnCutKaonForPhi2010("cutKaonPhi2010",nSigmaTPC,nSigmaTOF,ptTPCMax);
-      cutQuality1->SetMode(AliRsnCutKaonForPhi2010::kQuality);
-      cuts1->AddCut(cutQuality1);
+      AliRsnCutTrackQuality *qualityCut1 = new AliRsnCutTrackQuality("cutQuatityPDG1");
+      qualityCut1->SetDefaults2010();
+      cuts1->AddCut(qualityCut1);
       if (!scheme.IsNull()) scheme += "&";
-      scheme += cutQuality1->GetName();
+      scheme += qualityCut1->GetName();
    }
    cuts1->SetCutScheme(scheme.Data());
    sel->Add(cuts1, kTRUE);
@@ -75,11 +75,11 @@ Int_t AddRsnDaughterCutsPDG(AliPID::EParticleType type1,AliPID::EParticleType ty
       if (!scheme.IsNull()) scheme += "&";
       scheme += cut2->GetName();
       if (useQuality) {
-         AliRsnCutKaonForPhi2010 *cutQuality2 = new AliRsnCutKaonForPhi2010("cutKaonPhi2010",nSigmaTPC,nSigmaTOF,ptTPCMax);
-         cutQuality2->SetMode(AliRsnCutKaonForPhi2010::kQuality);
-         cuts2->AddCut(cutQuality2);
+         AliRsnCutTrackQuality *qualityCut2 = new AliRsnCutTrackQuality("cutQuatityPDG2");
+         qualityCut2->SetDefaults2010();
+         cuts2->AddCut(qualityCut2);
          if (!scheme.IsNull()) scheme += "&";
-         scheme += cutQuality2->GetName();
+         scheme += qualityCut2->GetName();
       }
       if (useEta) {
          AliRsnCutValue *cutEta2 = new AliRsnCutValue(Form("cut%sETA%s",AliPID::ParticleName(type2),opt.Data()),-etaRange,etaRange);
index b1d7b18..1ce2e33 100644 (file)
@@ -37,7 +37,7 @@ Int_t AddRsnDaughterCutsPhi2010(AliPID::EParticleType type1,AliPID::EParticleTyp
    Double_t nSigmaTPC=3.0;
    Double_t nSigmaTOF=3.0;
    Double_t ptTPCMax=0.6;
-   Double_t etaRange=0.8;
+   Double_t etaRange=0.5;
 //     etaRange=0.1;
 
    if (opt.Contains("trackPt")) {
@@ -50,6 +50,8 @@ Int_t AddRsnDaughterCutsPhi2010(AliPID::EParticleType type1,AliPID::EParticleTyp
    if (opt.Contains("TPCsigma1")) nSigmaTPC = 1.0;
    if (opt.Contains("TPCsigma2")) nSigmaTPC = 2.0;
    if (opt.Contains("TPCsigma3")) nSigmaTPC = 3.0;
+   if (opt.Contains("TPCsigma1.5")) nSigmaTPC = 1.5;
+   if (opt.Contains("TPCsigma2.5")) nSigmaTPC = 2.5;
 
    if (opt.Contains("TOFsigma1")) nSigmaTOF = 1.0;
    if (opt.Contains("TOFsigma2")) nSigmaTOF = 2.0;
index d164d10..4dc6cf4 100644 (file)
@@ -64,7 +64,7 @@ Bool_t RsnConfig(AliAnalysisTaskSE *task,Bool_t isMC,Bool_t isMixing,AliRsnInput
          numOfCuts = gROOT->ProcessLine(Form("AddRsnDaughterCuts%s(AliPID::kKaon,AliPID::kKaon,\"%s\",%d,(AliRsnInputHandler*)%p,(AliAnalysisTaskSE*)%p)",rsnCutName.Data(), rsnCutOpt.Data(),isRsnMini,rsnIH, task));
          if (numOfCuts) {
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s_K",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
-            AddRsnPairsPhi(task,isMC,isMixing,AliPID::kKaon,cutIndex,AliPID::kKaon,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
+            AddRsnPairsPhi(task,isMC,isMixing,AliPID::kKaon,cutIndex,AliPID::kKaon,cutIndex,commonEventCuts,commonPairCuts,Form("%s.%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             cutIndex+=numOfCuts;
          }
       } else if (!rsnName.CompareTo("kstar")) {
@@ -72,14 +72,14 @@ Bool_t RsnConfig(AliAnalysisTaskSE *task,Bool_t isMC,Bool_t isMixing,AliRsnInput
          if (numOfCuts) {
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s_K",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s_%s_pi",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
-            AddRsnPairsKStar(task,isMC,isMixing,AliPID::kKaon,cutIndex,AliPID::kPion,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s_%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
+            AddRsnPairsKStar(task,isMC,isMixing,AliPID::kKaon,cutIndex,AliPID::kPion,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s.%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             cutIndex+=numOfCuts;
          }
       } else if (!rsnName.CompareTo("rho")) {
          numOfCuts = gROOT->ProcessLine(Form("AddRsnDaughterCuts%s(AliPID::kPion,AliPID::kPion,\"%s\",%d,(AliRsnInputHandler*)%p,(AliAnalysisTaskSE*)%p)",rsnCutName.Data(), rsnCutOpt.Data(),isRsnMini,rsnIH,task));
          if (numOfCuts) {
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s_pi",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
-            AddRsnPairsRho(task,isMC,isMixing,AliPID::kPion,cutIndex,AliPID::kPion,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
+            AddRsnPairsRho(task,isMC,isMixing,AliPID::kPion,cutIndex,AliPID::kPion,cutIndex,commonEventCuts,commonPairCuts,Form("%s.%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             cutIndex+=numOfCuts;
          }
       } else if (!rsnName.CompareTo("lambda")) {
@@ -87,7 +87,7 @@ Bool_t RsnConfig(AliAnalysisTaskSE *task,Bool_t isMC,Bool_t isMixing,AliRsnInput
          if (numOfCuts) {
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex,commonEventCuts,commonPairCuts,Form("%s_%s_p",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             if (rsnNameOpt.Contains("mon")) AddParticleMonitor(task,isMC,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s_%s_K",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
-            AddRsnPairsLambda(task,isMC,isMixing,AliPID::kProton,cutIndex,AliPID::kKaon,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s_%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
+            AddRsnPairsLambda(task,isMC,isMixing,AliPID::kProton,cutIndex,AliPID::kKaon,cutIndex+1,commonEventCuts,commonPairCuts,Form("%s.%s",rsnNameOptFull.Data(),rsnCutNameOptFull.Data()));
             cutIndex+=numOfCuts;
          }
       } else {
@@ -147,10 +147,9 @@ Bool_t AddPair(AliAnalysisTaskSE *task, Bool_t isMC,Bool_t isMixing, AliPID::EPa
 
    Bool_t valid;
    Int_t useMCMomentum = AliAnalysisManager::GetGlobalInt("rsnUseMCMomentum",valid);
-
    Bool_t typeSame = (pType1 == pType2);
 
-   //    Printf("------------- id1=%d id2=%d",listID1,listID2);
+   Printf("------------- id1=%d id2=%d",pType1,pType2);
 
    TList *listLoops = new TList;
 
@@ -164,61 +163,61 @@ Bool_t AddPair(AliAnalysisTaskSE *task, Bool_t isMC,Bool_t isMixing, AliPID::EPa
    AliRsnLoopPair *lp = 0;
 
    // sets +-
-   lp = new AliRsnLoopPair(Form("%s_PM", name.Data()), pairDefPM, kFALSE);
+   lp = new AliRsnLoopPair(Form("%s.RecPM", name.Data()), pairDefPM, kFALSE);
    listLoops->Add(lp);
 
    if (!typeSame) {
-      lp = new AliRsnLoopPair(Form("%s_MP", name.Data()), pairDefMP, kFALSE);
+      lp = new AliRsnLoopPair(Form("%s.RecMP", name.Data()), pairDefMP, kFALSE);
       listLoops->Add(lp);
    }
 
    // sets +- TRUE pairs
    if (isMC) {
-      lp = new AliRsnLoopPair(Form("%s_PM_TRUE", name.Data()), pairDefPM, kFALSE);
+      lp = new AliRsnLoopPair(Form("%s.RecPM_RecMother", name.Data()), pairDefPM, kFALSE);
       lp->SetOnlyTrue(kTRUE);
       lp->SetCheckDecay(kTRUE);
       listLoops->Add(lp);
       if (!typeSame) {
-         lp = new AliRsnLoopPair(Form("%s_MP_TRUE", name.Data()), pairDefMP, kFALSE);
+         lp = new AliRsnLoopPair(Form("%s.RecMP_RecMother", name.Data()), pairDefMP, kFALSE);
          lp->SetOnlyTrue(kTRUE);
          lp->SetCheckDecay(kTRUE);
          listLoops->Add(lp);
       }
       // sets +- TRUE paris (MC is used for momentum)
-      lp = new AliRsnLoopPair(Form("%s_PM_TRUE_MC", name.Data()), pairDefPM, kFALSE);
+      lp = new AliRsnLoopPair(Form("%s.GenPM_RecMother", name.Data()), pairDefPM, kFALSE);
       lp->SetTrueMC(kTRUE);
       listLoops->Add(lp);
       if (!typeSame) {
          // sets +- TRUE paris (MC is used for momentum)
-         lp = new AliRsnLoopPair(Form("%s_MP_TRUE_MC", name.Data()), pairDefMP, kFALSE);
+         lp = new AliRsnLoopPair(Form("%s.GenMP_RecMother", name.Data()), pairDefMP, kFALSE);
          lp->SetTrueMC(kTRUE);
          listLoops->Add(lp);
       }
    }
 
    // sets ++
-   lp = new AliRsnLoopPair(Form("%s_PP", name.Data()), pairDefPP, kFALSE);
+   lp = new AliRsnLoopPair(Form("%s.RecPP", name.Data()), pairDefPP, kFALSE);
    listLoops->Add(lp);
 
    // sets --
-   lp = new AliRsnLoopPair(Form("%s_MM", name.Data()), pairDefMM, kFALSE);
+   lp = new AliRsnLoopPair(Form("%s.RecMM", name.Data()), pairDefMM, kFALSE);
    listLoops->Add(lp);
 
    if (isMixing) {
       // sets +- Mixing (NOT mini)
-      lp = new AliRsnLoopPair(Form("%s_PM", name.Data()), pairDefPM, kTRUE);
+      lp = new AliRsnLoopPair(Form("%s.RecPM_mix", name.Data()), pairDefPM, kTRUE);
       listLoops->Add(lp);
 
       // sets -+ Mixing (NOT mini)
-      lp = new AliRsnLoopPair(Form("%s_MP", name.Data()), pairDefMP, kTRUE);
+      lp = new AliRsnLoopPair(Form("%s.RecMP_mix", name.Data()), pairDefMP, kTRUE);
       listLoops->Add(lp);
 
       // sets ++ Mixing (NOT mini)
-      lp = new AliRsnLoopPair(Form("%s_PP", name.Data()), pairDefPP, kTRUE);
+      lp = new AliRsnLoopPair(Form("%s.RecPP_mix", name.Data()), pairDefPP, kTRUE);
       listLoops->Add(lp);
 
       // sets -- Mixing (NOT mini)
-      lp = new AliRsnLoopPair(Form("%s_MM", name.Data()), pairDefMM, kTRUE);
+      lp = new AliRsnLoopPair(Form("%s.RecMM_mix", name.Data()), pairDefMM, kTRUE);
       listLoops->Add(lp);
    }
 
@@ -233,6 +232,9 @@ Bool_t AddPair(AliAnalysisTaskSE *task, Bool_t isMC,Bool_t isMixing, AliPID::EPa
       if (commonEventCuts) lp->SetEventCuts(commonEventCuts);
       if (name.Contains("phi")) AddPairOutputPhi(lp);
       else if (name.Contains("kstar")) AddPairOutputKStar(lp);
+      else if (name.Contains("rho")) AddPairOutputRho(lp);
+      else if (name.Contains("lambda")) AddPairOutputLambda(lp);
+      else if (name.Contains("sigma")) AddPairOutputSigma(lp);
       else continue;
       ((AliRsnAnalysisTask *)task)->AddLoop(lp);
    }
@@ -445,7 +447,7 @@ void AddMonitorOutput(TObjArray *mon=0,TString opt="",AliRsnLoopDaughter *lm=0)
    if (mon) mon->Add(outMonitorPTvsMult);
    if (lm) lm->AddOutput(outMonitorPTvsMult);
 
-   
+
 //    if (lm) lm->SetTrueMC(kTRUE);
 }
 
index 0656995..ba3b638 100644 (file)
@@ -1,18 +1,23 @@
 TList *RsnManager() {
 
-   Int_t isPP           = 1; // in GRID case it will be overwriten (look bellow)
-   Int_t useRsnMini     = 1;
+   Int_t isESD             = 0;
+   
+   Int_t isPP              = 1;
+   Int_t useRsnMini        = 1;
 
-   Int_t useMixing      = 0;
-   Int_t numMix         = 10;
+   Int_t useMixing         = 0;
+   Int_t numMix            = 10;
 
-   Int_t fullOutput     = 1;
-   Int_t mcMomentum     = 0;
-   Int_t mcMon          = 0;
+   Int_t fullOutput        = 1;
+   Int_t mcMomentum        = 0;
+   Int_t mcMon             = 0;
+   
+   Int_t usePhysSel        = 0;
+   Int_t useCentralityTask = 0;
 
-   Int_t useEventMixPar = 0;
-   Int_t useRsnPar      = 0;
-   Int_t useRsnParDev   = -1;
+   Int_t useEventMixPar    = 0;
+   Int_t useRsnPar         = 0;
+   Int_t useRsnParDev      = -1;
 
    TString rootver = "v5-32-01";
    TString alirootver = "";
@@ -33,42 +38,15 @@ TList *RsnManager() {
    //    listRsn->Add(new TNamed("<Name>:mon","<CutName>:<opt>"));
 
    TString commonCutOption="";
-   commonCutOption="mon_eta";
-
-   // PHI
-   listRsn->Add(new TNamed("Phi","Phi2010"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma1"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma2"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma3"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:pdg"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:usePP_pdg"));
-
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma1_pdg"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma2_pdg"));
-//    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma3_pdg"));
-
-//    listRsn->Add(new TNamed("Phi","BPID"));
-//
-
-   // RHO
-//    listRsn->Add(new TNamed("Rho","Rho"));
-//    listRsn->Add(new TNamed("Rho","Rho:tpconly_TPCsigma1"));
-
+   commonCutOption = "mon";
+//    commonCutOption += "_eta";
 
-   // KStar
-//
-//    listRsn->Add(new TNamed("KStar","KStar2010:mon"));
-//    listRsn->Add(new TNamed("KStar","BPID:mon"));
-//    listRsn->Add(new TNamed("KStar","KStar:mon"));
-//    listRsn->Add(new TNamed("KStar","KStar:TPCTOFpidDefaultKstarPP2010_mon"));
-//    listRsn->Add(new TNamed("KStar","KStar:FastTPCpid1point5sigma_mon"));
-//    listRsn->Add(new TNamed("KStar","KStar:FastTPCpid2sigma_mon"));
+   AddResonanceToRsnManager(listRsn,"AddRsnToManagerPhi.C",legoTrainPath.Data());
+//    AddResonanceToRsnManager(listRsn,"AddRsnToManagerKStar.C",legoTrainPath.Data());
+//    AddResonanceToRsnManager(listRsn,"AddRsnToManagerRho.C",legoTrainPath.Data());
+//    AddResonanceToRsnManager(listRsn,"AddRsnToManagerLambda.C",legoTrainPath.Data());
 
 
-   // Lambda
-//    listRsn->Add(new TNamed("Lambda","Lambda"));
-//    listRsn->Add(new TNamed("Lambda","Lambda:TPCPsigma2_TPCKsigma1"));
-
    
    //============= ONLY for GRID ====================
    TString dsConfig;
@@ -99,7 +77,7 @@ TList *RsnManager() {
    ///////////////////////////////////////////
    // don't edit next lines (EXPERTS ONLY)
    ///////////////////////////////////////////
-
+   
    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
    if (!mgr) {
       Printf("Error[RsnManager] mgr is null !!!");
@@ -115,21 +93,21 @@ TList *RsnManager() {
    AliAnalysisManager::SetGlobalInt("rsnUseRSNPar",useRsnPar);
    AliAnalysisManager::SetGlobalInt("rsnUseRSNParDev",useRsnParDev);
    // common options
-   AliAnalysisManager::SetGlobalInt("rsnUsePhysSel",0);
+   AliAnalysisManager::SetGlobalInt("rsnUsePhysSel",usePhysSel);
+   AliAnalysisManager::SetGlobalInt("rsnUseCentralityTask",useCentralityTask);
    AliAnalysisManager::SetGlobalInt("rsnUsePIDResponse",1);
    // rsn options
 
+   AliAnalysisManager::SetGlobalInt("rsnUseMixing",useMixing);
    if (useRsnMini) {
       AliAnalysisManager::SetGlobalInt("rsnUseMiniPackage",1);
       AliAnalysisManager::SetGlobalInt("rsnUseRsnInputHandler",0);
       AliAnalysisManager::SetGlobalInt("rsnSplitMgrByTasks",1);
-      AliAnalysisManager::SetGlobalInt("rsnUseMixing",useMixing);
-
    } else  {
       AliAnalysisManager::SetGlobalInt("rsnUseMiniPackage",0);
       AliAnalysisManager::SetGlobalInt("rsnUseRsnInputHandler",1);
       AliAnalysisManager::SetGlobalInt("rsnSplitMgrByTasks",0);
-      AliAnalysisManager::SetGlobalInt("rsnUseMixing",0);
+//       AliAnalysisManager::SetGlobalInt("rsnUseMixing",0);
    }
 
    // mixing setting
@@ -152,6 +130,43 @@ TList *RsnManager() {
    AliAnalysisManager::SetGlobalStr("rsnLegoTrainAliROOTversion",alirootver.Data());
 
    AliAnalysisManager::SetGlobalStr("rsnLegoTrainCommonCutOption",commonCutOption.Data());
-
+   
    return listRsn;
 }
+
+Bool_t AddResonanceToRsnManager(TList *listRsn,TString rsnAddMacro="AddRsnToManagerPhi.C",TString path="") {
+   if (!listRsn) return kFALSE;
+   
+   RsnManagerLoadMacro(rsnAddMacro,path);
+   rsnAddMacro.ReplaceAll(".C","");
+   gROOT->ProcessLine(TString::Format("%s((TList*)%p)",rsnAddMacro.Data(),listRsn).Data());
+
+   return kTRUE;
+}
+
+Bool_t RsnManagerLoadMacro(TString macro,TString path="") {
+
+   TString lego_path=path;
+
+   if (lego_path.IsNull()) {
+      Bool_t valid;
+      lego_path = AliAnalysisManager::GetGlobalStr("rsnLegoTrainPath",valid);
+      if (!valid) lego_path = "$ALICE_ROOT/PWG2/RESONANCES/macros/lego_train";
+   }
+   if (!gSystem->AccessPathName(macro.Data())) {
+      gROOT->LoadMacro(macro.Data());
+      Printf("Macro loaded from %s/%s ...",gSystem->pwd(),macro.Data());
+      return kTRUE;
+   }
+
+   if (!gSystem->AccessPathName(gSystem->ExpandPathName(Form("%s/%s",lego_path.Data(),macro.Data())))) {
+      gROOT->LoadMacro(gSystem->ExpandPathName(Form("%s/%s",lego_path.Data(),macro.Data())));
+      Printf("Macro loaded from %s ...",gSystem->ExpandPathName(Form("%s/%s",lego_path.Data(),macro.Data())));
+      return kTRUE;
+   }
+
+   Printf("Error loading %s",macro.Data());
+
+   return kFALSE;
+}
+