adding the option for hybrid tracks global+global constrained as well as global+TPC...
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisBtag.C
CommitLineData
32301b07 1//------------------------------------\r
e928077a 2// Config file for B-tagging\r
32301b07 3//\r
e928077a 4// Author T. Aronsson\r
32301b07 5//\r
6//------------------------------------\r
7\r
8AliAnaPartCorrMaker* ConfigAnalysis()\r
9{\r
10 //\r
11 // Configuration goes here\r
12 // \r
13 printf("======================== \n");\r
e928077a 14 printf("==Preforming Btag.cxx=== \n");\r
32301b07 15 printf("======================== \n");\r
16 Bool_t kInputIsESD = kTRUE; //uncomment for input ESD\r
17//Bool_t kInputIsESD = kFALSE; //uncomment for input AODs\r
18 Bool_t kFollowsFilter = kTRUE; //uncomment if follows ESD filter task\r
19//Bool_t kFollowsFilter = kFALSE; //uncomment if no ESD filter task\r
20 Bool_t kMC = kTRUE; //set to kFALSE for data\r
21\r
e928077a 22 \r
32301b07 23\r
24 //Alternatively, select input via anaInputData environment variable.\r
25 if (gSystem->Getenv("anaInputData")){\r
26 TString kInputData = gSystem->Getenv("anaInputData");\r
27 if( kInputData == "AOD" ){\r
28 kInputIsESD = kFALSE;\r
29 kFollowsFilter = kFALSE;\r
30 }\r
31 }\r
32\r
33 //Alternatively, adjust for real data based on kMC value.\r
34 if (gSystem->Getenv("anakMC")){\r
35 kMC = atoi(gSystem->Getenv("anakMC"));\r
36 }\r
37\r
38 //Detector Fiducial Cuts\r
39 AliFiducialCut * fidCut = new AliFiducialCut();\r
40 fidCut->DoCTSFiducialCut(kFALSE) ;\r
41 fidCut->DoEMCALFiducialCut(kFALSE) ;\r
42 fidCut->DoPHOSFiducialCut(kFALSE) ;\r
43\r
44 //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);\r
45 //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);\r
46 //fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.);\r
47\r
48 fidCut->Print("");\r
49\r
50 //----------------------------------------------------------- \r
51 // Reader\r
52 //-----------------------------------------------------------\r
53 if(kInputIsESD && !kFollowsFilter)AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();\r
54 else AliCaloTrackAODReader *reader = new AliCaloTrackAODReader();\r
55 reader->SetDebug(-1);//10 for lots of messages\r
e928077a 56 reader->SwitchOnWriteDeltaAOD();\r
32301b07 57 //Switch on or off the detectors information that you want\r
58 reader->SwitchOnEMCAL();\r
e928077a 59 reader->SwitchOnCTS(); \r
32301b07 60 reader->SwitchOffPHOS();\r
e928077a 61 \r
32301b07 62\r
63 //Kine\r
64 if(kMC && !kInputIsESD){\r
65 reader->SwitchOffStack(); // On by default, remember to SwitchOnMCData() in analysis classes\r
66 reader->SwitchOnAODMCParticles(); // Off by default, remember to SwitchOnMCData() in analysis classes\r
67 }\r
68\r
69 //Select Trigger Class for real data\r
70 if(!kMC) reader->SetFiredTriggerClassName("CINT1B-ABCE-NOPF-ALL");\r
71\r
72 //Min particle pT\r
73 reader->SetCTSPtMin(0.0); //new\r
74 reader->SetEMCALPtMin(0.0); //new\r
75 if(kFollowsFilter)reader->SetTrackStatus(0); //to prevent automatic TPC and ITS refit\r
76\r
e928077a 77\r
32301b07 78\r
79 reader->SetFiducialCut(fidCut);\r
80\r
81 if(!kInputIsESD){\r
32301b07 82\r
32301b07 83 }\r
84\r
85 reader->Print("");\r
86\r
87\r
88 //Detector Fiducial Cuts\r
89 AliFiducialCut * fidCut2 = new AliFiducialCut();\r
90 fidCut2->DoEMCALFiducialCut(kTRUE) ;\r
91 fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);\r
92\r
93 fidCut2->DoCTSFiducialCut(kTRUE) ;\r
94 fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.); \r
95\r
96 fidCut2->Print("");\r
97\r
e928077a 98\r
99\r
100\r
101\r
32301b07 102 //---------------------------------------------------------------------\r
103 // Analysis algorithm\r
104 //---------------------------------------------------------------------\r
105\r
e928077a 106 AliAnaBtag *btag = new AliAnaBtag();\r
107\r
108 //Base class\r
109 btag->SetDebug(-1); //10 for lots of messages\r
110 //btag->SetWriteNtuple(1); //Can be used to write out NTuples for local analysis (1000 times faster than AOD analysis), default is off.\r
32301b07 111 if(kMC){\r
e928077a 112 btag->SwitchOnDataMC();\r
113 btag->SetMinPt(1.);\r
32301b07 114 }\r
e928077a 115 btag->SetOutputAODName("Electrons");\r
116 btag->SetOutputAODClassName("AliAODPWG4Particle");\r
117\r
118\r
119\r
120\r
32301b07 121\r
122 //---------------------------------------------------------------------\r
123 // Set analysis algorithm and reader\r
124 //---------------------------------------------------------------------\r
125 maker = new AliAnaPartCorrMaker();\r
126 maker->SetReader(reader);//pointer to reader\r
e928077a 127 maker->AddAnalysis(btag,0);\r
32301b07 128 maker->SetAnaDebug(-1) ;\r
129 maker->SwitchOnHistogramsMaker() ;\r
130 maker->SwitchOnAODsMaker() ;\r
131\r
132 maker->Print("");\r
133 //\r
134 printf("============================ \n");\r
135 printf("END ConfigAnalysisElectron() \n");\r
136 printf("============================ \n");\r
137 return maker ;\r
138}\r