//____________________________________________________________________________
AliEMCALTrigger::~AliEMCALTrigger() {
+
+ //dtor
+
if(GetTimeKey()) {
delete [] fADCValuesHighnxn;
delete [] fADCValuesLownxn;
//____________________________________________________________________________
void AliEMCALTrigger::Trigger()
{
- TH1::AddDirectory(0);
//Main Method to select triggers.
+ TH1::AddDirectory(0);
+
AliRunLoader *runLoader = AliRunLoader::Instance();
AliEMCALLoader *emcalLoader = 0;
if(runLoader) {
}
//____________________________________________________________________________
-void AliEMCALTrigger::GetTriggerInfo(TArrayF &triggerPosition, TArrayF &triggerAmplitudes)
+void AliEMCALTrigger::GetTriggerInfo(TArrayF &triggerPosition, TArrayF &triggerAmplitudes) const
{
// Template - should be defined; Nov 5, 2007
triggerPosition[0] = 0.;
//____________________________________________________________________________
void AliEMCALTrigger::PrintAmpTruMatrix(Int_t ind) const
{
+ // Print matrix with TRU patches
TMatrixD * tru = dynamic_cast<TMatrixD *>(fAmpTrus->At(ind));
if(tru == 0) return;
AliInfo(Form("\n #### Amp TRU matrix(%i) : (%i,%i) ##### \n ",
//____________________________________________________________________________
void AliEMCALTrigger::PrintAmpSmMatrix(Int_t ind) const
{
- TMatrixD * sm = dynamic_cast<TMatrixD *>(fAmpSMods->At(ind));
+ // Print matrix with SM amplitudes
+ TMatrixD * sm = dynamic_cast<TMatrixD *>(fAmpSMods->At(ind));
if(sm == 0) return;
AliInfo(Form("\n #### Amp SM matrix(%i) : (%i,%i) ##### \n ",
ind, sm->GetNrows(), sm->GetNcols()));
//____________________________________________________________________________
void AliEMCALTrigger::PrintMatrix(const TMatrixD &mat) const
{
+ //Print matrix object
for(Int_t col=0; col<mat.GetNcols(); col++) AliInfo(Form(" %3i ", col));
AliInfo(Form("\n -- \n"));
for(Int_t row=0; row<mat.GetNrows(); row++) {
//____________________________________________________________________________
Bool_t AliEMCALTrigger::CheckConsistentOfMatrixes(const Int_t pri)
{
+ // Check consitency of matrices
Double_t sumSM = 0.0, smCur=0.0;
Double_t sumTru=0.0, sumTruInSM = 0.0, truSum=0.0;
// Bool_t key = kTRUE;
}
}
Double_t sumJetMat = fAmpJetMatrix->Sum();
- if(pri || sumSM != sumTru || sumSM != sumJetMat)
+ if(pri || TMath::Abs(sumSM-sumTru)>0.0001 || TMath::Abs(sumSM-sumJetMat) > 0.0001)
AliDebug(1,Form(" sumSM %f : sumTru %f : sumJetMat %f \n", sumSM, sumTru, sumJetMat));
- if(sumSM != sumTru || sumSM != sumJetMat) return kFALSE;
+ if(TMath::Abs(sumSM - sumTru)>0.0001 || TMath::Abs(sumSM-sumJetMat) > 0.0001) return kFALSE;
else return kTRUE;
}
//____________________________________________________________________________
void AliEMCALTrigger::Browse(TBrowser* b)
{
+ //Browse.
if(&fInputs) b->Add(&fInputs);
if(fAmpTrus) b->Add(fAmpTrus);
if(fTimeRtrus) b->Add(fTimeRtrus);
-#ifndef ALIEMCALTrigger_H
-#define ALIEMCALTrigger_H
+#ifndef ALIEMCALTRIGGER_H
+#define ALIEMCALTRIGGER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
Int_t Get2x2SuperModule() const { return f2x2SM ; }
Int_t GetnxnSuperModule() const { return fnxnSM ; }
- Int_t * GetADCValuesLowGainMax2x2Sum() { return fADCValuesLow2x2; }
- Int_t * GetADCValuesHighGainMax2x2Sum() { return fADCValuesHigh2x2; }
- Int_t * GetADCValuesLowGainMaxnxnSum() { return fADCValuesLownxn; }
- Int_t * GetADCValuesHighGainMaxnxnSum() { return fADCValuesHighnxn; }
+ Int_t * GetADCValuesLowGainMax2x2Sum() const { return fADCValuesLow2x2; }
+ Int_t * GetADCValuesHighGainMax2x2Sum() const { return fADCValuesHigh2x2; }
+ Int_t * GetADCValuesLowGainMaxnxnSum() const { return fADCValuesLownxn; }
+ Int_t * GetADCValuesHighGainMaxnxnSum() const { return fADCValuesHighnxn; }
- Float_t GetL0Threshold() const { return fL0Threshold ; }
+ Float_t GetL0Threshold() const { return fL0Threshold ; }
Float_t GetL1GammaLowPtThreshold() const { return fL1GammaLowPtThreshold ; }
Float_t GetL1GammaMediumPtThreshold() const { return fL1GammaMediumPtThreshold ; }
Float_t GetL1GammaHighPtThreshold() const { return fL1GammaHighPtThreshold ; }
TH2F* GetJetMatrixE() const { return fJetMatrixE;}
Double_t GetEmcalSumAmp() const;
- Int_t GetNJetThreshold() const {return fNJetThreshold;}
- Double_t* GetL1JetThresholds() {return fL1JetThreshold;}
- TMatrixD GetAmpJetMax() const {return fAmpJetMax;}
+ Int_t GetNJetThreshold() const {return fNJetThreshold;}
+ Double_t* GetL1JetThresholds() const {return fL1JetThreshold;}
+ TMatrixD GetAmpJetMax() const {return fAmpJetMax;}
void PrintJetMatrix() const; // *MENU*
void PrintAmpTruMatrix(Int_t ind) const; // *MENU*
// Name of Jet trigger(s)
Char_t* GetNameOfJetTrigger(const Int_t i) {return Form("%s_Th_%2.2i",fgNameOfJetTriggers.Data(),i);}
static TString GetNameOfJetTriggers() {return fgNameOfJetTriggers;}
- static TString fgNameOfJetTriggers;
+ static TString fgNameOfJetTriggers; //Name of jet triggers
// Estimation on EMCal energy from VZERO multiplicity
// 0.0153 is coefficient from adc to energy
// Dec 4, 2007
const Int_t supermod, TMatrixD &max2, TMatrixD &maxn) ;
void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD &max2, const TMatrixD &maxn) ;
- void GetTriggerInfo(TArrayF &triggerPosition, TArrayF &triggerAmplitudes);
+ void GetTriggerInfo(TArrayF &triggerPosition, TArrayF &triggerAmplitudes) const;
// Jet staff
- void FillJetMatrixFromSMs(TClonesArray *ampmatrixsmod, TMatrixD* jetMat, AliEMCALGeometry *g);
+ void FillJetMatrixFromSMs(TClonesArray *ampmatrixsmod, TMatrixD * const jetMat, AliEMCALGeometry * const g);
// no timing information here
void MakeSlidingPatch(const TMatrixD &jm, const Int_t nPatchSize, TMatrixD &JetMax);
// 1 means a patch around max amplitude of 2x2 of 4x4 and around
// max ampl patch of 4x4 of 8x8
- Float_t f2x2AmpOutOfPatch; // Amplitude in isolation cone minus maximum amplitude of the reference patch
- Float_t fnxnAmpOutOfPatch;
+ Float_t f2x2AmpOutOfPatch; // Amplitude in isolation cone minus maximum amplitude of the reference 2x2 patch
+ Float_t fnxnAmpOutOfPatch; // Amplitude in isolation cone minus maximum amplitude of the reference nxn patch
Float_t f2x2AmpOutOfPatchThres; // Threshold to select a trigger as isolated on f2x2AmpOutOfPatch value
- Float_t fnxnAmpOutOfPatchThres;
- Float_t fIs2x2Isol; // Patch is isolated if f2x2AmpOutOfPatchThres threshold is passed
- Float_t fIsnxnIsol ;
+ Float_t fnxnAmpOutOfPatchThres; // Threshold to select a trigger as isolated on fnxnAmpOutOfPatch value
+ Float_t fIs2x2Isol; // 2x2 Patch is isolated if f2x2AmpOutOfPatchThres threshold is passed
+ Float_t fIsnxnIsol ; // nxn Patch is isolated if fnxnAmpOutOfPatchThres threshold is passed
+
Bool_t fSimulation ; // Flag to do the trigger during simulation or reconstruction
Bool_t fIsolateInSuperModule; // Flag to isolate trigger patch in SuperModule or in TRU acceptance
TClonesArray *fTimeRtrus; //! Array of recent times (unused now)
TClonesArray *fAmpSMods; //! Array of amplides of SM matrixes
// Information for EMCAL ESD
- TArrayF fTriggerPosition; //
- TArrayF fTriggerAmplitudes; //
+ TArrayF fTriggerPosition; // Triggered patch position
+ TArrayF fTriggerAmplitudes; // Triggered patch amplitude
// Jet staf
Int_t fNJetPatchPhi; // size of jet pathch in phi(row) direction (nJetPatchPhi*4 module)
Int_t fNJetPatchEta; // size of jet pathch in eta(column) direction (nJetPatchEta*4 module)
} ;
-#endif //ALIEMCALTrigger_H
+#endif //ALIEMCALTRIGGER_H