]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/ConfigEMCALClusterize.C
SHUTTLE module
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / ConfigEMCALClusterize.C
CommitLineData
7ea82392 1// $Id$
2
5994e71f 3AliAnalysisTaskEMCALClusterize* ConfigEMCALClusterize()
4{
5
6 AliAnalysisTaskEMCALClusterize* clusterize = new AliAnalysisTaskEMCALClusterize("EMCALClusterize");
7 clusterize->SelectCollisionCandidates();
8 clusterize->SetOCDBPath("local://$ALICE_ROOT/OCDB");
9 clusterize->FillAODFile(kTRUE); // fill aod.root with clusters?, not really needed for analysis.
10 clusterize->JustUnfold(kFALSE); // if TRUE, do just unfolding, do not recluster cells
11 AliEMCALRecParam * params = clusterize->GetRecParam();
12 params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerNxN);
13 params->SetClusteringThreshold(0.1); // 100 MeV
14 params->SetMinECut(0.01); //10 MeV
15 params->SetUnfold(kFALSE);
16 params->SetW0(4.5);
17 params->SetTimeCut(1e6);//Open this cut for AODs
18 params->SetTimeMin(-1); //Open this cut for AODs
19 params->SetTimeMax(1e6);//Open this cut for AODs
20
5994e71f 21 //Allignment matrices
22 clusterize->SwitchOnLoadOwnGeometryMatrices();
23 TGeoHMatrix *matrix[4];
24 double rotationMatrix[4][9] = {
25 -0.014587, -0.999892, -0.002031, 0.999892, -0.014591, 0.001979, -0.002009, -0.002002, 0.999996,
26 -0.014587, 0.999892, 0.002031, 0.999892, 0.014591, -0.001979, -0.002009, 0.002002, -0.999996,
27 -0.345864, -0.938278, -0.003412, 0.938276, -0.345874, 0.003010, -0.004004, -0.002161, 0.999990,
28 -0.345864, 0.938278, 0.003412, 0.938276, 0.345874, -0.003010, -0.004004, 0.002161, -0.999990
29 };
30
31 double translationMatrix[4][3] = {
32 0.351659, 447.576446, 176.269742,
33 1.062577, 446.893974, -173.728870,
34 -154.213287, 419.306156, 176.753692,
35 -153.018950, 418.623681, -173.243605};
36
37 for(int j=0; j<4; j++){
38 matrix[j] = new TGeoHMatrix();
39 matrix[j]->SetRotation(rotationMatrix[j]);
40 matrix[j]->SetTranslation(translationMatrix[j]);
41 //matrix[j]->Print();
42 clusterize->SetGeometryMatrixInSM(matrix[j],j);
43 }
44
45
46// AliEMCALRecoUtils * reco = clusterize->GetRecoUtils();
47
48 //Recalibration factors
49// reco->SwitchOnRecalibration();
50// TFile * f = new TFile("RecalibrationFactors.root","read");
51// TH2F * h0 = (TH2F*)f->Get("EMCALRecalFactors_SM0");
52// TH2F * h1 = (TH2F*)f->Get("EMCALRecalFactors_SM1");
53// TH2F * h2 = (TH2F*)f->Get("EMCALRecalFactors_SM2");
54// TH2F * h3 = (TH2F*)f->Get("EMCALRecalFactors_SM3");
55// reco->SetEMCALChannelRecalibrationFactors(0,h0);
56// reco->SetEMCALChannelRecalibrationFactors(1,h1);
57// reco->SetEMCALChannelRecalibrationFactors(2,h2);
58// reco->SetEMCALChannelRecalibrationFactors(3,h3);
59//
60// reco->SwitchOnTimeDepCorrection();
61// //char cmd[200] ;
62// //sprintf(cmd, ".!tar xvfz CorrectionFiles.tgz") ;
63// //gROOT->ProcessLine(cmd) ;
64//
65// // Remove EMCAL hottest channels for first LHC10 periods
66// reco->SwitchOnBadChannelsRemoval();
67// reco->SwitchOnDistToBadChannelRecalculation();
68// TFile * fbad = new TFile("BadChannels.root","read");
69// TH2I * hbad0 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod0");
70// TH2I * hbad1 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod1");
71// TH2I * hbad2 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod2");
72// TH2I * hbad3 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod3");
73// reco->SetEMCALChannelStatusMap(0,hbad0);
74// reco->SetEMCALChannelStatusMap(1,hbad1);
75// reco->SetEMCALChannelStatusMap(2,hbad2);
76// reco->SetEMCALChannelStatusMap(3,hbad3);
77
78 return clusterize;
79
7ea82392 80}