Added script to draw calibrated raw data
[u/mrichter/AliRoot.git] / JETAN / JetAnalysisManagerCAF.C
CommitLineData
aa191e39 1void JetAnalysisManagerCAF()
2{
3 //
4 if (gApplication) gApplication->InitializeGraphics();
aa191e39 5 //
6 // Connect to proof
312525d3 7
e6d0d7ed 8// TProof::Reset("proof://morsch@lxb6046.cern.ch");
9 TProof::Open("proof://morsch@lxb6046.cern.ch");
10// gProof->SetParallel(1);
11// gProof->ClearPackage("STEERBase");
312525d3 12// gProof->ClearPackage("ESD");
13// gProof->ClearPackage("AOD");
e6d0d7ed 14// gProof->ClearPackage("JETAN");
15// gProof->ClearPackage("ANALYSIS");
16// gProof->ClearPackage("ANALYSISalice");
aa191e39 17
18 gProof->ShowEnabledPackages();
e6d0d7ed 19
20 // Enable the STEERBase Package
21 gProof->UploadPackage("STEERBase.par");
22 gProof->EnablePackage("STEERBase");
aa191e39 23 // Enable the ESD Package
24 gProof->UploadPackage("ESD.par");
25 gProof->EnablePackage("ESD");
312525d3 26 // Enable the AOD Package
27 gProof->UploadPackage("AOD.par");
28 gProof->EnablePackage("AOD");
aa191e39 29 // Enable the Analysis Package
30 gProof->UploadPackage("ANALYSIS.par");
31 gProof->EnablePackage("ANALYSIS");
312525d3 32
e6d0d7ed 33 gProof->UploadPackage("ANALYSISalice.par");
34 gProof->EnablePackage("ANALYSISalice");
35
aa191e39 36 // Enable the JETAN Package
37 gProof->UploadPackage("JETAN.par");
38 gProof->EnablePackage("JETAN");
312525d3 39
aa191e39 40 //
41 gProof->ShowEnabledPackages();
42
43 //
44 //
45 // Create the chain
46 //
e6d0d7ed 47 // TChain* chain = CreateESDChain("test.txt", 200);
48 // Input
49 AliESDInputHandler* inpHandler = new AliESDInputHandler();
aa191e39 50 //
312525d3 51 // Create the analysis manager
aa191e39 52 //
a0255da7 53 AliAODHandler* aodHandler = new AliAODHandler();
e6d0d7ed 54 aodHandler->SetOutputFileName("jets.root");
312525d3 55
56 AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
e6d0d7ed 57 mgr->SetOutputEventHandler(aodHandler);
58 mgr->SetInputEventHandler(inpHandler);
aa191e39 59 mgr-> SetDebugLevel(10);
312525d3 60
312525d3 61
e6d0d7ed 62 //
63 // ESD Filter Task
64 //
312525d3 65 //
66 // Set of cuts
67 //
68 // standard
69 AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Loose");
70 esdTrackCutsL->SetMinNClustersTPC(50);
71 esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5);
72 esdTrackCutsL->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
73 esdTrackCutsL->SetRequireTPCRefit(kTRUE);
74 esdTrackCutsL->SetMinNsigmaToVertex(3);
75 esdTrackCutsL->SetRequireSigmaToVertex(kTRUE);
76 esdTrackCutsL->SetAcceptKingDaughters(kFALSE);
77 //
312525d3 78 //
79 AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
80 trackFilter->AddCuts(esdTrackCutsL);
312525d3 81 //
82 AliAnalysisTaskESDfilter *esdfilter = new AliAnalysisTaskESDfilter("ESD Filter");
83 esdfilter->SetTrackFilter(trackFilter);
84 esdfilter->SetDebugLevel(10);
85 mgr->AddTask(esdfilter);
e6d0d7ed 86
87//
88// Jet Finder Task
89//
90
91 AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
92 jetana->SetDebugLevel(10);
93 jetana->SetConfigFile("ConfigJetAnalysisAOD.C");
94 mgr->AddTask(jetana);
aa191e39 95 //
96 // Create containers for input/output
861795a8 97 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
aa191e39 98
861795a8 99 AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer();
e6d0d7ed 100 coutput1->SetSpecialOutput();
101
102 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
312525d3 103 AliAnalysisManager::kOutputContainer, "histos.root");
aa191e39 104
e6d0d7ed 105 mgr->ConnectInput (esdfilter, 0, cinput1 );
106 mgr->ConnectOutput (esdfilter, 0, coutput1);
107
aa191e39 108 mgr->ConnectInput (jetana, 0, cinput1);
109 mgr->ConnectOutput(jetana, 0, coutput1);
312525d3 110 mgr->ConnectOutput(jetana, 1, coutput2);
111
e6d0d7ed 112
aa191e39 113 //
114 // Run the analysis
115 //
116 mgr->InitAnalysis();
117 mgr->PrintStatus();
e6d0d7ed 118 mgr->StartAnalysis("proof","/PWG4/arian/jetjetAbove_50_real");
aa191e39 119}