update to master versions
[u/mrichter/AliRoot.git] / PWGCF / Correlations / macros / jcorran / AddTaskJCORRANFilter.C
CommitLineData
66be7134 1const TString kInputData = "AOD";
2const TString kJCORRANInputFormat = "AOD"; // ESD, AODout, AODin
66be7134 3
4//_____________________________________________________________________
5ca97880 5AliAnalysisTask *AddTaskJCORRANFilter(Bool_t IsMC = kFALSE, Int_t beamtype = 1){
66be7134 6 // Load Custom Configuration and parameters
7 // override values with parameters
5ca97880 8 cout <<"AddTaskJCORRANFilter:: IsMC = "<< IsMC <<"\t beamtype = "<< beamtype <<endl;
66be7134 9 UInt_t triggerSelection;
10
11 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
12
13 // AOD handler
14 AliAODInputHandler *aodHandler = new AliAODInputHandler();
15 mgr->SetInputEventHandler(aodHandler);
16
17 //================================================
18 // TASKS
19 //================================================
20
21 // set the trigger selection
22 triggerSelection = AliVEvent::kAny;
23 // | AliVEvent::kHighMult
24 // | AliVEvent::kEMCEGA;
25 // | AliVEvent::kEMCEJE
26 // | AliVEvent::kEMC1
27 // | AliVEvent::kEMC7
28 // | AliVEvent::kCentral
29 // | AliVEvent::kSemiCentral;
30 //============================
31 // JCORRANTask
32 //===========================
33
34 //==== JCORRAN TASK
35 AliJCORRANTask *jctask = new AliJCORRANTask("PWGCFJCORRANTask",kJCORRANInputFormat);
66be7134 36 jctask->SetDebugLevel(0);
66be7134 37
38 AliJRunHeader * hdr = new AliJRunHeader;
39 hdr->SetIsMC( IsMC );
5ca97880 40 hdr->SetBeamTypeI( beamtype ); // 0:pp 1:PbPb
66be7134 41 hdr->SetWithoutSDD(false);
42 hdr->SetRunType("LHC13c");
43 hdr->SetInputFormat( 1 ); // 0: ESD;
44 hdr->SetRefitESDVertexTracks(kFALSE);
45 hdr->SetStoreEventPlaneSource(kFALSE);
46 hdr->SetStoreTPCTrackBitMask( 1<<7 ); // TODO : For what?
47 hdr->SetStoreGCGTrackBitMask( 2^30-1 );
48 hdr->SetStoreEMCalInfo( kFALSE ); // error with lego now.
49
50
51 jctask->SetJRunHeader( hdr );
52
53 AliJFilter *jfilter = jctask->GetFilter();
54 jfilter->SetAliJRunHeader( hdr );
55 jfilter->SetClusterThreshold( 0 );
56 jfilter->SetTrackThreshold( 0 );
57
58 //==event selection
59 jctask->SelectCollisionCandidates( triggerSelection ); //Apply offline trigger selection by AliPhysicsSelectionTask
60
61 mgr->AddTask((AliAnalysisTask*) jctask);
62
63 //==== Create containers for input/output
64 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
65 AliAODHandler* aodoutHandler = new AliAODHandler();
66 aodoutHandler->SetCreateNonStandardAOD();
67 mgr->SetOutputEventHandler(aodoutHandler);
68
69// Connect input/output
70 mgr->ConnectInput(jctask, 0, cinput);
66be7134 71
72 return jctask;
73}
74