AliPhysics  1168478 (1168478)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaCaloChannelAnalysis.h
Go to the documentation of this file.
1 #ifndef ALIANACALOCHANNELANALYSIS_H
2 #define ALIANACALOCHANNELANALYSIS_H
3 
22 
23 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
24  * See cxx source for full Copyright notice
25 */
26 
27 
28 #include <Riostream.h>
29 #include <TString.h>
30 #include <TArrayD.h>
31 
32 class TH1;
33 class TH1F;
34 class TH1D;
35 class TH2F;
36 class TFile;
37 class TList;
38 
40 
41 
43 
44 public:
45  AliAnaCaloChannelAnalysis() ; // default ctor
46  virtual ~AliAnaCaloChannelAnalysis() { ; } // virtual dtor
47  AliAnaCaloChannelAnalysis(TString period, TString train, TString trigger, Int_t runNumber,Int_t trial, TString workDir, TString listName);
48 
49  void Run(Bool_t mergeOnly=0);
50 
51  //Setters
52  void SetExternalMergedFile(TString inputName) {fExternalFileName = inputName;}
53  void SetQAChecks(Bool_t inputBool) {fTestRoutine = inputBool;}
54  void SetPrintOutput(Bool_t inputBool) {fPrint = inputBool;}
55  void SetStartEndCell(Int_t start, Int_t end) {fStartCell = start; fNoOfCells = end;}
56  void AddManualMasking(std::vector<Int_t> cellVector) {fManualMask.swap(cellVector) ;}
57  void AddPeriodAnalysis(Int_t criteria, Double_t nsigma, Double_t emin, Double_t emax);
58 
59 
60 protected:
61 
62  void Init();
64  void BCAnalysis();
65  void PeriodAnalysis(Int_t criterum=7, Double_t nsigma = 4.0, Double_t emin=0.1, Double_t emax=2.0);
66 
67  TH1F* BuildHitAndEnergyMean(Int_t crit, Double_t emin = 0.1, Double_t emax=2.);
68  TH1F* BuildTimeMean(Int_t crit, Double_t tmin, Double_t tmax);
69 
70  void FlagAsDead();
71  void FlagAsBad(Int_t crit, TH1F* inhisto, Double_t nsigma = 4., Double_t dnbins = 200);
72 
74  void SummarizeResults();
75  TH1D *BuildMeanFromGood(Int_t warmIn=0);
76  Bool_t CheckDistribution(TH1* ratio, TH1* reference);
77  Bool_t IsCoveredByTRD(Int_t row, Int_t collumn);
78  void SaveBadCellsToPDF(Int_t version, TString pdfName);
79  void PlotFlaggedCells2D(Int_t flagBegin,Int_t flagEnd=-1);
80  void SaveHistoToFile();
81 
82  //Test Test
83  //Settings for analysed period
91 
92  //Genergal paths
98 
99  //
102  std::vector<TArrayD> fAnalysisVector;
103 
104  //Things to be individualized by setters
109 
110  //histogram settings
115 
116  //arrays to store information
121  std::vector<Int_t> fManualMask;
122 
123  //Calorimeter information for the investigated runs
125 
126  TFile* fRootFile;
130  TH1F* fhCellFlag;
131  TH1F* fhCellWarm;
132 
137 
138 private:
139  AliAnaCaloChannelAnalysis (const AliAnaCaloChannelAnalysis&); // not implemented
141 
144 
145 
147  ClassDef(AliAnaCaloChannelAnalysis, 1);
149 };
150 #endif
TH1F * BuildTimeMean(Int_t crit, Double_t tmin, Double_t tmax)
void AddManualMasking(std::vector< Int_t > cellVector)
double Double_t
Definition: External.C:58
Definition: External.C:236
void AddPeriodAnalysis(Int_t criteria, Double_t nsigma, Double_t emin, Double_t emax)
TH2F * fCellTime
! possible histogram for the analysis. Cell ID vs. time, read from the input merged file ...
Int_t fNMaxRows
Maximum No of rows in module (phi direction)
Int_t fTrial
Number of trial that this specific analyis is. By default '0' so one can try different settings witho...
TH1F * fAvgEngPerHitVsCellId
! being discussed
TFile * fRootFile
! root file with all histograms from this analysis
AliAnaCaloChannelAnalysis & operator=(const AliAnaCaloChannelAnalysis &)
std::vector< TArrayD > fAnalysisVector
Vector of analysis information. Each place is filled with 4 doubles: version, sigma, lower, and upper energy range.
TH1F * fProcessedEvents
! Stores the number of events in the run
Int_t fNoOfCells
Number of cells in EMCal and DCal.
AliCalorimeterUtils * fCaloUtils
! Calorimeter information for the investigated runs
Int_t fCellStartDCal
ID of the first cell in the DCal.
void SetQAChecks(Bool_t inputBool)
Int_t * fFlag
! fFlag[CellID] = 0 (ok),1 (dead),2 and higher (bad certain criteria) start at 0 (cellID 0 = histobin...
Int_t fNMaxCols
Maximum No of colums in module (eta direction)
Int_t fCriterionCounter
! This value will be written in fflag and updates after each PeriodAnalysis, to distinguish the steps...
TString fMergedFileName
Filename of the .root file containing the merged runs.
int Int_t
Definition: External.C:63
TList * fOutputListBadRatio
! list with bad channel amplitude ratios, stored in fRootFile
TH1F * BuildHitAndEnergyMean(Int_t crit, Double_t emin=0.1, Double_t emax=2.)
TString fAnalysisInput
Here the .root files of each run of the period are saved.
void SetStartEndCell(Int_t start, Int_t end)
std::vector< Int_t > fManualMask
! Is a list of cells that should be addidionally masked by hand.
TString fQADirect
Dierctory in the QA.root files where the input histograms are stored.
Bool_t * fWarmCell
! fWarmCell[CellID] = 0 (really bad), fWarmCell[CellID] = 1 (candidate for warm), ...
Definition: External.C:212
TString fWorkdir
Directory which contains the folders fMergeOutput, fAnalysisInput and fAnalysisOutput. By default it is './'.
void SetPrintOutput(Bool_t inputBool)
TList * fOutputListBad
! list with bad channel amplitudes, stored in fRootFile
Bool_t IsCoveredByTRD(Int_t row, Int_t collumn)
TH1F * fhCellFlag
! histogram that stores by which flag the cell has been excluded
Double_t nsigma
TString fExternalFileName
If you have already a file that contains many runs merged together you can place it in fMergeOutput a...
TString fPeriod
The name of the analyzed period.
void FlagAsBad(Int_t crit, TH1F *inhisto, Double_t nsigma=4., Double_t dnbins=200)
const char * pdfName
Definition: DrawAnaELoss.C:30
void PlotFlaggedCells2D(Int_t flagBegin, Int_t flagEnd=-1)
TString fTrigger
Selected trigger for the analysis.
Bool_t CheckDistribution(TH1 *ratio, TH1 *reference)
Int_t fNMaxRowsAbs
Maximum No of rows in Calorimeter.
Int_t fNMaxColsAbs
Maximum No of colums in Calorimeter.
void PeriodAnalysis(Int_t criterum=7, Double_t nsigma=4.0, Double_t emin=0.1, Double_t emax=2.0)
Bool_t fTestRoutine
This is a flag, if set true will produce some extra quality check histograms.
Bool_t fPrint
If set true more couts with information of the excluded cells will be printed.
TList * fOutputListGood
! list with good channel amplitudes, stored in fRootFile
Analyses cell properties and identifies bad cells.
TString fAnalysisOutput
The list with bad channels and histograms are saved in this folder.
TH1F * fAvgNHitPerEvVsCellId
! being discussed
TH1F * fhCellWarm
! histogram that stores whether the cell was marked as warm
Int_t fStartCell
ID of the first cell you want to check.
TList * fOutputListGoodRatio
! list with good channel amplitude ratios, stored in fRootFile
bool Bool_t
Definition: External.C:53
Class with utils specific to calorimeter clusters/cells.
TH2F * fCellAmplitude
! main histogram for the analysis. Cell ID vs. amplitude, read from the input merged file ...
void SetExternalMergedFile(TString inputName)
TString fTrainNo
Train number of the analyszed data (can deduce pass & trigger from that etc.)
void SaveBadCellsToPDF(Int_t version, TString pdfName)
TH1D * BuildMeanFromGood(Int_t warmIn=0)
TString fRunListFileName
This is the name of the file with the run numbers to be merged, by default it's 'runList.txt'.
Int_t fCurrentRunNumber
A run number of an analyzed period. This is important for the AliCalorimeterUtils initialization...
Definition: External.C:196
TString fRunList
Thats the full path and name of the file which contains a list of all runs to be merged together...