39 fDetectorType(kEMCALdet),
48 fCenterGeo(p.fCenterGeo),
49 fCenterMass(p.fCenterMass),
53 fADCOfflineAmp(p.fADCOfflineAmp),
54 fEnergySmeared(p.fEnergySmeared),
55 fTriggerBits(p.fTriggerBits),
59 fPatchSize(p.fPatchSize),
60 fDetectorType(p.fDetectorType),
61 fTriggerBitConfig(p.fTriggerBitConfig)
99 Int_t iSM = -1, iEta = -1, iPhi = -1;
124 Int_t iSM = -1, iEta = -1, iPhi = -1;
138 patch->
Initialize(col0, row0, size, adc, offlineAdc, patchE, bitmask, vertex, geom);
145 patch->
Initialize(col0, row0, size, adc, offlineAdc, bitmask, geom);
152 AliError(
"EMCal geometry pointer not set! Unable to recalculate the trigger patch kinematics!");
160 Int_t cellAbsId[4]={-1,-1,-1,-1};
162 if(cellAbsId[0] < 0 || cellAbsId[1] < 0 || cellAbsId[2] < 0 || cellAbsId[3] < 0){
163 AliWarning(Form(
"Invalid cell ID [%d|%d|%d|%d]\n", cellAbsId[0], cellAbsId[1], cellAbsId[2], cellAbsId[3]));
169 Int_t colEdge1 =
fCol0, rowEdge1 =
fRow0, absIdEdge1 = absId, cellIdEdge1 = cellAbsId[0];
179 Int_t colEdge2 =
fCol0+posOffset, rowEdge2 =
fRow0+posOffset, absIdEdge2 = absId, cellIdEdge2 = cellAbsId[3];
198 TVector3 centerGeo(center1);
199 centerGeo += center2;
203 TVector3 edge1tmp = edge1, edge2tmp = edge2;
208 if(!(edge1[0] || edge1[1] || edge1[2])){
209 AliWarning(Form(
"Inconsistency in patch position for edge1: [%f|%f|%f]", edge1[0], edge1[1], edge1[2]));
211 AliWarning(Form(
"edge1: [%f|%f|%f]", edge1tmp[0], edge1tmp[1], edge1tmp[2]));
212 AliWarning(Form(
"vertex: [%f|%f|%f]", vertex[0], vertex[1], vertex[2]));
213 AliWarning(Form(
"Col: %d, Row: %d, FABSID: %d, Cell: %d", colEdge1, rowEdge1, absIdEdge1, cellIdEdge1));
215 if(!(edge2[0] || edge2[1] || edge2[2])){
216 AliWarning(Form(
"Inconsistency in patch position for edge2: [%f|%f|%f]", edge2[0], edge2[1], edge2[2]));
218 AliWarning(Form(
"edge2: [%f|%f|%f]", edge2tmp[0], edge2tmp[1], edge2tmp[2]));
219 AliWarning(Form(
"vertex: [%f|%f|%f]", vertex[0], vertex[1], vertex[2]));
220 AliWarning(Form(
"Col: %d, Row: %d, FABSID: %d, Cell: %d", colEdge2, rowEdge2, absIdEdge2, cellIdEdge2));
232 Int_t globCol, globRow, i, j, k, absId, cellAbsId[4];;
247 for( i = 0; i < 16; i++ ){
248 for( j = 0; j < 16; j++ ){
253 for( k = 0; k < 4; k++ ){
254 cells->SetAt( cellAbsId[k], i*16*4+j*4+k );
264 Double_t r = TMath::Sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2] ) ;
266 lv.SetPxPyPzE( e*v[0]/r, e*v[1]/r, e*v[2]/r, e) ;
270 if(phiin < 0)
return phiin + TMath::TwoPi();
UChar_t fPatchSize
Trigger patch size.
static AliEMCALTriggerPatchInfo * CreateAndInitialize(UChar_t col0, UChar_t row0, UChar_t size, UInt_t adc, UInt_t offlineAdc, Double_t patchE, UInt_t bitmask, const TVector3 &vertex, const AliEMCALGeometry *geom)
void SetEdgeCell(Int_t x, Int_t y)
Int_t fADCOfflineAmp
offline (FEE) ADC amplitude
void GetCellIndices(AliEMCALGeometry *geom, TArrayI *cells)
TLorentzVector fCenterGeo
geometrical center
void SetEdge1(const TLorentzVector &v)
Int_t GetEdgeCellY() const
Bool_t GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t &iSM, Int_t &iEta, Int_t &iPhi) const
#define AliWarning(message)
void SetCenterGeo(const TVector3 &v, Double_t e)
TLorentzVector fCenterMass
CM.
virtual ~AliEMCALTriggerPatchInfo()
void SetEdge2(const TLorentzVector &v)
AliEMCALTriggerPatchInfo & operator=(const AliEMCALTriggerPatchInfo &p)
void Initialize(UChar_t col0, UChar_t row0, UChar_t size, UInt_t adc, UInt_t offlineAdc, Double_t patchE, UInt_t bitmask, const TVector3 &vertex, const AliEMCALGeometry *geom)
void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const
void RecalculateKinematics(Double_t patchE, const TVector3 &vertex, const AliEMCALGeometry *geom)
Int_t GetEdgeCellX() const
Double_t GetET(Double_t energy) const
Int_t fADCAmp
online (trigger) ADC amplitude
Main data structure storing all relevant information of EMCAL/DCAL trigger patches.
void SetLorentzVector(TLorentzVector &lv, const TVector3 &v, Double_t e)
AliEMCALTriggerPatchInfo()
Bool_t GetCellIndexFromFastORIndex(const Int_t id, Int_t idx[4]) const
Int_t fTriggerBits
trigger bit mask, see definitions in AliEMCALTriggerType and TriggerMakerBits_t (above) ...
void SetDetectorType(CaloDetectorType_t t)
Bool_t GetAbsFastORIndexFromPositionInEMCAL(const Int_t iEta, const Int_t iPhi, Int_t &id) const
Bool_t IsDCALSM(Int_t nSupMod) const
Double_t GetPhiTransform(Double_t phiin) const
Int_t fEdgeCell[2]
cell "bottom lower" edge (min phi, max eta)
#define AliError(message)
EMCal geometry, singleton.