AliPhysics  a0db429 (a0db429)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliAnalysisTaskEmcalTriggerPatchClusterMatch.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEmcalTriggerPatchClusterMatch_h
2 #define AliAnalysisTaskEmcalTriggerPatchClusterMatch_h
3 //#ifndef ALIANALYSISTASKEMCALTRIGGERPATCHCLUSTERMATCH_H
4 //#define ALIANALYSISTASKEMCALTRIGGERPATCHCLUSTERMATCH_H
5 
6 //-------------------------------------------------------------------------
7 // 1) Analysis task to identify the cluster that fired the trigger patch
8 // 2) perform some QA on the patch / cluster
9 // 3) and pass the saved out collection of cluster(s) to other tasks
10 //
11 // currently set up for GA trigger
12 //
13 // Author: Joel Mazer (joel.mazer@cern.ch)
14 //-------------------------------------------------------------------------
15 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
16  * See cxx source for full Copyright notice */
17 
18 class TH1;
19 class TH2;
20 class TH3;
21 class TH3F;
22 class THnSparse;
23 class TProfile;
24 class TClonesArray;
25 class TArrayI;
26 class AliEmcalTriggerPatchInfo;
27 class AliEMCalTriggerAnaTriggerDecision;
28 
29 #include <TRef.h>
30 #include <TBits.h>
31 #include <TMath.h>
32 #include <AliVEvent.h>
33 #include "AliEmcalTriggerPatchInfoAP.h"
34 #include "AliEmcalTriggerSetupInfo.h"
35 #include "AliAnalysisTaskEmcal.h"
36 
38  public:
42 
44  kManual = 0, //just select highest energy patch in array
45  kEmcalJet = 1 //use functionality of AliAnalysisTaskEmcal
46  };
47 
48 // void ExecOnce();
50  void Terminate(Option_t *option);
51  Bool_t SelectEvent(); //decides if event is used for analysis
53  void SetAttachToEvent(Bool_t a) {fAttachToEvent = a;}
54 
55  //Setters
56  void SetDebug(Int_t d) { fDebug = d;}
57  void SetTriggerClass(const char *n) { fTriggerClass = n; }
58  void SetNFastorPatch(Int_t i) { fNFastOR = i;}
59 
63 
64  // cuts and biases
65  virtual void SetPatchEcut(Double_t pE) { fPatchECut = pE; }
66  virtual void SetTrkBias(Double_t b) { fTrkBias = b; } //require a track with pt > b in jet
67  virtual void SetClusBias(Double_t b) { fClusBias = b; } //require a cluster with pt > b in jet
68 
69  // give comments setter and various switches
70  void SetdoComments(Bool_t comm) { doComments = comm; } // give comment switch
71  void SetUseALLrecalcPatches(Bool_t useall) { fUseALLrecalcPatches = useall; } // use all firing (offline) patches
72 
73  virtual void SetClusterTriggeredEventname(const char *clcol) { fClusterTriggeredEventname = clcol; }
75 
76  Int_t GetLeadingCellId(const AliVCluster *clus) const;
77  Double_t GetEnergyLeadingCell(const AliVCluster *clus) const;
78  Double_t GetECross(Int_t absID) const;
79 
80  protected:
81  void ExecOnce();
82  Bool_t FillHistograms() ;
83  Bool_t Run() ;
84  Float_t RelativeEP(Double_t objAng, Double_t EPAng) const;
85  Bool_t TestFilterBit(Int_t trigBit, UInt_t bitJetTrig) const {return (Bool_t) ((trigBit & bitJetTrig) != 0);}
86 
87  // Trigger bit - do i need?????
88  void ExtractMainPatch();
89  TH1* FillTriggerPatchQA(TH1* h, UInt_t t, AliEmcalTriggerPatchInfo* fPatch); // filled trigger patch QA
90  TH1* FillEventTriggerQA(TH1* h, UInt_t t); // fill event trigger QA
91  Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const;
92 
93  private:
94  Bool_t fDebug; // debug level
95  Bool_t fAttachToEvent; // attach local rho to the event
96  TString fTriggerClass; // trigger class to analyze EJ or GA patches
97  Double_t fMaxPatchEnergy; // energy of patch with largest energy (offline)
98  Double_t fMaxPatchADCEnergy; // energy of patch with largest energy from online ADC
99  Int_t fTriggerType; // trigger type
100  Int_t fNFastOR; // size of trigger patch fNFastORxfNFastOR
101  TriggerCategory fMainTrigCat; // trigger category for main trigger
102  TriggerCategory fTriggerCategory; // trigger category
103  Bool_t fMainTrigSimple; // use offline trigger instead of online from AliAnalysisTaskEmcal::GetMainTriggerPatch
104  Double_t fPatchECut; // patch energy cut
105  Double_t fTrkBias; // track bias
106  Double_t fClusBias; // cluster bias
107  Bool_t doComments; // summary (debugging comments)
108  Bool_t fUseALLrecalcPatches; // use all/ just max recalulated (offline) patches
109  TString fClusterTriggeredEventname; // name of cluster that triggered event collection
110 
111  AliEmcalTriggerPatchInfo *fMaxPatch;
113 
114  TH1F *fhNEvents;
115  TProfile *fhTriggerbit;
140 
152 
154 
155  TClonesArray *fClusterTriggeredEvent;
156  TClonesArray *fRecalcTriggerPatches;
157 
158  THnSparse *fhnPatchMaxClus;
159  THnSparse *fhnPatchMatch;
160  THnSparse *fhnPatchMatch2;
161 
164 
166 };
167 #endif
TH3F * fh3PatchADCEnergyEtaPhiCenterG2
patch ADC energy vs eta, phi at center of patch, high threshold
THnSparse * fhnPatchMatch
// patch-maxclus distributions sparse matrix
THnSparse * fhnPatchMatch2
// QA before matching patch sparse matrix
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1
patch energy vs eta, phi at center of patch, low + high threshold
TH3F * fh3PatchADCEnergyEtaPhiCenterAll
patch ADC energy vs eta, phi at center of patch, low + high threshold
TH3F * fh3PatchEnergyEtaPhiCenterJ2
patch energy vs eta, phi at center of patch, high threshold
TH3F * fh3PatchEnergyEtaPhiCenterG1G2
patch energy vs eta, phi at center of patch, low threshold
AliAnalysisTaskEmcalTriggerPatchClusterMatch & operator=(const AliAnalysisTaskEmcalTriggerPatchClusterMatch &)
TH1 * FillTriggerPatchQA(TH1 *h, UInt_t t, AliEmcalTriggerPatchInfo *fPatch)
TH1F * fhGammaLowPatchEnergy
Recalculated Gamma Patch Energy distribution.
Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const
TH3F * fh3PatchEnergyEtaPhiCenterG2
patch energy vs eta, phi at center of patch, high threshold
TH1F * fhGammaLowSimplePatchEnergy
Gamma Low Patch Energy distribution.
TH3F * fh3PatchEnergyEtaPhiCenterJ1J2
patch energy vs eta, phi at center of patch, low threshold
TH1F * fhRecalcJetPatchEnergy
Gamma Low Simple Patch Energy distribution.
TH3F * fh3PatchEnergyEtaPhiCenterG1
patch ADC energy vs eta, phi at center of patch, low + high threshold
TH3F * fh3EEtaPhiCell
patch ADC energy vs eta, phi at center of patch, all trigger patches
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1J2
patch ADC energy vs eta, phi at center of patch, low threshold
Bool_t TestFilterBit(Int_t trigBit, UInt_t bitJetTrig) const
TH1F * fHistClusEnergy
cluster energy vs energy of leading cell in cluster vs time of the leading cell
TH2F * fHistdPhidEtaPatchCluster[16]
Main Trigger patch energy distribution.
TH3F * fh3PatchADCEnergyEtaPhiCenterG1G2
patch ADC energy vs eta, phi at center of patch, low threshold
TH3F * fh3PtEtaPhiTracks
histogram containing the triggerbit (fOfflineTriggerMask)
TH3F * fh3PatchADCEnergyEtaPhiCenterJ2
patch ADC energy vs eta, phi at center of patch, high threshold
TH1F * fhMainTriggerPatchEnergy
Jet Low Simple patch energy distribution.
TH1F * fhJetLowPatchEnergy
Recalculated Jet Patch Energy distribution.
TH3F * fh3PtEtaPhiTracksToProp
pt,eta,phi of tracks at Emcal surface
TH3F * fh3PatchADCEnergyEtaPhiCenterG1
patch energy vs eta, phi at center of patch, low + high threshold