14 #include <TLorentzVector.h>
16 #include <TProfile2D.h>
17 #include <TProfile3D.h>
22 #include "AliAnalysisManager.h"
24 #include "AliESDtrackCuts.h"
25 #include "AliESDEvent.h"
26 #include "AliESDInputHandler.h"
27 #include "AliAODEvent.h"
28 #include "AliMCEvent.h"
30 #include "AliEMCALGeometry.h"
32 #include "AliEMCALTriggerPatchInfo.h"
43 fIsInitialized(kFALSE),
44 fCaloTriggerPatchInfoName("EmcalTriggers"),
45 fCaloTriggerSetupInfoName("EmcalTriggerSetup")
56 fIsInitialized(kFALSE),
57 fCaloTriggerPatchInfoName(
"EmcalTriggers"),
58 fCaloTriggerSetupInfoName(
"EmcalTriggerSetup")
60 DefineOutput(1,TList::Class());
88 sprintf( strId[0],
"JetLow" );
89 sprintf( strId[1],
"JetHigh" );
90 sprintf( strId[2],
"JetMain" );
94 for( i = 0; i < 100; i++ )
97 sprintf( buf,
"fhPatchNTotal" );
98 fHistos[0] =
new TH1D( buf, buf, 200, -0.5, 199.5 );
99 fHistos[0]->SetXTitle(
"N_{patch} in event" );
103 for( i = 0; i < 3; i++ ){
105 sprintf( buf,
"fhPatchN%s", strId[i] );
106 fHistos[1000*(i+1)+0] =
new TH1D( buf, buf, 200, -0.5, 199.5 );
107 fHistos[1000*(i+1)+0]->SetXTitle(
"N_{patch} in event" );
108 fHistos[1000*(i+1)+0]->SetYTitle(
"N" );
110 sprintf( buf,
"fhThreshold%s", strId[i] );
111 fHistos[1000*(i+1)+1] =
new TH1D( buf, buf, 500, -0.5, 2999.5 );
112 fHistos[1000*(i+1)+1]->SetXTitle(
"thresholds [ADC]" );
113 fHistos[1000*(i+1)+1]->SetYTitle(
"N" );
115 sprintf( buf,
"fhThresholdGeV%s", strId[i] );
116 fHistos[1000*(i+1)+2] =
new TH1D( buf, buf, 500, 0, 250 );
117 fHistos[1000*(i+1)+2]->SetXTitle(
"thresholds [GeV]" );
118 fHistos[1000*(i+1)+2]->SetYTitle(
"N" );
120 sprintf( buf,
"fhADCPatch%s", strId[i] );
121 fHistos[1000*(i+1)+3] =
new TH1D( buf, buf, 500, -0.5, 2999.5 );
122 fHistos[1000*(i+1)+3]->SetXTitle(
"E [ADC]" );
123 fHistos[1000*(i+1)+3]->SetYTitle(
"N" );
125 sprintf( buf,
"fhADCPatchGeV%s", strId[i] );
126 fHistos[1000*(i+1)+4] =
new TH1D( buf, buf, 500, 0, 250 );
127 fHistos[1000*(i+1)+4]->SetXTitle(
"E [GeV]" );
128 fHistos[1000*(i+1)+4]->SetYTitle(
"N" );
130 sprintf( buf,
"fhECells%s", strId[i] );
131 fHistos[1000*(i+1)+5] =
new TH1D( buf, buf, 500, 0, 250 );
132 fHistos[1000*(i+1)+5]->SetXTitle(
"E cells [GeV]" );
133 fHistos[1000*(i+1)+5]->SetYTitle(
"N" );
135 sprintf( buf,
"fhPatchSpacial%s", strId[i] );
136 fHistos[1000*(i+1)+6] =
new TH2D( buf, buf, 9, -0.5, 8.5,
138 fHistos[1000*(i+1)+6]->SetXTitle(
"cells in -eta [8 cells]" );
139 fHistos[1000*(i+1)+6]->SetYTitle(
"cells in phi [8 cells]" );
140 fHistos[1000*(i+1)+6]->SetOption(
"COLZ" );
141 fHistos[1000*(i+1)+6]->SetStats( kFALSE );
143 sprintf( buf,
"fhPatchSpacialADC%s", strId[i] );
144 fHistos[1000*(i+1)+7] =
new TH2D( buf, buf, 9, -0.5, 8.5,
146 fHistos[1000*(i+1)+7]->SetXTitle(
"cells in -eta [8 cells]" );
147 fHistos[1000*(i+1)+7]->SetYTitle(
"cells in phi [8 cells]" );
148 fHistos[1000*(i+1)+7]->SetOption(
"COLZ" );
149 fHistos[1000*(i+1)+7]->SetStats( kFALSE );
151 sprintf( buf,
"fhPatchSpacialECells%s", strId[i] );
152 fHistos[1000*(i+1)+8] =
new TH2D( buf, buf, 9, -0.5, 8.5,
154 fHistos[1000*(i+1)+8]->SetXTitle(
"cells in -eta [8 cells]" );
155 fHistos[1000*(i+1)+8]->SetYTitle(
"cells in phi [8 cells]" );
156 fHistos[1000*(i+1)+8]->SetOption(
"COLZ" );
157 fHistos[1000*(i+1)+8]->SetStats( kFALSE );
159 sprintf( buf,
"fhPatchCenter%s", strId[i] );
160 fHistos[1000*(i+1)+9] =
new TH2D( buf, buf, 100, -0.7, 0.7,
161 100, 0, TMath::Pi()*2 );
162 fHistos[1000*(i+1)+9]->SetXTitle(
"#eta" );
163 fHistos[1000*(i+1)+9]->SetYTitle(
"#phi [rad]" );
164 fHistos[1000*(i+1)+9]->SetOption(
"COLZ" );
165 fHistos[1000*(i+1)+9]->SetStats( kFALSE );
167 sprintf( buf,
"fhPatchCenterMass%s", strId[i] );
168 fHistos[1000*(i+1)+10] =
new TH2D( buf, buf, 100, -0.7, 0.7,
169 100, 0, TMath::Pi()*2 );
170 fHistos[1000*(i+1)+10]->SetXTitle(
"#eta" );
171 fHistos[1000*(i+1)+10]->SetYTitle(
"#phi [rad]" );
172 fHistos[1000*(i+1)+10]->SetOption(
"COLZ" );
173 fHistos[1000*(i+1)+10]->SetStats( kFALSE );
175 sprintf( buf,
"fhEInPatchSpacial%s", strId[i] );
176 fHistos[1000*(i+1)+11] =
new TH2D( buf, buf, 32, -0.5, 31.5,
178 fHistos[1000*(i+1)+11]->SetXTitle(
"cells in -eta" );
179 fHistos[1000*(i+1)+11]->SetYTitle(
"cells in phi" );
180 fHistos[1000*(i+1)+11]->SetOption(
"COLZ" );
181 fHistos[1000*(i+1)+11]->SetStats( kFALSE );
183 sprintf( buf,
"fhADCvsEcells%s", strId[i] );
184 fHistos[1000*(i+1)+12] =
new TH2D( buf, buf, 500, -0.5, 2999.5,
186 fHistos[1000*(i+1)+12]->SetXTitle(
"E [ADC]" );
187 fHistos[1000*(i+1)+12]->SetYTitle(
"E cells [GeV]" );
188 fHistos[1000*(i+1)+12]->SetOption(
"COLZ" );
189 fHistos[1000*(i+1)+12]->SetStats( kFALSE );
193 for( i = 0; i < 5000; i++ )
218 Int_t nPatch, iPatch, iMainPatch, nJetLow, nJetHigh, type;
219 AliEMCALTriggerPatchInfo *patch;
234 AliError(Form(
"Calo cells container %s not available.",
fCaloCellsName.Data()));
253 for( iPatch = 0; iPatch < nPatch; iPatch++ ){
255 patch = (AliEMCALTriggerPatchInfo*)
fTriggersInfo->At( iPatch );
260 if( patch->IsJetHigh() ){
264 else if( patch->IsJetLow() ){
275 if( patch->IsMainTrigger() )
281 fHistos[1000]->Fill( nJetLow );
282 fHistos[2000]->Fill( nJetHigh );
285 if( iMainPatch == -1 ){
290 patch = (AliEMCALTriggerPatchInfo*)
fTriggersInfo->At( iMainPatch );
295 if( patch->IsJetHigh() ){
316 Int_t globCol, globRow, i, j, k, absId, cellAbsId[4];;
319 fHistos[1000*(type+1)+3]->Fill( patch->GetADCAmp() );
320 fHistos[1000*(type+1)+4]->Fill( patch->GetADCAmpGeVRough() );
321 fHistos[1000*(type+1)+5]->Fill( patch->GetPatchE() );
326 globCol = patch->GetEdgeCellX() / 2;
327 globRow = patch->GetEdgeCellY() / 2;
330 ((
TH2D*)
fHistos[1000*(type+1)+6])->Fill( globCol/4, globRow/4 );
331 ((
TH2D*)
fHistos[1000*(type+1)+7])->Fill( globCol/4, globRow/4, patch->GetADCAmp() );
332 ((
TH2D*)
fHistos[1000*(type+1)+8])->Fill( globCol/4, globRow/4, patch->GetPatchE() );
334 ((
TH2D*)
fHistos[1000*(type+1)+12])->Fill( patch->GetADCAmp(), patch->GetPatchE() );
337 ((
TH2D*)
fHistos[1000*(type+1)+9])->Fill( patch->GetEtaGeo(), patch->GetPhiGeo() );
338 ((
TH2D*)
fHistos[1000*(type+1)+10])->Fill( patch->GetEtaCM(), patch->GetPhiCM() );
342 fGeom->GetAbsFastORIndexFromPositionInEMCAL( globCol, globRow, absId );
344 fGeom->GetCellIndexFromFastORIndex( absId, cellAbsId );
348 for( i = 0; i < 16; i++ ){
349 for( j = 0; j < 16; j++ ){
351 fGeom->GetAbsFastORIndexFromPositionInEMCAL( globCol+i, globRow+j, absId );
352 fGeom->GetCellIndexFromFastORIndex( absId, cellAbsId );
354 for( k = 0; k < 4; k++ ){
355 ((
TH2D*)
fHistos[1000*(type+1)+11])->Fill( i*2+k%2, j*2+k/2,
356 fCaloCells->GetCellAmplitude( cellAbsId[k] ));
AliAnalysisTaskEmcalTriggerInfoQA()
void FillPatch(AliEMCALTriggerPatchInfo *patch, Int_t type)
virtual void UserExec(Option_t *option)
Base task in the EMCAL framework.
TString fCaloTriggerPatchInfoName
init flag
TString fCaloTriggerSetupInfoName
virtual ~AliAnalysisTaskEmcalTriggerInfoQA()
virtual void UserCreateOutputObjects()
virtual void UserExecOnce()
Task initializations handled in user tasks.
Double_t GetThresholdGeVRoughJetLow() const
AliEMCALGeometry * fGeom
!emcal geometry
Int_t GetThresholdJetHigh() const
Int_t GetThresholdJetLow() const
TString fCaloCellsName
name of calo cell collection
TClonesArray * fTriggersInfo
histos
virtual void Terminate(Option_t *)
Double_t GetThresholdGeVRoughJetHigh() const
TH1 ** fHistos
Output list.
Manager for constants used in the trigger maker.
AliVCaloCells * fCaloCells
!cells
AliEmcalTriggerSetupInfo * fTriggerSetup
jet array
ClassImp(AliAnalysisTaskEmcalTriggerInfoQA) AliAnalysisTaskEmcalTriggerInfoQA
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
Settings manager for the trigger patch algorithmThis class contains the main settings (trigger thresh...
Bool_t fIsInitialized
tracks array