--- /dev/null
+AliAnalysisTaskLukeAOD * AddTaskLukeAOD(const char * outfilename, bool isMonteCarlo, double cutCosPa, double cutcTauMin, double cutNcTauMax, double cutBetheBloch, double cutMinNClustersTPC, double cutRatio, double cutEta, double cutRapidity, double cutArmenteros) {
+
+
+ AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+ if (!mgr) {
+ ::Error("AddTaskPhysicsSelection", "No analysis manager to connect to.");
+ return NULL;
+ }
+
+ // Check the analysis type using the event handlers connected to the analysis manager.
+ //==============================================================================
+ if (!mgr->GetInputEventHandler()) {
+ ::Error("AddTaskPhysicsSelection", "This task requires an input event handler");
+ return NULL;
+ }
+
+ TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
+
+ if (inputDataType != "AOD") {
+ Printf("ERROR! This task can only run on AODs!");
+ }
+
+ // Configure analysis
+ //===========================================================================
+ // Int_t nbMinTPCclusters = 80;
+ // Int_t lCollidingSystems = 1;
+ // TString fAnalysisType = "ESD";
+ // TString lAnalysisPidMode = "withPID";
+ // TString lAnalysisCut = "no";
+ //Int_t iMCAnalysis = 0;
+
+ char taskName[15];
+ sprintf(taskName,"example_task");
+
+ AliAnalysisTaskLukeAOD * task = new AliAnalysisTaskLukeAOD(taskName);
+ task->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented
+
+ task->SetIsMonteCarlo (isMonteCarlo);
+ task->SetCutCosPa (cutCosPa);
+ task->SetCutcTauMin (cutcTauMin);
+ task->SetCutNcTauMax (cutNcTauMax);
+ task->SetCutBetheBloch (cutBetheBloch);
+ task->SetCutMinNClustersTPC (cutMinNClustersTPC);
+ task->SetCutRatio (cutRatio) ;
+ task->SetCutEta (cutEta);
+ task->SetCutRapidity (cutRapidity);
+ task->SetCutArmenteros (cutArmenteros);
+
+
+ //task->SetOption("sample");
+
+ mgr->AddTask(task);
+ AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
+
+ AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(outfilename, TList::Class(),AliAnalysisManager::kOutputContainer, Form("%s:lambdak0Luke", AliAnalysisManager::GetCommonFileName()));
+
+ mgr->ConnectInput (task, 0, cinput0);
+ mgr->ConnectOutput(task,1,coutput1);
+
+ return task;
+}
+
+
//________________________________________________________________________
AliAnalysisTaskLukeAOD::AliAnalysisTaskLukeAOD() // All data members should be initialised here
-:AliAnalysisTaskSE(),
+:AliAnalysisTaskSE(),fIsMonteCarlo(false), fcutCosPa(0.998),fcutcTauMin(-999), fcutNcTauMax(3.0), fcutBetheBloch(3.0), fcutMinNClustersTPC(70), fcutRatio(0.8), fcutEta(0.8), fcutRapidity(0.5), fcutArmenteros(0.2),
fOutput(0),
fPIDResponse(0),
//________________________________________________________________________
AliAnalysisTaskLukeAOD::AliAnalysisTaskLukeAOD(const char *name) // All data members should be initialised here
-:AliAnalysisTaskSE(name),
+:AliAnalysisTaskSE(name), fIsMonteCarlo(false), fcutCosPa(0.998),fcutcTauMin(-999), fcutNcTauMax(3.0), fcutBetheBloch(3.0), fcutMinNClustersTPC(70), fcutRatio(0.8), fcutEta(0.8), fcutRapidity(0.5), fcutArmenteros(0.2),
fOutput(0),
fPIDResponse(0),
//________________________________________________________________________
-static Bool_t AcceptTrack(const AliAODTrack *t, double cutMinNClustersTPC, double cutRatio)
+static Bool_t AcceptTrack(const AliAODTrack *t, double fcutMinNClustersTPC, double fcutRatio)
{
if (!t->IsOn(AliAODTrack::kTPCrefit)) return kFALSE;
//if (t->GetKinkIndex(0)>0) return kFALSE;
Float_t nCrossedRowsTPC = t->GetTPCClusterInfo(2,1);
- if (nCrossedRowsTPC < cutMinNClustersTPC) return kFALSE;
+ if (nCrossedRowsTPC < fcutMinNClustersTPC && fcutMinNClustersTPC != -999) return kFALSE;
Int_t findable=t->GetTPCNclsF();
if (findable <= 0) return kFALSE;
- if (nCrossedRowsTPC/findable < cutRatio) return kFALSE;
+ if (nCrossedRowsTPC/findable < fcutRatio && fcutRatio != -999) return kFALSE;
return kTRUE;
}
//________________________________________________________________________
-static Bool_t AcceptV0_general(const AliAODv0 *v1, const AliAODEvent *aod, double cutCosPa, double cutNImpact, double cutDCA, double cutEta, double cutMinNClustersTPC, double cutRatio)
+static Bool_t AcceptV0_general(const AliAODv0 *v1, const AliAODEvent *aod, double fcutCosPa, double fcutNImpact, double fcutDCA, double fcutEta, double fcutMinNClustersTPC, double fcutRatio)
{
if (v1->GetOnFlyStatus()) return kFALSE;
if(ntracktest->Charge() > 0){nnum = 0; pnum = 1;}
const AliAODTrack *ntrack1=(AliAODTrack *)v1->GetDaughter(nnum);
- if (!AcceptTrack(ntrack1, cutMinNClustersTPC, cutRatio)) return kFALSE;
+ if (!AcceptTrack(ntrack1, fcutMinNClustersTPC, fcutRatio)) return kFALSE;
const AliAODTrack *ptrack1=(AliAODTrack *)v1->GetDaughter(pnum);
- if (!AcceptTrack(ptrack1, cutMinNClustersTPC, cutRatio)) return kFALSE;
+ if (!AcceptTrack(ptrack1, fcutMinNClustersTPC, fcutRatio)) return kFALSE;
Float_t impact=v1->DcaNegToPrimVertex();
if (TMath::Abs(impact)<0.1) return kFALSE;
- if (TMath::Abs(impact)<cutNImpact && cutNImpact != -999) return kFALSE;
+ if (TMath::Abs(impact)<fcutNImpact && fcutNImpact != -999) return kFALSE;
impact=v1->DcaPosToPrimVertex();
if (TMath::Abs(impact)<0.1) return kFALSE;
- if (TMath::Abs(impact)<cutNImpact && cutNImpact != -999) return kFALSE;
+ if (TMath::Abs(impact)<fcutNImpact && fcutNImpact != -999) return kFALSE;
Double_t dca=v1->DcaV0Daughters();
- if (TMath::Abs(dca)>cutDCA && cutDCA != -999) return kFALSE;
+ if (TMath::Abs(dca)>fcutDCA && fcutDCA != -999) return kFALSE;
Double_t cpa=v1->CosPointingAngle(aod->GetPrimaryVertex());
- if (cpa<cutCosPa && cutCosPa != -999) return kFALSE;
+ if (cpa<fcutCosPa && fcutCosPa != -999) return kFALSE;
Double_t etaN = v1->PseudoRapNeg();
Double_t etaP = v1->PseudoRapPos();
- if ((TMath::Abs(etaN)>cutEta || TMath::Abs(etaP)>cutEta) && cutEta != -999) return kFALSE;
+ if ((TMath::Abs(etaN)>fcutEta || TMath::Abs(etaP)>fcutEta) && fcutEta != -999) return kFALSE;
return kTRUE;
}
//________________________________________________________________________
-static Bool_t AcceptV0_particle(const AliAODv0 *v1, int type, double cutcTau, double cutRapidity, Double_t decayL)
+static Bool_t AcceptV0_particle(const AliAODv0 *v1, int type, double fcutcTauMin, double fcutRapidity, Double_t decayL)
{
Double_t cTau = 0;
if(type == 0)
{cTau = decayL*(v1->MassK0Short())/(v1->P());}
- if (cTau < cutcTau && cTau != -999 ) return kFALSE;
+ if (cTau < fcutcTauMin && cTau != -999 ) return kFALSE;
Double_t rap = 0;
if(type == 1 || type == 2)
{rap = v1->RapLambda();}
if(type == 0)
{rap = v1->RapK0Short();}
- if (TMath::Abs(rap)>cutRapidity && cutRapidity != -999) return kFALSE;
+ if (TMath::Abs(rap)>fcutRapidity && fcutRapidity != -999) return kFALSE;
return kTRUE;
}
//________________________________________________________________________
-static Bool_t AcceptV0_lowpt(const AliAODv0 *v1, AliPIDResponse *PIDResponse,int type, double cutBetheBloch, Double_t decayL, bool isMonteCarlo)
+static Bool_t AcceptV0_lowpt(const AliAODv0 *v1, AliPIDResponse *PIDResponse,int type, double fcutBetheBloch, Double_t decayL, bool fIsMonteCarlo, double fcutNcTauMax)
{
if(type == 0)
{cTau = decayL*(v1->MassK0Short())/(v1->P());}
- if (cTau > (3*7.89) && (type ==1 || type ==2)) return kFALSE;
- if (cTau > (3*2.68) && (type ==0)) return kFALSE;
+ if (cTau > (fcutNcTauMax*7.89) && fcutNcTauMax != -999 && (type ==1 || type ==2)) return kFALSE;
+ if (cTau > (fcutNcTauMax*2.68) && fcutNcTauMax != -999 && (type ==0)) return kFALSE;
int nnum = 1, pnum = 0;
const AliAODTrack *ntracktest=(AliAODTrack *)v1->GetDaughter(nnum);
if(type == 1)
{
nsig_p=PIDResponse->NumberOfSigmasTPC(ptrack1,AliPID::kProton);
- if (TMath::Abs(nsig_p) > cutBetheBloch && cutBetheBloch >0 && !isMonteCarlo && ptrack1->P() <= 1) return kFALSE;
+ if (TMath::Abs(nsig_p) > fcutBetheBloch && fcutBetheBloch >0 && !fIsMonteCarlo && ptrack1->P() <= 1) return kFALSE;
}
if(type == 2)
{
nsig_p=PIDResponse->NumberOfSigmasTPC(ptrack1,AliPID::kProton);
- if (TMath::Abs(nsig_p) <= cutBetheBloch && cutBetheBloch >0 && !isMonteCarlo && ptrack1->P() <= 1) return kFALSE;
+ if (TMath::Abs(nsig_p) <= fcutBetheBloch && fcutBetheBloch >0 && !fIsMonteCarlo && ptrack1->P() <= 1) return kFALSE;
}
}
if(type == 2)
{
nsig_n=PIDResponse->NumberOfSigmasTPC(ntrack1,AliPID::kProton);
- if (TMath::Abs(nsig_n) > cutBetheBloch && cutBetheBloch >0 && !isMonteCarlo && ntrack1->P() <= 1) return kFALSE;
+ if (TMath::Abs(nsig_n) > fcutBetheBloch && fcutBetheBloch >0 && !fIsMonteCarlo && ntrack1->P() <= 1) return kFALSE;
}
if(type == 1)
{
nsig_n=PIDResponse->NumberOfSigmasTPC(ntrack1,AliPID::kProton);
- if (TMath::Abs(nsig_n) <= cutBetheBloch && cutBetheBloch >0 && !isMonteCarlo && ntrack1->P() <= 1) return kFALSE;
+ if (TMath::Abs(nsig_n) <= fcutBetheBloch && fcutBetheBloch >0 && !fIsMonteCarlo && ntrack1->P() <= 1) return kFALSE;
}
fHistLog->Fill(1);
- // parameters used for most cuts, to minimise editing
- double cutCosPa(0.998), cutcTau(-999);
- double cutNImpact(-999), cutDCA(-999);
- double cutBetheBloch(3); // NOTE - BB cut only applies to data, must be accounted for when constructing corrected yields
- double cutMinNClustersTPC(70), cutRatio(0.8);
- bool isMonteCarlo(false);
+ // parameters used for most fcuts, to minimise editing
+ //double fcutCosPa(0.998), fcutcTauMin(-999), fcutNcTauMax(3.0);
+ double fcutNImpact(-999), fcutDCA(-999);
+ //double fcutBetheBloch(3.0); // NOTE - BB fcut only applies to data, must be accounted for when constructing corrected yields
+ //double fcutMinNClustersTPC(70), fcutRatio(0.8);
+ //bool fIsMonteCarlo(false);
int isMCtype(0); //1 = Pure Hijing only, 0 = Anything, -1 = Injected only
- double cutEta(0.8), cutRapidity(0.5), cutArmenteros(0.2);
+ //double fcutEta(0.8), fcutRapidity(0.5), fcutArmenteros(0.2);
// Create pointer to reconstructed event
AliAODEvent *aod=(AliAODEvent *)InputEvent();
int isInjected = -1;
- if(isMonteCarlo)
+ if(fIsMonteCarlo)
{
// Create pointer to reconstructed event
isprimaryMC = true;
if(lambdaMC)
{
- if(TMath::Abs(mcPart->Y())<=cutRapidity)
+ if(TMath::Abs(mcPart->Y())<=fcutRapidity)
{
fHistMcPMLaPt->Fill(mcPart->Pt(),mcPart->M());
}
if(antilambdaMC)
{
- if(TMath::Abs(mcPart->Y())<=cutRapidity)
+ if(TMath::Abs(mcPart->Y())<=fcutRapidity)
{
fHistMcPMLbPt->Fill(mcPart->Pt(),mcPart->M());
}
if(kshortMC)
{
- if(TMath::Abs(mcPart->Y())<=cutRapidity)
+ if(TMath::Abs(mcPart->Y())<=fcutRapidity)
{
fHistMcPMK0Pt->Fill(mcPart->Pt(),mcPart->M());
Double_t dca=v0->DcaV0Daughters();
Double_t eta=v0->PseudoRapV0();
- if(!AcceptV0_general(v0,aod,cutCosPa,cutNImpact,cutDCA,cutEta,cutMinNClustersTPC, cutRatio))
+ if(!AcceptV0_general(v0,aod,fcutCosPa,fcutNImpact,fcutDCA,fcutEta,fcutMinNClustersTPC, fcutRatio))
{
fHistLog->Fill(86);
continue;
}*/
- if(!AcceptV0_particle(v0,1,cutcTau, cutRapidity, decayL))
+ if(!AcceptV0_particle(v0,1,fcutcTauMin, fcutRapidity, decayL))
{ lambdaCandidate = kFALSE; }
- if(!AcceptV0_particle(v0,2,cutcTau, cutRapidity, decayL))
+ if(!AcceptV0_particle(v0,2,fcutcTauMin, fcutRapidity, decayL))
{ antilambdaCandidate = kFALSE; }
- if(!AcceptV0_particle(v0,0,cutcTau, cutRapidity, decayL))
+ if(!AcceptV0_particle(v0,0,fcutcTauMin, fcutRapidity, decayL))
{ k0Candidate = kFALSE; }
if(TMath::Sqrt(v0->Pt2V0())<2)
{
- if(!AcceptV0_lowpt(v0,fPIDResponse,1,cutBetheBloch,decayL,isMonteCarlo))
+ if(!AcceptV0_lowpt(v0,fPIDResponse,1,fcutBetheBloch,decayL,fIsMonteCarlo,fcutNcTauMax))
{ lambdaCandidate = kFALSE; }
- if(!AcceptV0_lowpt(v0,fPIDResponse,2,cutBetheBloch,decayL,isMonteCarlo))
+ if(!AcceptV0_lowpt(v0,fPIDResponse,2,fcutBetheBloch,decayL,fIsMonteCarlo,fcutNcTauMax))
{ antilambdaCandidate = kFALSE; }
- if(!AcceptV0_lowpt(v0,fPIDResponse,0,cutBetheBloch,decayL,isMonteCarlo))
+ if(!AcceptV0_lowpt(v0,fPIDResponse,0,fcutBetheBloch,decayL,fIsMonteCarlo,fcutNcTauMax))
{ k0Candidate = kFALSE; }
}
bool feeddown = false;
- if(isMonteCarlo)
+ if(fIsMonteCarlo)
{
bool passedTests = false;
TList *list = aod->GetList();
if(k0Candidate && centPercentile >= 0.0001 && centPercentile <= 90.0 &&!feeddown )
{ fHistArmPodK0->Fill(ArmenterosAlpha,ArmenterosPt); }
- if( ArmenterosPt < TMath::Abs(cutArmenteros*ArmenterosAlpha) && cutArmenteros !=-999 )
+ if( ArmenterosPt <= TMath::Abs(fcutArmenteros*ArmenterosAlpha) && fcutArmenteros !=-999 )
{k0Candidate = false;}
if(lambdaCandidate)
fHistRapLaPt->Fill(v0->RapLambda(),v0->MassLambda());
- if(isMonteCarlo)
+ if(fIsMonteCarlo)
{
fHistMcCosPaFoundLaPt->Fill(1.0,v0->MassLambda());
fHistMccTauFoundLaPt->Fill(1.0,v0->MassLambda());
fHistEtaLbPt->Fill(eta,v0->MassAntiLambda());
fHistRapLbPt->Fill(v0->RapLambda(),v0->MassAntiLambda());
- if(isMonteCarlo)
+ if(fIsMonteCarlo)
{
fHistMcCosPaFoundLbPt->Fill(1.0,v0->MassAntiLambda());
fHistMccTauFoundLbPt->Fill(1.0,v0->MassAntiLambda());
fHistEtaK0Pt->Fill(eta,v0->MassK0Short());
fHistRapK0Pt->Fill(v0->RapK0Short(),v0->MassK0Short());
- if(isMonteCarlo)
+ if(fIsMonteCarlo)
{
fHistMcCosPaAFoundK0Pt->Fill(1.0,v0->MassK0Short());
fHistMccTauAFoundK0Pt->Fill(1.0,v0->MassK0Short());
virtual void UserCreateOutputObjects();
virtual void UserExec(Option_t *option);
virtual void Terminate(Option_t *);
-
+
+ void SetIsMonteCarlo (bool isMonteCarlo = false) {fIsMonteCarlo = isMonteCarlo;}
+ void SetCutCosPa (double cutCosPa = 0.998) {fcutCosPa = cutCosPa;}
+ void SetCutcTauMin (double cutcTauMin = -999) {fcutcTauMin = cutcTauMin;}
+ void SetCutNcTauMax (double cutNcTauMax = 3.0) {fcutNcTauMax = cutNcTauMax;}
+ void SetCutBetheBloch (double cutBetheBloch = 3.0) {fcutBetheBloch = cutBetheBloch;}
+ void SetCutMinNClustersTPC (double cutMinNClustersTPC = 70) {fcutMinNClustersTPC = cutMinNClustersTPC;}
+ void SetCutRatio (double cutRatio = 0.8) {fcutRatio = cutRatio;}
+ void SetCutEta (double cutEta = 0.8) {fcutEta = cutEta;}
+ void SetCutRapidity (double cutRapidity = 0.5) {fcutRapidity = cutRapidity;}
+ void SetCutArmenteros (double cutArmenteros = 0.2) {fcutArmenteros = cutArmenteros;}
+
private:
+ bool fIsMonteCarlo;
+
+ double fcutCosPa;
+ double fcutcTauMin;
+ double fcutNcTauMax;
+ double fcutBetheBloch;
+ double fcutMinNClustersTPC;
+ double fcutRatio;
+ double fcutEta;
+ double fcutRapidity;
+ double fcutArmenteros;
+
TList *fOutput; // Output list
AliPIDResponse *fPIDResponse; // PID
UInt_t maskIsSelected; // Physics Selection
//______________________________________________________________________________
void runLukeAOD(
- const char* runtype = "proof", // local, proof or grid
- const char *gridmode = "full", // Set the run mode (can be "full", "test", "offline", "submit" or "terminate"). Full & Test work for proof
- const bool bMCtruth = 0, // 1 = MCEvent handler is on (MC truth), 0 = MCEvent handler is off (MC reconstructed/real data)
- const bool bMCphyssel = 0, // 1 = looking at MC truth or reconstructed, 0 = looking at real data
- const Long64_t nentries = 1234567890, // for local and proof mode, ignored in grid mode. Set to 1234567890 for all events.
- const Long64_t firstentry = 0, // for local and proof mode, ignored in grid mode
- const char *proofdataset = "/alice/data/LHC10h_000138534_p2_AOD049", //"/alice/sim/LHC11a10a_000138795_AOD048", //"/alice/data/LHC10h_000139507_p2_AOD049", //"/alice/data/LHC10e_000130375_p2", //"/alice/data/LHC10c_000120821_p1", // path to dataset on proof cluster, for proof analysis
- const char *proofcluster = "hanratty@alice-caf.cern.ch", //"alice-caf.cern.ch", //"hanratty@skaf.saske.sk", //"alice-caf.cern.ch", // which proof cluster to use in proof mode
- const char *taskname = "example_task" // sets name of grid generated macros
- )
+ const char* runtype = "proof", // local, proof or grid
+ const char *gridmode = "full", // Set the run mode (can be "full", "test", "offline", "submit" or "terminate"). Full & Test work for proof
+ const bool bMCtruth = 0, // 1 = MCEvent handler is on (MC truth), 0 = MCEvent handler is off (MC reconstructed/real data)
+ const bool bMCphyssel = 0, // 1 = looking at MC truth or reconstructed, 0 = looking at real data
+ const Long64_t nentries = 10000, // for local and proof mode, ignored in grid mode. Set to 1234567890 for all events.
+ const Long64_t firstentry = 0, // for local and proof mode, ignored in grid mode
+ const char *proofdataset/*CAF*/ = "/alice/data/LHC10h_000139037_p2_AOD073", //"/alice/sim/LHC11a10a_000138795_AOD048", //"/alice/data/LHC10h_000139507_p2_AOD049", //"/alice/data/LHC10e_000130375_p2", //"/alice/data/LHC10c_000120821_p1", // path to dataset on proof cluster, for proof analysis
+ //const char *proofdataset/*SKAF*/ = "/alice/data/LHC10h_000139510_AOD086_p2", //"/alice/sim/LHC11a10a_000138795_AOD048", //"/alice/data/LHC10h_000139507_p2_AOD049", //"/alice/data/LHC10e_000130375_p2", //"/alice/data/LHC10c_000120821_p1", // path to dataset on proof cluster, for proof analysis
+ const char *proofcluster/*CAF*/ = "hanratty@alice-caf.cern.ch", //"alice-caf.cern.ch", //"hanratty@skaf.saske.sk", //"alice-caf.cern.ch", // which proof cluster to use in proof mode
+ //const char *proofcluster/*SKAF*/ = "hanratty@skaf.saske.sk", //"alice-caf.cern.ch", //"hanratty@skaf.saske.sk", //"alice-caf.cern.ch", // which proof cluster to use in proof mode
+ const char *taskname = "example_task" // sets name of grid generated macros
+ )
{
// check run type
if(runtype != "local" && runtype != "proof" && runtype != "grid"){
return;
}
Printf("%s analysis chosen",runtype);
-
+
// load libraries
gSystem->Load("libCore.so");
gSystem->Load("libGeom.so");
gSystem->Load("libAOD.so");
gSystem->Load("libANALYSIS.so");
gSystem->Load("libANALYSISalice.so");
-
+
// add aliroot indlude path
gROOT->ProcessLine(Form(".include %s/include",gSystem->ExpandPathName("$ALICE_ROOT")));
gROOT->SetStyle("Plain");
-
+
// analysis manager
AliAnalysisManager* mgr = new AliAnalysisManager(taskname);
AliVEventHandler* aodH = new AliAODInputHandler();
mgr->SetInputEventHandler(aodH);
-
- // mc event handler
- /* if(bMCtruth) {
- AliMCEventHandler* mchandler = new AliMCEventHandler();
- // Not reading track references
- mchandler->SetReadTR(kFALSE);
- mgr->SetMCtruthEventHandler(mchandler);
- } */
-
- //gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
- //AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(bMCphyssel);
- //if(!physSelTask) { Printf("no physSelTask"); return; }
- //AliPhysicsSelection *physSel = physSelTask->GetPhysicsSelection();
- //physSel->AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL");// #3119 #769");
-
- gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
- AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(bMCphyssel);
- if(!physSelTask) { Printf("no physSelTask"); return; }
-
+
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
AliAnalysisTask *PIDTask = AddTaskPIDResponse(bMCtruth,kTRUE);
if(!PIDTask) { Printf("no PIDtask"); return; }
- /*gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
- AliCentralitySelectionTask *centralityTask = AddTaskCentrality();
- if(!centralityTask) { Printf("no centralityTask"); return; }
- */
+
+ bool isMonteCarlo = bMCtruth;
+
+ double cutCosPa(0.998);
+ double cutcTauMin(-999);
+ double cutNcTauMax(3.0);
+ double cutBetheBloch(3.0);
+ double cutMinNClustersTPC(70);
+ double cutRatio(0.8);
+ double cutEta(0.8);
+ double cutRapidity(0.5);
+ double cutArmenteros(0.2);
+
// create task
gROOT->LoadMacro("AliAnalysisTaskLukeAOD.cxx++g");
- AliAnalysisTaskSE* task = new AliAnalysisTaskLukeAOD(taskname);
- task->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented
- mgr->AddTask(task);
-
- // set output root file name for different analysis
- TString outfilename = Form("list.%s.root",runtype);
-
- // create containers for input/output
- AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
- AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("coutput1", TList::Class(), AliAnalysisManager::kOutputContainer, outfilename);
-
- // connect input/output
- mgr->ConnectInput(task, 0, cinput);
- mgr->ConnectOutput(task, 1, coutput1);
- //mgr->ConnectInput (centralityTask,0, mgr->GetCommonInputContainer());
-
+ gROOT->ProcessLine(".L AddTaskLukeAOD.C");
+ AddTaskLukeAOD("lambdak0TEST",isMonteCarlo, cutCosPa, cutcTauMin, cutNcTauMax, cutBetheBloch, cutMinNClustersTPC, cutRatio, cutEta, cutRapidity, cutArmenteros);
+
// enable debug printouts
mgr->SetDebugLevel(2);
if (!mgr->InitAnalysis()) return;
mgr->PrintStatus();
-
+
// start analysis
Printf("Starting Analysis....");
mgr->StartAnalysis(runtype,nentries,firstentry);
AliAnalysisAlien *plugin = new AliAnalysisAlien();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
plugin->SetRunMode(gridmode);
-
+
// Set versions of used packages
plugin->SetAPIVersion("V1.1X");
- plugin->SetROOTVersion("v5-30-06");
- plugin->SetAliROOTVersion("v5-03-10-AN");
-
+ plugin->SetROOTVersion("v5-33-02b");
+ plugin->SetAliROOTVersion("v5-03-29-AN");
+
// Declare input data to be processed.
-
+
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
plugin->SetGridDataDir("/alice/data/2010/LHC10b");
// comment out the next line when using the "terminate" option, unless
// you want separate merged files for each run
plugin->SetMergeViaJDL();
-
+
// Method 2: Declare existing data files (raw collections, xml collections, root file)
// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
// XML collections added via this method can be combined with the first method if
// the content is compatible (using or not tags)
// plugin->AddDataFile("tag.xml");
// plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
-
+
// Define alien work directory where all files will be copied. Relative to alien $HOME.
plugin->SetGridWorkingDir(taskname);
-
+
// Declare alien output directory. Relative to working directory.
plugin->SetGridOutputDir("out"); // In this case will be $HOME/taskname/out
-
+
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
plugin->SetAnalysisSource("AliAnalysisTaskLukeAOD.cxx");
-
+
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
plugin->SetAdditionalLibs("AliAnalysisTaskLukeAOD.h AliAnalysisTaskLukeAOD.cxx");
-
+
// Declare the output file names separated by blancs.
// (can be like: file.root or file.root@ALICE::Niham::File)
// To only save certain files, use SetDefaultOutputs(kFALSE), and then
// SetOutputFiles("list.root other.filename") to choose which files to save
plugin->SetDefaultOutputs();
//plugin->SetOutputFiles("list.root");
-
+
// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
plugin->SetAnalysisMacro(Form("%s.C",taskname));
-
+
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
plugin->SetSplitMaxInputFileNumber(100);
-
+
// Optionally modify the executable name (default analysis.sh)
plugin->SetExecutable(Form("%s.sh",taskname));
-
+
// set number of test files to use in "test" mode
plugin->SetNtestFiles(10);
-
+
// Optionally resubmit threshold.
plugin->SetMasterResubmitThreshold(90);
-
+
// Optionally set time to live (default 30000 sec)
plugin->SetTTL(30000);
-
+
// Optionally set input format (default xml-single)
plugin->SetInputFormat("xml-single");
-
+
// Optionally modify the name of the generated JDL (default analysis.jdl)
plugin->SetJDLName(Form("%s.jdl",taskname));
-
+
// Optionally modify job price (default 1)
plugin->SetPrice(1);
-
+
// Optionally modify split mode (default 'se')
plugin->SetSplitMode("se");
// May limit the number of workers per slave
plugin->SetNproofWorkersPerSlave(1);
// May use a specific version of root installed in proof
- plugin->SetRootVersionForProof("VO_ALICE@ROOT::v5-30-06-1");
+ plugin->SetRootVersionForProof("VO_ALICE@ROOT::v5-33-02b");
// May set the aliroot mode. Check http://aaf.cern.ch/node/83
plugin->SetAliRootMode("default"); // Loads AF libs by default
// May request ClearPackages (individual ClearPackage not supported)
plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
// Request connection to alien upon connection to grid
plugin->SetProofConnectGrid(kFALSE);
-
+
return plugin;
}