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 ©);
AliRsnAction &operator=(const AliRsnAction ©);
virtual ~AliRsnAction();
-
+
virtual Bool_t InitAction(TList *outList=0,TObjArray *objects=0);
virtual Bool_t ExecAction(TObjArray *objects=0);
protected:
-
+
ClassDef(AliRsnAction, 1)
};
}
//______________________________________________________________________________
-Bool_t AliRsnCut::IsSelected(TObject* /*object*/)
+Bool_t AliRsnCut::IsSelected(TObject * /*object*/)
{
//
// Virtual cut-checking method.
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
//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
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;
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
};
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)
{
//
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)
{
//
if (this == ©)
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);
}
// 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);
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)");
#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 ©);
AliRsnCutV0 &operator=(const AliRsnCutV0 ©);
virtual ~AliRsnCutV0() { }
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;
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
switch (fHypothesis) {
case kLambda0:
+ fMass = 1.11568;
case kLambda0Bar:
fMass = 1.11568;
break;
//
if (!ev) return;
-
+
TObjArray objects;
objects.Add(ev);
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:
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)
//
// Works in the same way as the copy constructor.
//
+
TObject::operator=(event);
if (this == &event)
return *this;
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;
+ }
+ }
}
//_____________________________________________________________________________
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));
}
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));
}
#include "AliRsnListOutput.h"
-
ClassImp(AliRsnListOutput)
//________________________________________________________________________________________
// 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);
AliError(Form("Slot %d in value list is NULL", i));
return kFALSE;
}
- name += '_';
- name += val->GetName();
+ if (!isPair) {
+ name += '_';
+ name += val->GetName();
+ }
}
// allowed objects
// 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:
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());
}
}
//_____________________________________________________________________________
-void AliRsnLoopDaughter::Print(Option_t* /*option*/) const
+void AliRsnLoopDaughter::Print(Option_t * /*option*/) const
{
//
// Prints info about pair
}
//_____________________________________________________________________________
-void AliRsnLoopEvent::Print(Option_t* /*option*/) const
+void AliRsnLoopEvent::Print(Option_t * /*option*/) const
{
//
// Prints info about pair
}
//_____________________________________________________________________________
-void AliRsnLoopPair::Print(Option_t* /*option*/) const
+void AliRsnLoopPair::Print(Option_t * /*option*/) const
{
//
// Prints info about pair
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);
}
//
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();
//---------------------------------------------------------------------
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;
}
//___________________________________________________________________
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;
}
virtual Bool_t Eval(TObject *object);
void ApplyCentralityPatchAOD049(TObject *object);
-
+
protected:
EType fType; // type from enumeration
ClassImp(AliRsnVariableExpression)
//______________________________________________________________________________
-Bool_t AliRsnVariableExpression::Value(TObjArray& /*pgm*/)
+Bool_t AliRsnVariableExpression::Value(TObjArray & /*pgm*/)
{
// Int_t indexx = fgCutSet->GetIndexByCutName ( fVname.Data() );
+#ifndef __CINT__
+#endif
Bool_t AddAMRsn(TString analysisSource = "proof", TString analysisMode = "test",TString input="aod",TString inputMC="", TString postfix = "",TString idStr="0")
{
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);
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);
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;
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);
}
}
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);
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);
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")) {
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;
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")) {
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")) {
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 {
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;
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);
}
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);
}
if (mon) mon->Add(outMonitorPTvsMult);
if (lm) lm->AddOutput(outMonitorPTvsMult);
-
+
// if (lm) lm->SetTrueMC(kTRUE);
}
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 = "";
// 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;
///////////////////////////////////////////
// don't edit next lines (EXPERTS ONLY)
///////////////////////////////////////////
-
+
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Printf("Error[RsnManager] mgr is null !!!");
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
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;
+}
+