223980a5559f99cc5a09862c8ef7c5234f30f6f8
[u/mrichter/AliRoot.git] / HLT / JET / macros / HLTJetReconstruction.C
1 /**
2  * @file HLTJetReconstruction.C
3  * @brief Macro for testing HLT Jet Reconstruction
4  *
5  * This macro uses the ESDMCEventPublisher to publish AliMCEvents and AliESDEvents.
6  * The processing is done be JetFinder's
7  * Results are written to disk by a rootfile writer
8  *
9  * @author thaeder@kip.uni-heidelberg.de
10  * @ingroup alihlt_jet
11  */
12
13 /** HLTJetReconstruction test macro
14  *  @param nEvents Number of events which should be processed
15  */
16 void HLTJetReconstruction(Int_t nEvents=1) {
17
18   TString writerInput;
19   TString arg;
20
21   // this is just a tool to switch the logging systems
22   AliHLTLogging log;
23   log.SwitchAliLog(0);
24
25   AliHLTSystem gHLT;
26   gHLT.SetGlobalLoggingLevel(0x7F);
27   gHLT.LoadComponentLibraries("libAliHLTUtil.so");
28   gHLT.LoadComponentLibraries("libAliHLTJET.so");  
29
30   gHLT.LoadComponentLibraries("libESD.so");  
31   gHLT.LoadComponentLibraries("libSTEER.so");  
32   gHLT.LoadComponentLibraries("libSTEERBase.so");  
33   gHLT.LoadComponentLibraries("libAOD.so");  
34   gHLT.LoadComponentLibraries("libANALYSIS.so");  
35   gHLT.LoadComponentLibraries("libANALYSISalice.so");  
36   gHLT.LoadComponentLibraries("libJETAN.so");  
37   gHLT.LoadComponentLibraries("libJETANMC.so");  
38
39   // ----------------------------//
40   // -                         - //
41   // -- Publisher  Components -- //
42   // -                         - //
43   // ----------------------------//
44
45   arg.Form("-entrytype MCFAST -dataspec 0x0000001F -datapath /home/jthaeder/jet/data/v4-16-Rev-01/FastGen/kPythia6Jets104_125_14TeV/JET-ETA=-0.2,0.2_JET-ET=50,1000_R=0.4_500ev");
46
47   // -- The ESDMCEventPublisher 
48   AliHLTConfiguration ESDMCEventPublisher("ESDMCEventPublisher", "ESDMCEventPublisher", 
49                                           NULL, arg.Data() );
50   
51   if (!writerInput.IsNull()) writerInput+=" ";
52   writerInput+="ESDMCEventPublisher";
53
54   // ----------------------------//
55   // -                         - //
56   // -- Processing Components -- //
57   // -                         - //
58   // ----------------------------//
59
60   // -- ConeJetFinder
61   /*
62     AliHLTConfiguration jetFinder("JETConeJet", "JETConeJetFinder",
63     "ESDMCEventPublisher","");
64
65     if (!writerInput.IsNull()) writerInput+=" ";
66     writerInput+="JETConeJet";
67   */
68
69   // -- FasTJetFinder
70   AliHLTConfiguration jetFinder("JETFastJet", "JETFastJetFinder",
71                                 "ESDMCEventPublisher","");
72
73   if (!writerInput.IsNull()) writerInput+=" ";
74   writerInput+="JETFastJet";
75
76   // ----------------------------//
77   // -                         - //
78   // --    Sink Components    -- //
79   // -                         - //
80   // ----------------------------//
81
82   // -- The RootFileWriter 
83   AliHLTConfiguration rootWriter("RootWriter", "ROOTFileWriter", 
84                                  writerInput.Data(), "-datafile event");
85
86
87   // -                         - //
88   // --         Run           -- //
89   // -                         - //
90
91   gHLT.BuildTaskList("RootWriter");
92   gHLT.Run(nEvents);
93
94 }