AliPhysics  vAN-20150723 (baea2bf)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEmcalTriggerPatchInfo.h
Go to the documentation of this file.
1 
14 #ifndef ALIEMCALTRIGGERPATCHINFO_H
15 #define ALIEMCALTRIGGERPATCHINFO_H
16 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
17  * See cxx source for full Copyright notice */
18 
19 #include "TObject.h"
20 
21 #include <TLorentzVector.h>
22 #include <TMath.h>
25 
26 class AliEMCALGeometry;
27 class TArrayI;
28 
39 class AliEmcalTriggerPatchInfo: public TObject {
40  public:
44  virtual ~AliEmcalTriggerPatchInfo();
45 
54  };
55 
60  Double_t GetPhiGeo() const { return fCenterGeo.Phi(); }
65  Double_t GetPhiCM() const { return fCenterMass.Phi(); }
70  Double_t GetPhiMin() const { return fEdge1.Phi(); }
75  Double_t GetPhiMax() const { return fEdge2.Phi(); }
80  Double_t GetEtaGeo() const { return fCenterGeo.Eta(); }
85  Double_t GetEtaCM() const { return fCenterMass.Eta(); }
90  Double_t GetEtaMin() const { return fEdge2.Eta(); }
95  Double_t GetEtaMax() const { return fEdge1.Eta(); }
100  Double_t GetPatchE() const { return fCenterGeo.E(); }
105  Int_t GetADCAmp() const { return fADCAmp; }
110  Int_t GetADCOfflineAmp() const { return fADCOfflineAmp; }
115  Double_t GetADCAmpGeVRough() const { return (Double_t)fADCAmp * kEMCL1ADCtoGeV; }
120  Int_t GetTriggerBits() const { return fTriggerBits; }
125  Int_t GetEdgeCellX() const { return fEdgeCell[0]; }
130  Int_t GetEdgeCellY() const { return fEdgeCell[1]; }
131  void GetCellIndices( AliEMCALGeometry *geom, TArrayI *cells );
132 
137  Bool_t IsLevel0() const { return (Bool_t)((fTriggerBits >> (fOffSet + fTriggerBitConfig.GetLevel0Bit()))&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
142  Bool_t IsJetLow() const { return (Bool_t)((fTriggerBits >> (fOffSet + fTriggerBitConfig.GetJetLowBit()))&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
147  Bool_t IsJetHigh() const { return (Bool_t)((fTriggerBits >> (fOffSet + fTriggerBitConfig.GetJetHighBit()))&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
152  Bool_t IsGammaLow() const { return (Bool_t)((fTriggerBits >> (fOffSet + fTriggerBitConfig.GetGammaLowBit()))&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
157  Bool_t IsGammaHigh() const { return (Bool_t)((fTriggerBits >> (fOffSet + fTriggerBitConfig.GetGammaHighBit()))&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
162  Bool_t IsMainTrigger() const { return (Bool_t)((fTriggerBits >> kMainTriggerBitNum)&(!(fTriggerBits >> kSimpleOfflineBitNum))&1); }
192  Bool_t IsOfflineSimple() const { return (Bool_t)((fTriggerBits >> kSimpleOfflineBitNum)&1); }
193 
194  // Recalculated max patches
199  Bool_t IsRecalcJet() const { return (Bool_t) ((fTriggerBits >> kRecalcJetBitNum)&1); }
204  Bool_t IsRecalcGamma() const { return (Bool_t) ((fTriggerBits >> kRecalcGammaBitNum)&1); }
205 
211  void SetCenterGeo( TVector3 &v, Double_t e ) { SetLorentzVector( fCenterGeo, v, e ); }
216  void SetCenterGeo( TLorentzVector &v ) { fCenterGeo = v; }
221  void SetCenterMass( TLorentzVector &v ) { fCenterMass = v; }
227  void SetCenterMass( TVector3 &v, Double_t e ) { SetLorentzVector( fCenterMass, v, e ); }
232  void SetEdge1( TLorentzVector &v ) { fEdge1 = v; }
238  void SetEdge1( TVector3 &v, Double_t e ) { SetLorentzVector( fEdge1, v, e ); }
243  void SetEdge2( TLorentzVector &v ) { fEdge2 = v; }
249  void SetEdge2( TVector3 &v, Double_t e ) { SetLorentzVector( fEdge2, v, e ); }
254  void SetADCAmp( Int_t a ) { fADCAmp = a; }
259  void SetADCOfflineAmp( Int_t a ) { fADCOfflineAmp = a; }
265  void SetEdgeCell( Int_t x, Int_t y ) { fEdgeCell[0] = x; fEdgeCell[1] = y; }
270 
271  void SetLorentzVector( TLorentzVector &lv, TVector3 &v, Double_t e );
272 
277  void SetTriggerBits( Int_t i ) { fTriggerBits = i; }
278 
283  void SetOffSet(Int_t i) { fOffSet = i; }
284 
290 
296 
297 
298  protected:
299  //TLorentzVector &GetLorentzVector(const Double_t *vertex = 0) const;
300 
301  TLorentzVector fCenterGeo;
302  TLorentzVector fCenterMass;
303  TLorentzVector fEdge1;
304  TLorentzVector fEdge2;
305  Int_t fADCAmp;
307  Int_t fTriggerBits;
308  Int_t fEdgeCell[2];
309  Int_t fOffSet;
311 
313  ClassDef(AliEmcalTriggerPatchInfo, 6) // Emcal particle class
315 };
316 #endif
Trigger bit for recalculated jet patches.
Trigger bit indicating the main (highest energy) trigger patch of a given type per event...
Int_t fTriggerBits
trigger bit mask, see definitions in AliEmcalTriggerType and TriggerMakerBits_t (above) ...
void SetEdge2(TLorentzVector &v)
Trigger bit for recalculated gamma patches.
void SetEdge1(TLorentzVector &v)
void SetCenterMass(TVector3 &v, Double_t e)
AliEmcalTriggerPatchInfo & operator=(const AliEmcalTriggerPatchInfo &p)
Trigger bit indicating that the patch was created by the offline trigger algorithm.
TLorentzVector fCenterGeo
geometrical center
void GetCellIndices(AliEMCALGeometry *geom, TArrayI *cells)
void SetEdge1(TVector3 &v, Double_t e)
Main data structure storing all relevant information of EMCAL/DCAL trigger patches.
Int_t fOffSet
offset of bit (different in data and MC)
void SetEdgeCell(Int_t x, Int_t y)
void SetEdge2(TVector3 &v, Double_t e)
Manager for constants used in the trigger maker.
Int_t fADCAmp
online (trigger) ADC amplitude
AliEmcalTriggerBitConfig fTriggerBitConfig
Trigger bit configuration.
Definition of trigger bit configurations.
Definition of EMCAL trigger bit configurations.
void SetCenterMass(TLorentzVector &v)
static const Double_t kEMCL1ADCtoGeV
Conversion from EMCAL Level1 ADC to energy.
void SetTriggerBitConfig(const AliEmcalTriggerBitConfig *ref)
void SetCenterGeo(TLorentzVector &v)
void Initialise(const AliEmcalTriggerBitConfig &ref)
void SetLorentzVector(TLorentzVector &lv, TVector3 &v, Double_t e)
const AliEmcalTriggerBitConfig * GetTriggerBitConfig() const
TLorentzVector fEdge2
min eta/ max phi edge
TLorentzVector fEdge1
max eta/ min phi edge
Int_t fEdgeCell[2]
cell "bottom lower" edge (min phi, max eta)
Int_t fADCOfflineAmp
offline (FEE) ADC amplitude
void SetCenterGeo(TVector3 &v, Double_t e)