AliPhysics  e34b7ac (e34b7ac)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConfigEMCALClusterize.C
Go to the documentation of this file.
13 {
14 
15  AliAnalysisTaskEMCALClusterize* clusterize = new AliAnalysisTaskEMCALClusterize("EMCALClusterize");
16 
17  clusterize->SelectCollisionCandidates();
18  clusterize->SetOCDBPath("local://$ALICE_ROOT/OCDB");
19  clusterize->FillAODFile(kTRUE); // fill aod.root with clusters?, not really needed for analysis.
20  clusterize->JustUnfold(kFALSE); // if TRUE, do just unfolding, do not recluster cells
21 
22  AliEMCALRecParam * params = clusterize->GetRecParam();
23  params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerV2);
24  params->SetClusteringThreshold(0.1); // 100 MeV
25  params->SetMinECut(0.50); //50 MeV
26  params->SetUnfold(kFALSE);
27  params->SetW0(4.5);
28 
29  // Open cuts, be careful using this
30  params->SetTimeCut(1e6);
31  params->SetTimeMin(-1);
32  params->SetTimeMax(1e6);
33 
34  //
35  // Below, examples how to pass manually calibration/alignment.
36  //
37 
38 // // Alignment matrices
39 // clusterize->SwitchOnLoadOwnGeometryMatrices();
40 // TGeoHMatrix *matrix[4];
41 // double rotationMatrix[4][9] = {
42 // -0.014587, -0.999892, -0.002031, 0.999892, -0.014591, 0.001979, -0.002009, -0.002002, 0.999996,
43 // -0.014587, 0.999892, 0.002031, 0.999892, 0.014591, -0.001979, -0.002009, 0.002002, -0.999996,
44 // -0.345864, -0.938278, -0.003412, 0.938276, -0.345874, 0.003010, -0.004004, -0.002161, 0.999990,
45 // -0.345864, 0.938278, 0.003412, 0.938276, 0.345874, -0.003010, -0.004004, 0.002161, -0.999990
46 // };
47 //
48 // double translationMatrix[4][3] = {
49 // 0.351659, 447.576446, 176.269742,
50 // 1.062577, 446.893974, -173.728870,
51 // -154.213287, 419.306156, 176.753692,
52 // -153.018950, 418.623681, -173.243605};
53 //
54 // for(int j=0; j<4; j++){
55 // matrix[j] = new TGeoHMatrix();
56 // matrix[j]->SetRotation(rotationMatrix[j]);
57 // matrix[j]->SetTranslation(translationMatrix[j]);
58 // //matrix[j]->Print();
59 // clusterize->SetGeometryMatrixInSM(matrix[j],j);
60 // }
61 
62 //
63 // AliEMCALRecoUtils * reco = clusterize->GetRecoUtils();
64 //
65 // //Recalibration factors
66 // reco->SwitchOnRecalibration();
67 // TFile * f = new TFile("RecalibrationFactors.root","read");
68 // TH2F * h0 = (TH2F*)f->Get("EMCALRecalFactors_SM0");
69 // TH2F * h1 = (TH2F*)f->Get("EMCALRecalFactors_SM1");
70 // TH2F * h2 = (TH2F*)f->Get("EMCALRecalFactors_SM2");
71 // TH2F * h3 = (TH2F*)f->Get("EMCALRecalFactors_SM3");
72 // reco->SetEMCALChannelRecalibrationFactors(0,h0);
73 // reco->SetEMCALChannelRecalibrationFactors(1,h1);
74 // reco->SetEMCALChannelRecalibrationFactors(2,h2);
75 // reco->SetEMCALChannelRecalibrationFactors(3,h3);
76 //
77 // reco->SwitchOnTimeDepCorrection();
78 // //char cmd[200] ;
79 // //sprintf(cmd, ".!tar xvfz CorrectionFiles.tgz") ;
80 // //gROOT->ProcessLine(cmd) ;
81 //
82 // // Remove EMCAL hottest channels for first LHC10 periods
83 // reco->SwitchOnBadChannelsRemoval();
84 // reco->SwitchOnDistToBadChannelRecalculation();
85 // TFile * fbad = new TFile("BadChannels.root","read");
86 // TH2I * hbad0 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod0");
87 // TH2I * hbad1 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod1");
88 // TH2I * hbad2 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod2");
89 // TH2I * hbad3 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod3");
90 // reco->SetEMCALChannelStatusMap(0,hbad0);
91 // reco->SetEMCALChannelStatusMap(1,hbad1);
92 // reco->SetEMCALChannelStatusMap(2,hbad2);
93 // reco->SetEMCALChannelStatusMap(3,hbad3);
94 
95  return clusterize;
96 
97 }
AliAnalysisTaskEMCALClusterize * ConfigEMCALClusterize()
Reclusterize EMCal clusters, put them in a new branch for other following analysis.