AliPhysics  9e28f8c (9e28f8c)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaCaloChannelAnalysis Class Reference

Analyses cell properties and identifies bad cells. More...

#include <AliAnaCaloChannelAnalysis.h>

Inheritance diagram for AliAnaCaloChannelAnalysis:

Public Member Functions

 AliAnaCaloChannelAnalysis ()
 
virtual ~AliAnaCaloChannelAnalysis ()
 
 AliAnaCaloChannelAnalysis (TString period, TString pass, TString trigger, Int_t runNumber)
 
void Run ()
 
void SetExternalMergedFile (TString inputName)
 
void SetInputFileList (TString inputName)
 
void SetWorkDir (TString inputName)
 
void SetNTrial (Int_t inputNr)
 
void AddPeriodAnalysis (Int_t criteria, Double_t nsigma, Double_t emin, Double_t emax)
 

Protected Member Functions

void Init ()
 
TString Convert ()
 
void BCAnalysis ()
 
void PeriodAnalysis (Int_t criterum=7, Double_t nsigma=4.0, Double_t emin=0.1, Double_t emax=2.0)
 
TH1F * BuildHitAndEnergyMean (Int_t crit, Double_t emin=0.1, Double_t emax=2., Double_t nsigma=4.)
 
TH1F * BuildTimeMean (Int_t crit, Double_t emin, Double_t emax, Double_t nsigma)
 Possibility to add this check too, if the time if calibrated. More...
 
void TestCellShapes (Int_t crit, Double_t fitemin, Double_t fitemax, Double_t nsigma=4.)
 
void FlagAsDead ()
 
void FlagAsBad (Int_t crit, TH1 *inhisto, Double_t nsigma=4., Int_t dnbins=200, Double_t dmaxval=-1.)
 
void SummarizeResults ()
 
TH1 * BuildMeanFromGood ()
 
Bool_t CheckDistribution (TH1 *ratio, TH1 *reference)
 
void SaveBadCellsToPDF (Int_t version, TString pdfName)
 
void PlotFlaggedCells2D (Int_t flag1, Int_t flag2=-1, Int_t flag3=-1)
 Plots a 2D map of flagged cells, Dead, Bad, Good. More...
 

Protected Attributes

Int_t fCurrentRunNumber
 A run number of an analyzed period. This is important for the AliCalorimeterUtils initialization. More...
 
TString fPeriod
 The name of the analyzed period. More...
 
TString fPass
 Pass of the analyzed data. More...
 
TString fTrigger
 Selected trigger for the analysis. More...
 
Int_t fNoOfCells
 Number of cells in EMCal and DCal. More...
 
Int_t fCellStartDCal
 ID of the first cell in the DCal. More...
 
TString fMergeOutput
 Here the merged files of a period are saved for a later analysis. More...
 
TString fAnalysisOutput
 The list with bad channels and histograms are saved in this folder. More...
 
TString fAnalysisInput
 Here the .root files of each run of the period are saved. More...
 
TString fRunList
 Thats the full path and name of the file which contains a list of all runs to be merged together. More...
 
TString fQADirect
 Dierctory in the QA.root files where the input histograms are stored. More...
 
TString fMergedFileName
 Filename of the .root file containing the merged runs. More...
 
std::vector< TArrayD > fAnalysisVector
 Vector of analysis information. Each place is filled with 4 doubles: version, sigma, lower, and upper energy range. More...
 
TString fRunListFileName
 This is the name of the file with the run numbers to be merged, by default it's 'runList.txt'. More...
 
TString fWorkdir
 Directory which contains the folders fMergeOutput, fAnalysisInput and fAnalysisOutput. By default it is './'. More...
 
Int_t fTrial
 Number of trial that this specific analyis is. By default '0'. More...
 
TString fExternalFileName
 If you have already a file that contains many runs merged together you can place it in fMergeOutput and set it with SetExternalMergedFile(FileName) More...
 
Int_t * fFlag
 ! fFlag[CellID] = 0 (ok),1 (dead),2 (bad by lower),3 (bad by upper) start at 0 (cellID 0 = histobin 1) More...
 
Int_t fNMaxCols
 Maximum No of colums in module (eta direction) More...
 
Int_t fNMaxRows
 Maximum No of rows in module (phi direction) More...
 
Int_t fNMaxColsAbs
 Maximum No of colums in Calorimeter. More...
 
Int_t fNMaxRowsAbs
 Maximum No of rows in Calorimeter. More...
 
AliCalorimeterUtilsfCaloUtils
 ! Calorimeter information for the investigated runs More...
 

Private Member Functions

 AliAnaCaloChannelAnalysis (const AliAnaCaloChannelAnalysis &)
 
AliAnaCaloChannelAnalysisoperator= (const AliAnaCaloChannelAnalysis &)
 

Detailed Description

Analyses cell properties and identifies bad cells.

This is used for bad channel identification in EMCal and DCal. The class builds a mean distribution of certain cell observables and compares single cell properties to this mean. That way bad channels (far off the mean) are identified and flagged. A .pdf file with their spectra is created. This should be cross checked by hand.

Author
Eliane Epple elian.nosp@m.e.ep.nosp@m.ple@y.nosp@m.ale..nosp@m.edu, Yale Univeristy
Chiara Bianchin chiar.nosp@m.a.bi.nosp@m.anchi.nosp@m.n@ce.nosp@m.rn.ch, Wein University based on the work from
Alexis Mas alexi.nosp@m.mas@.nosp@m.if.us.nosp@m.p.br & M. Germain Marie.nosp@m..Ger.nosp@m.main@.nosp@m.suba.nosp@m.tech..nosp@m.in2p.nosp@m.3.fr, SUBATECH which is in turn based on getCellsRunQA.C from
Olga Driga, SUBATECH
Date
Jun 24, 2016

Definition at line 41 of file AliAnaCaloChannelAnalysis.h.

Constructor & Destructor Documentation

AliAnaCaloChannelAnalysis::AliAnaCaloChannelAnalysis ( )

Default constructor

Definition at line 54 of file AliAnaCaloChannelAnalysis.cxx.

virtual AliAnaCaloChannelAnalysis::~AliAnaCaloChannelAnalysis ( )
inlinevirtual

Definition at line 46 of file AliAnaCaloChannelAnalysis.h.

AliAnaCaloChannelAnalysis::AliAnaCaloChannelAnalysis ( TString  period,
TString  pass,
TString  trigger,
Int_t  RunNumber 
)

Constructor

Definition at line 74 of file AliAnaCaloChannelAnalysis.cxx.

AliAnaCaloChannelAnalysis::AliAnaCaloChannelAnalysis ( const AliAnaCaloChannelAnalysis )
private

Member Function Documentation

void AliAnaCaloChannelAnalysis::AddPeriodAnalysis ( Int_t  criteria,
Double_t  nsigma,
Double_t  emin,
Double_t  emax 
)

Set period analysis parameters

Parameters
criteria– selection criteria (?)
nsigma– n sigma cut
emin– minimum energy
emax– maximum energy

Definition at line 382 of file AliAnaCaloChannelAnalysis.cxx.

void AliAnaCaloChannelAnalysis::BCAnalysis ( )
protected

Configure a complete analysis with different criteria, it provides bad+dead cells lists You can manage criteria used and their order, the first criteria will use the original output file from AliAnalysisTaskCaloCellsQA task,

Definition at line 342 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by Run().

TH1F * AliAnaCaloChannelAnalysis::BuildHitAndEnergyMean ( Int_t  crit,
Double_t  emin = 0.1,
Double_t  emax = 2.,
Double_t  nsigma = 4. 
)
protected

Average hit per event and the average energy per hit is caluclated for each cell.

Definition at line 503 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by PeriodAnalysis().

TH1 * AliAnaCaloChannelAnalysis::BuildMeanFromGood ( )
protected

Definition at line 1174 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by SaveBadCellsToPDF().

TH1F * AliAnaCaloChannelAnalysis::BuildTimeMean ( Int_t  crit,
Double_t  emin,
Double_t  emax,
Double_t  nsigma 
)
protected

Possibility to add this check too, if the time if calibrated.

Definition at line 550 of file AliAnaCaloChannelAnalysis.cxx.

Bool_t AliAnaCaloChannelAnalysis::CheckDistribution ( TH1 *  ratio,
TH1 *  reference 
)
protected

Definition at line 1198 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by SaveBadCellsToPDF().

TString AliAnaCaloChannelAnalysis::Convert ( )
protected

Creates one file for the analysis from several QA output files listed in runlist.txt.

Definition at line 199 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by Run().

void AliAnaCaloChannelAnalysis::FlagAsBad ( Int_t  crit,
TH1 *  inhisto,
Double_t  nsigma = 4.,
Int_t  dnbins = 200,
Double_t  dmaxval = -1. 
)
protected

1) create a distribution for the input histogram; 2) fit the distribution with a gaussian; 3) define good area within +-nsigma to identfy badcells.

Parameters
pflag– flag with channel criteria to be filled
inhisto– input histogram;
dnbins– number of bins in distribution;
dmaxval– maximum value on distribution histogram.

Definition at line 740 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by PeriodAnalysis().

void AliAnaCaloChannelAnalysis::FlagAsDead ( )
protected

– This function finds cells with zero entries It flags them by setting the fFlag content of the cell to 1.

Definition at line 695 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by BCAnalysis().

void AliAnaCaloChannelAnalysis::Init ( )
protected

Init default parameters

Definition at line 94 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by AliAnaCaloChannelAnalysis().

AliAnaCaloChannelAnalysis& AliAnaCaloChannelAnalysis::operator= ( const AliAnaCaloChannelAnalysis )
private
void AliAnaCaloChannelAnalysis::PeriodAnalysis ( Int_t  criterum = 7,
Double_t  nsigma = 4.0,
Double_t  emin = 0.1,
Double_t  emax = 2.0 
)
protected

Definition at line 404 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by BCAnalysis().

void AliAnaCaloChannelAnalysis::PlotFlaggedCells2D ( Int_t  flag1,
Int_t  flag2 = -1,
Int_t  flag3 = -1 
)
protected

Plots a 2D map of flagged cells, Dead, Bad, Good.

Definition at line 1237 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by SummarizeResults().

void AliAnaCaloChannelAnalysis::Run ( )

Main execution method.

First use Convert() to merge historgrams from a runlist .txt file. The merged outputfile contains 3 different histograms. In a second step analyse these merged histograms by calling BCAnalysis().

Definition at line 161 of file AliAnaCaloChannelAnalysis.cxx.

void AliAnaCaloChannelAnalysis::SaveBadCellsToPDF ( Int_t  version,
TString  pdfName 
)
protected

Allow to produce a pdf file with badcells candidates (red) compared to a refence cell (black).

Definition at line 1067 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by SummarizeResults().

void AliAnaCaloChannelAnalysis::SetExternalMergedFile ( TString  inputName)
inline

Definition at line 52 of file AliAnaCaloChannelAnalysis.h.

void AliAnaCaloChannelAnalysis::SetInputFileList ( TString  inputName)
inline

Definition at line 53 of file AliAnaCaloChannelAnalysis.h.

void AliAnaCaloChannelAnalysis::SetNTrial ( Int_t  inputNr)
inline

Definition at line 55 of file AliAnaCaloChannelAnalysis.h.

void AliAnaCaloChannelAnalysis::SetWorkDir ( TString  inputName)
inline

Definition at line 54 of file AliAnaCaloChannelAnalysis.h.

void AliAnaCaloChannelAnalysis::SummarizeResults ( )
protected

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1) summarize all dead and bad cells in a text file .. 2) plot all bad cell E distributions in a .pdf file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Definition at line 951 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by BCAnalysis().

void AliAnaCaloChannelAnalysis::TestCellShapes ( Int_t  crit,
Double_t  fitemin,
Double_t  fitemax,
Double_t  nsigma = 4. 
)
protected

ELI this method is currently not used Test cells shape using fit function f(x)=A*exp(-B*x)/x^2. Produce values per cell + distributions for A,B and chi2/ndf parameters.

Definition at line 561 of file AliAnaCaloChannelAnalysis.cxx.

Referenced by PeriodAnalysis().

Member Data Documentation

TString AliAnaCaloChannelAnalysis::fAnalysisInput
protected

Here the .root files of each run of the period are saved.

Definition at line 95 of file AliAnaCaloChannelAnalysis.h.

Referenced by Convert(), and Init().

TString AliAnaCaloChannelAnalysis::fAnalysisOutput
protected

The list with bad channels and histograms are saved in this folder.

Definition at line 94 of file AliAnaCaloChannelAnalysis.h.

Referenced by FlagAsBad(), Init(), PeriodAnalysis(), PlotFlaggedCells2D(), and SummarizeResults().

std::vector<TArrayD> AliAnaCaloChannelAnalysis::fAnalysisVector
protected

Vector of analysis information. Each place is filled with 4 doubles: version, sigma, lower, and upper energy range.

Definition at line 101 of file AliAnaCaloChannelAnalysis.h.

Referenced by AddPeriodAnalysis(), BCAnalysis(), and Init().

AliCalorimeterUtils* AliAnaCaloChannelAnalysis::fCaloUtils
protected

! Calorimeter information for the investigated runs

Definition at line 119 of file AliAnaCaloChannelAnalysis.h.

Referenced by FlagAsBad(), Init(), and PlotFlaggedCells2D().

Int_t AliAnaCaloChannelAnalysis::fCellStartDCal
protected

ID of the first cell in the DCal.

Definition at line 90 of file AliAnaCaloChannelAnalysis.h.

Referenced by FlagAsBad(), Init(), and SummarizeResults().

Int_t AliAnaCaloChannelAnalysis::fCurrentRunNumber
protected

A run number of an analyzed period. This is important for the AliCalorimeterUtils initialization.

Definition at line 85 of file AliAnaCaloChannelAnalysis.h.

Referenced by AliAnaCaloChannelAnalysis(), and Init().

TString AliAnaCaloChannelAnalysis::fExternalFileName
protected

If you have already a file that contains many runs merged together you can place it in fMergeOutput and set it with SetExternalMergedFile(FileName)

Definition at line 107 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init(), and Run().

Int_t* AliAnaCaloChannelAnalysis::fFlag
protected

! fFlag[CellID] = 0 (ok),1 (dead),2 (bad by lower),3 (bad by upper) start at 0 (cellID 0 = histobin 1)

Definition at line 110 of file AliAnaCaloChannelAnalysis.h.

Referenced by BuildHitAndEnergyMean(), BuildMeanFromGood(), FlagAsBad(), FlagAsDead(), Init(), PeriodAnalysis(), PlotFlaggedCells2D(), SaveBadCellsToPDF(), and SummarizeResults().

TString AliAnaCaloChannelAnalysis::fMergedFileName
protected

Filename of the .root file containing the merged runs.

Definition at line 100 of file AliAnaCaloChannelAnalysis.h.

Referenced by BCAnalysis(), Convert(), Init(), Run(), and SummarizeResults().

TString AliAnaCaloChannelAnalysis::fMergeOutput
protected

Here the merged files of a period are saved for a later analysis.

Definition at line 93 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init(), and Run().

Int_t AliAnaCaloChannelAnalysis::fNMaxCols
protected

Maximum No of colums in module (eta direction)

Definition at line 113 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init().

Int_t AliAnaCaloChannelAnalysis::fNMaxColsAbs
protected

Maximum No of colums in Calorimeter.

Definition at line 115 of file AliAnaCaloChannelAnalysis.h.

Referenced by FlagAsBad(), Init(), and PlotFlaggedCells2D().

Int_t AliAnaCaloChannelAnalysis::fNMaxRows
protected

Maximum No of rows in module (phi direction)

Definition at line 114 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init().

Int_t AliAnaCaloChannelAnalysis::fNMaxRowsAbs
protected

Maximum No of rows in Calorimeter.

Definition at line 116 of file AliAnaCaloChannelAnalysis.h.

Referenced by FlagAsBad(), Init(), and PlotFlaggedCells2D().

Int_t AliAnaCaloChannelAnalysis::fNoOfCells
protected
TString AliAnaCaloChannelAnalysis::fPass
protected

Pass of the analyzed data.

Definition at line 87 of file AliAnaCaloChannelAnalysis.h.

Referenced by AliAnaCaloChannelAnalysis(), Convert(), Init(), and SummarizeResults().

TString AliAnaCaloChannelAnalysis::fPeriod
protected

The name of the analyzed period.

Definition at line 86 of file AliAnaCaloChannelAnalysis.h.

Referenced by AliAnaCaloChannelAnalysis(), Convert(), Init(), and SummarizeResults().

TString AliAnaCaloChannelAnalysis::fQADirect
protected

Dierctory in the QA.root files where the input histograms are stored.

Definition at line 99 of file AliAnaCaloChannelAnalysis.h.

Referenced by Convert(), and Init().

TString AliAnaCaloChannelAnalysis::fRunList
protected

Thats the full path and name of the file which contains a list of all runs to be merged together.

Definition at line 96 of file AliAnaCaloChannelAnalysis.h.

Referenced by Convert(), and Init().

TString AliAnaCaloChannelAnalysis::fRunListFileName
protected

This is the name of the file with the run numbers to be merged, by default it's 'runList.txt'.

Definition at line 104 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init().

Int_t AliAnaCaloChannelAnalysis::fTrial
protected

Number of trial that this specific analyis is. By default '0'.

Definition at line 106 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init(), and SummarizeResults().

TString AliAnaCaloChannelAnalysis::fTrigger
protected

Selected trigger for the analysis.

Definition at line 88 of file AliAnaCaloChannelAnalysis.h.

Referenced by AliAnaCaloChannelAnalysis(), Convert(), and Init().

TString AliAnaCaloChannelAnalysis::fWorkdir
protected

Directory which contains the folders fMergeOutput, fAnalysisInput and fAnalysisOutput. By default it is './'.

Definition at line 105 of file AliAnaCaloChannelAnalysis.h.

Referenced by Init().


The documentation for this class was generated from the following files: