ROOT logo
{
    gSystem->Load("libPhysics.so");
    // Connecting to the PROOF cluster
    TProof::Open("alicecaf");

    // Clear packages if changing ROOT version on CAF or local
    //gProof->ClearPackages();
    
    // Enable the needed packages
    gProof->UploadPackage("STEERBase");
    gProof->EnablePackage("STEERBase");
    gProof->UploadPackage("ESD");
    gProof->EnablePackage("ESD");
    gProof->UploadPackage("AOD");
    gProof->EnablePackage("AOD");
    gProof->UploadPackage("ANALYSIS");
    gProof->EnablePackage("ANALYSIS");
    gProof->UploadPackage("ANALYSISalice");
    gProof->EnablePackage("ANALYSISalice");
    gProof->UploadPackage("JETAN");
    gProof->EnablePackage("JETAN");
       
    // Create the analysis manager
    mgr = new AliAnalysisManager("Analysis UE test");

    // Create, add task
    gProof->Load("AliKineTrackCuts.cxx+");
    AliKineTrackCuts* trackCuts = new AliKineTrackCuts("AliKineTrackCuts", "Eta");
    trackCuts->SetEtaRange(-1., 1.);
    
    AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
    trackFilter->AddCuts(trackCuts);
    
    gProof->Load("AliAnalysisTaskKineFilter.cxx+");
    AliAnalysisTaskKineFilter *kinefilter = new AliAnalysisTaskKineFilter("Kine Filter");
    kinefilter->SetTrackFilter(trackFilter);
    mgr->AddTask(kinefilter);
    
    // Create chain of input files
    gROOT->LoadMacro("CreateESDChain.C");
    chain = CreateChain( "TE", "KINE82XX_30K.txt", 200);
 
 
 
    /////////////////////////////////////////////////////////////////////////////////// 
    // Create the analysis manager
    //
    // Input 
    // MC Truth
    AliMCEventHandler* mcHandler = new AliMCEventHandler();
    mcHandler->SetReadTR(kFALSE);
    
    // Output
    AliAODHandler* aodHandler = new AliAODHandler();
    aodHandler->SetOutputFileName( "aodKine.root" );

    AliAnalysisManager *mgr  = new AliAnalysisManager("Jet Manager", "Jet Manager");
//    mgr->SetInputEventHandler  (inpHandler);
    mgr->SetMCtruthEventHandler(mcHandler);
    mgr->SetOutputEventHandler (aodHandler);
    mgr->SetDebugLevel(10);
    
    /////////////////////////////////////////////////////////////////////////////////// 
    
    //
    // Set of cuts
    // 
    AliKineTrackCuts* trackCuts = new AliKineTrackCuts("AliKineTrackCuts", "Eta");
    trackCuts->SetEtaRange(-1., 1.);
 //   trackCuts->SetPtRange(0.5);
              
    AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
    trackFilter->AddCuts(trackCuts);
    
    
    AliAnalysisTaskKineFilter* kinefilter = new AliAnalysisTaskKineFilter("Kine Filter");
    kinefilter->SetTrackFilter(trackFilter);
    kinefilter->SetDebugLevel(10);
    mgr->AddTask(kinefilter);
    
    //    Analysis Task for Jet
    //  AliAnalysisTaskJets need ConfigJetAnalysis.C macro !!!!
    AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
    jetana->SetDebugLevel(10);
    mgr->AddTask(jetana);

    //
    // Create containers for input/output                  
    AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
    if (!cinput1) cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
                                      AliAnalysisManager::kInputContainer);

    AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer();
    AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
                                                              AliAnalysisManager::kOutputContainer, "histos.root");

    mgr->ConnectInput  (kinefilter,  0, cinput1  );
    mgr->ConnectOutput (kinefilter,  0, coutput1 );

    mgr->ConnectInput  (jetana,     0, cinput1  );
    mgr->ConnectOutput (jetana,     0, coutput1 );
    mgr->ConnectOutput (jetana,     1, coutput2 );


    //
    // Run the analysis
    //    
    if( mgr->InitAnalysis() ) {
      mgr->PrintStatus();
      mgr->StartAnalysis("proof", chain );
    }
}
 runKineProof.C:1
 runKineProof.C:2
 runKineProof.C:3
 runKineProof.C:4
 runKineProof.C:5
 runKineProof.C:6
 runKineProof.C:7
 runKineProof.C:8
 runKineProof.C:9
 runKineProof.C:10
 runKineProof.C:11
 runKineProof.C:12
 runKineProof.C:13
 runKineProof.C:14
 runKineProof.C:15
 runKineProof.C:16
 runKineProof.C:17
 runKineProof.C:18
 runKineProof.C:19
 runKineProof.C:20
 runKineProof.C:21
 runKineProof.C:22
 runKineProof.C:23
 runKineProof.C:24
 runKineProof.C:25
 runKineProof.C:26
 runKineProof.C:27
 runKineProof.C:28
 runKineProof.C:29
 runKineProof.C:30
 runKineProof.C:31
 runKineProof.C:32
 runKineProof.C:33
 runKineProof.C:34
 runKineProof.C:35
 runKineProof.C:36
 runKineProof.C:37
 runKineProof.C:38
 runKineProof.C:39
 runKineProof.C:40
 runKineProof.C:41
 runKineProof.C:42
 runKineProof.C:43
 runKineProof.C:44
 runKineProof.C:45
 runKineProof.C:46
 runKineProof.C:47
 runKineProof.C:48
 runKineProof.C:49
 runKineProof.C:50
 runKineProof.C:51
 runKineProof.C:52
 runKineProof.C:53
 runKineProof.C:54
 runKineProof.C:55
 runKineProof.C:56
 runKineProof.C:57
 runKineProof.C:58
 runKineProof.C:59
 runKineProof.C:60
 runKineProof.C:61
 runKineProof.C:62
 runKineProof.C:63
 runKineProof.C:64
 runKineProof.C:65
 runKineProof.C:66
 runKineProof.C:67
 runKineProof.C:68
 runKineProof.C:69
 runKineProof.C:70
 runKineProof.C:71
 runKineProof.C:72
 runKineProof.C:73
 runKineProof.C:74
 runKineProof.C:75
 runKineProof.C:76
 runKineProof.C:77
 runKineProof.C:78
 runKineProof.C:79
 runKineProof.C:80
 runKineProof.C:81
 runKineProof.C:82
 runKineProof.C:83
 runKineProof.C:84
 runKineProof.C:85
 runKineProof.C:86
 runKineProof.C:87
 runKineProof.C:88
 runKineProof.C:89
 runKineProof.C:90
 runKineProof.C:91
 runKineProof.C:92
 runKineProof.C:93
 runKineProof.C:94
 runKineProof.C:95
 runKineProof.C:96
 runKineProof.C:97
 runKineProof.C:98
 runKineProof.C:99
 runKineProof.C:100
 runKineProof.C:101
 runKineProof.C:102
 runKineProof.C:103
 runKineProof.C:104
 runKineProof.C:105
 runKineProof.C:106
 runKineProof.C:107
 runKineProof.C:108
 runKineProof.C:109
 runKineProof.C:110
 runKineProof.C:111
 runKineProof.C:112
 runKineProof.C:113