]>
Commit | Line | Data |
---|---|---|
c89067f5 | 1 | void JetAnalysisManagerLoc() |
2 | { | |
99b06af5 | 3 | gSystem->Load("libTree.so"); |
891311ac | 4 | gSystem->Load("libPhysics.so"); |
99b06af5 | 5 | gSystem->Load("libGeom.so"); |
6 | gSystem->Load("libVMC.so"); | |
7 | gSystem->Load("libANALYSIS.so"); | |
8 | gSystem->Load("libSTEERBase.so"); | |
9 | gSystem->Load("libAOD.so"); | |
10 | gSystem->Load("libESD.so"); | |
891311ac | 11 | gSystem->Load("libANALYSISalice.so"); |
99b06af5 | 12 | gSystem->Load("libJETAN.so"); |
891311ac | 13 | |
c89067f5 | 14 | // |
15 | if (gApplication) gApplication->InitializeGraphics(); | |
16 | // Create the chain | |
17 | // | |
99b06af5 | 18 | gROOT->LoadMacro("CreateESDChain.C"); |
c89067f5 | 19 | TChain* chain = new TChain("esdTree"); |
4aa71b6f | 20 | chain->Add("~/alice/data/highpt/kPythia6Jets125_150/030/AliESDs.root"); |
99b06af5 | 21 | |
22 | /////////////////////////////////////////////////////////////////////////////////// | |
887fc299 | 23 | // Create the analysis manager |
c89067f5 | 24 | // |
99b06af5 | 25 | // Input |
26 | AliESDInputHandler* inpHandler = new AliESDInputHandler(); | |
27 | // Output | |
28 | AliAODHandler* aodHandler = new AliAODHandler(); | |
887fc299 | 29 | aodHandler->SetOutputFileName("aod.root"); |
99b06af5 | 30 | // MC Truth |
887fc299 | 31 | AliMCEventHandler* mcHandler = new AliMCEventHandler(); |
99b06af5 | 32 | |
a0255da7 | 33 | |
99b06af5 | 34 | AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager"); |
35 | mgr->SetInputEventHandler (inpHandler); | |
36 | mgr->SetOutputEventHandler (aodHandler); | |
37 | mgr->SetMCtruthEventHandler(mcHandler); | |
891311ac | 38 | mgr->SetDebugLevel(10); |
99b06af5 | 39 | /////////////////////////////////////////////////////////////////////////////////// |
40 | ||
41 | ||
887fc299 | 42 | // |
99b06af5 | 43 | // Set of cuts |
44 | // | |
a0f4238b | 45 | // standard |
46 | ||
47 | AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("Standard Track Cuts", "ESD Track Cuts"); | |
99b06af5 | 48 | esdTrackCutsL->SetMinNClustersTPC(50); |
49 | esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5); | |
99b06af5 | 50 | esdTrackCutsL->SetRequireTPCRefit(kTRUE); |
a0f4238b | 51 | esdTrackCutsL->SetMaxDCAToVertexXY(2.4); |
52 | esdTrackCutsL->SetMaxDCAToVertexZ(3.2); | |
53 | esdTrackCutsL->SetDCAToVertex2D(kTRUE); | |
54 | esdTrackCutsL->SetRequireSigmaToVertex(kFALSE); | |
d3fae473 | 55 | esdTrackCutsL->SetAcceptKinkDaughters(kFALSE); |
a0f4238b | 56 | |
99b06af5 | 57 | // |
58 | // hard | |
59 | AliESDtrackCuts* esdTrackCutsH = new AliESDtrackCuts("AliESDtrackCuts", "Hard"); | |
60 | esdTrackCutsH->SetMinNClustersTPC(100); | |
61 | esdTrackCutsH->SetMaxChi2PerClusterTPC(2.0); | |
62 | esdTrackCutsH->SetMaxCovDiagonalElements(2,2,0.5,0.5,2); | |
63 | esdTrackCutsH->SetRequireTPCRefit(kTRUE); | |
d3fae473 | 64 | esdTrackCutsH->SetMaxNsigmaToVertex(2); |
99b06af5 | 65 | esdTrackCutsH->SetRequireSigmaToVertex(kTRUE); |
d3fae473 | 66 | esdTrackCutsH->SetAcceptKinkDaughters(kFALSE); |
99b06af5 | 67 | // |
68 | AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter"); | |
69 | trackFilter->AddCuts(esdTrackCutsL); | |
70 | trackFilter->AddCuts(esdTrackCutsH); | |
71 | // | |
72 | AliAnalysisTaskESDfilter *esdfilter = new AliAnalysisTaskESDfilter("ESD Filter"); | |
73 | esdfilter->SetTrackFilter(trackFilter); | |
74 | esdfilter->SetDebugLevel(10); | |
75 | mgr->AddTask(esdfilter); | |
76 | ||
c89067f5 | 77 | AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis"); |
78 | jetana->SetDebugLevel(10); | |
4aa71b6f | 79 | |
80 | ||
81 | ||
82 | AliAnalysisTaskJets *jetanaMC = new AliAnalysisTaskJets("JetAnalysisMC"); | |
83 | jetanaMC->SetDebugLevel(10); | |
84 | jetanaMC->SetConfigFile("ConfigJetAnalysisMC.C"); | |
85 | jetanaMC->SetNonStdBranch("jetsMC"); | |
86 | mgr->AddTask(jetanaMC); | |
c89067f5 | 87 | mgr->AddTask(jetana); |
a0255da7 | 88 | |
c89067f5 | 89 | // |
90 | // Create containers for input/output | |
861795a8 | 91 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); |
92 | AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer(); | |
99b06af5 | 93 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(), |
887fc299 | 94 | AliAnalysisManager::kOutputContainer, "histos.root"); |
95 | ||
4aa71b6f | 96 | AliAnalysisDataContainer *coutputMC2 = mgr->CreateContainer("histosMC", TList::Class(), |
97 | AliAnalysisManager::kOutputContainer, "histosMC.root"); | |
98 | ||
99b06af5 | 99 | mgr->ConnectInput (esdfilter, 0, cinput1 ); |
100 | mgr->ConnectOutput (esdfilter, 0, coutput1 ); | |
101 | ||
102 | mgr->ConnectInput (jetana, 0, cinput1 ); | |
103 | mgr->ConnectOutput (jetana, 0, coutput1 ); | |
104 | mgr->ConnectOutput (jetana, 1, coutput2 ); | |
105 | ||
4aa71b6f | 106 | mgr->ConnectInput (jetanaMC, 0, cinput1 ); |
107 | mgr->ConnectOutput (jetanaMC, 0, coutput1 ); | |
108 | mgr->ConnectOutput (jetanaMC, 1, coutputMC2 ); | |
109 | ||
99b06af5 | 110 | |
c89067f5 | 111 | // |
112 | // Run the analysis | |
113 | // | |
114 | mgr->InitAnalysis(); | |
115 | mgr->PrintStatus(); | |
116 | mgr->StartAnalysis("local",chain); | |
117 | } |