AliPhysics  b97afa6 (b97afa6)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
28 #include <TRef.h>
29 #include <TBits.h>
30 #include <TMath.h>
31 #include <AliVEvent.h>
32 #include "AliEMCALTriggerPatchInfo.h"
34 #include "AliAnalysisTaskEmcal.h"
35 
37  public:
41 
43  kManual = 0, //just select highest energy patch in array
44  kEmcalJet = 1 //use functionality of AliAnalysisTaskEmcal
45  };
46 
47 // void ExecOnce();
49  void Terminate(Option_t *option);
50  Bool_t SelectEvent(); //decides if event is used for analysis
53 
54  //Setters
55  void SetDebug(Int_t d) { fDebug = d;}
56  void SetTriggerClass(const char *n) { fTriggerClass = n; }
57  void SetNFastorPatch(Int_t i) { fNFastOR = i;}
58 
62 
63  // cuts and biases
64  virtual void SetPatchEcut(Double_t pE) { fPatchECut = pE; }
65  virtual void SetTrkBias(Double_t b) { fTrkBias = b; } //require a track with pt > b in jet
66  virtual void SetClusBias(Double_t b) { fClusBias = b; } //require a cluster with pt > b in jet
67 
68  // give comments setter and various switches
69  void SetdoComments(Bool_t comm) { doComments = comm; } // give comment switch
70  void SetUseALLrecalcPatches(Bool_t useall) { fUseALLrecalcPatches = useall; } // use all firing (offline) patches
71 
72  virtual void SetClusterTriggeredEventname(const char *clcol) { fClusterTriggeredEventname = clcol; }
74 
75  Int_t GetLeadingCellId(const AliVCluster *clus) const;
76  Double_t GetEnergyLeadingCell(const AliVCluster *clus) const;
77  Double_t GetECross(Int_t absID) const;
78 
79  protected:
80  void ExecOnce();
82  Bool_t Run() ;
83  Float_t RelativeEP(Double_t objAng, Double_t EPAng) const;
84  Bool_t TestFilterBit(Int_t trigBit, UInt_t bitJetTrig) const {return (Bool_t) ((trigBit & bitJetTrig) != 0);}
85 
86  // Trigger bit - do i need?????
87  void ExtractMainPatch();
88  TH1* FillTriggerPatchQA(TH1* h, UInt_t t, AliEMCALTriggerPatchInfo* fPatch); // filled trigger patch QA
89  TH1* FillEventTriggerQA(TH1* h, UInt_t t); // fill event trigger QA
90  Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const;
91 
92  private:
93  Bool_t fDebug; // debug level
94  Bool_t fAttachToEvent; // attach local rho to the event
95  TString fTriggerClass; // trigger class to analyze EJ or GA patches
96  Double_t fMaxPatchEnergy; // energy of patch with largest energy (offline)
97  Double_t fMaxPatchADCEnergy; // energy of patch with largest energy from online ADC
98  Int_t fTriggerType; // trigger type
99  Int_t fNFastOR; // size of trigger patch fNFastORxfNFastOR
100  TriggerCategory fMainTrigCat; // trigger category for main trigger
101  TriggerCategory fTriggerCategory; // trigger category
102  Bool_t fMainTrigSimple; // use offline trigger instead of online from AliAnalysisTaskEmcal::GetMainTriggerPatch
103  Double_t fPatchECut; // patch energy cut
104  Double_t fTrkBias; // track bias
105  Double_t fClusBias; // cluster bias
106  Bool_t doComments; // summary (debugging comments)
107  Bool_t fUseALLrecalcPatches; // use all/ just max recalulated (offline) patches
108  TString fClusterTriggeredEventname; // name of cluster that triggered event collection
109 
110  AliEMCALTriggerPatchInfo *fMaxPatch;
112 
113  TH1F *fhNEvents;
114  TProfile *fhTriggerbit;
139 
151 
153 
154  TClonesArray *fClusterTriggeredEvent;
155  TClonesArray *fRecalcTriggerPatches;
156 
157  THnSparse *fhnPatchMaxClus;
158  THnSparse *fhnPatchMatch;
159  THnSparse *fhnPatchMatch2;
160 
163 
165 };
166 #endif
TH3F * fh3PatchADCEnergyEtaPhiCenterG2
patch ADC energy vs eta, phi at center of patch, high threshold
TH1 * FillTriggerPatchQA(TH1 *h, UInt_t t, AliEMCALTriggerPatchInfo *fPatch)
double Double_t
Definition: External.C:58
Definition: External.C:260
THnSparse * fhnPatchMatch
// patch-maxclus distributions sparse matrix
Definition: External.C:236
THnSparse * fhnPatchMatch2
// QA before matching patch sparse matrix
Definition: External.C:244
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1
patch energy vs eta, phi at center of patch, low + high threshold
Base task in the EMCAL framework.
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 &)
TH1F * fhGammaLowPatchEnergy
Recalculated Gamma Patch Energy distribution.
void ExecOnce()
Perform steps needed to initialize the analysis.
int Int_t
Definition: External.C:63
Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const
unsigned int UInt_t
Definition: External.C:33
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
TH3F * fh3PatchEnergyEtaPhiCenterG2
patch energy vs eta, phi at center of patch, high threshold
float Float_t
Definition: External.C:68
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
Manager for constants used in the trigger maker.
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
Definition: External.C:220
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.
const char Option_t
Definition: External.C:48
TH3F * fh3PatchADCEnergyEtaPhiCenterG1G2
patch ADC energy vs eta, phi at center of patch, low threshold
TH3F * fh3PtEtaPhiTracks
histogram containing the triggerbit (fOfflineTriggerMask)
bool Bool_t
Definition: External.C:53
TriggerCategory
Online trigger categories.
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.
Definition: External.C:196
TH3F * fh3PtEtaPhiTracksToProp
pt,eta,phi of tracks at Emcal surface
TH3F * fh3PatchADCEnergyEtaPhiCenterG1
patch energy vs eta, phi at center of patch, low + high threshold