#include <TNamed.h>
#include <TList.h>
#include <TArrayI.h>
+#include <TVector3.h>
#include "AliForwardUtil.h"
#include "AliFMDMultCuts.h"
#include "AliPoissonCalculator.h"
/** Correct the energy loss */
kPhiCorrectELoss
};
+ /**
+ * Folder name
+ */
+ static const char* fgkFolderName;
/**
* Constructor
*/
*
* @param etaAxis Not used
*/
- virtual void Init(const TAxis& etaAxis);
+ virtual void SetupForData(const TAxis& etaAxis);
/**
* Do the calculations
*
* @param fmd AliESDFMD object (possibly) corrected for sharing
* @param hists Histogram cache
- * @param vtxBin Vertex bin
* @param lowFlux Low flux flag.
* @param cent Centrality
- * @param vz Vertex Z position
+ * @param ip Coordinates of interaction point
*
* @return true on successs
*/
virtual Bool_t Calculate(const AliESDFMD& fmd,
AliForwardUtil::Histos& hists,
- UShort_t vtxBin,
Bool_t lowFlux,
Double_t cent=-1,
- Double_t vz=0);
+ const TVector3& ip=TVector3(1024,1024,0));
/**
* Scale the histograms to the total number of events
*
* @param dir where to put the output
+ * @param output Output list
* @param nEvents Number of events
*/
- virtual void ScaleHistograms(const TList* dir, Int_t nEvents);
+ virtual void Terminate(const TList* dir, TList* output, Int_t nEvents);
/**
* Output diagnostic histograms to directory
*
* @param dir List to write in
*/
- virtual void DefineOutput(TList* dir);
+ virtual void CreateOutputObjects(TList* dir);
/**
* Set the debug level. The higher the value the more output
*
* @param dbg Debug level
*/
- void SetDebug(Int_t dbg=1) { fDebug = dbg; }
+ void SetDebug(Int_t dbg=1) { fDebug = dbg; }
+ void SetDoTiming(Bool_t enable=true) { fDoTiming = enable; }
/**
* Maximum particle weight to use
*
*
*/
void SetRecalculateEta(Bool_t use) { fRecalculateEta = use; }
+ /**
+ * In case of a displaced vertices recalculate eta and angle correction
+ *
+ * @param use recalculate or not
+ *
+ */
+ void SetRecalculatePhi(Bool_t use) { fRecalculatePhi = use; }
/**
* Set whether to use the phi acceptance correction.
*
fEtaLumping = (eta < 1 ? 1 : eta);
fPhiLumping = (phi < 1 ? 1 : phi);
}
+ /**
+ * Set the minimum quality of the energy loss fits
+ *
+ * @param cut Cut value
+ */
+ void SetMinQuality(UShort_t cut=10) { fMinQuality = cut; }
/**
* Get the multiplicity cut. If the user has set fMultCut (via
* SetMultCut) then that value is used. If not, then the lower
*/
Double_t GetMultCut(UShort_t d, Char_t r, Int_t ieta,
Bool_t errors=true) const;
+ /**
+ * Set the minimum quality of the energy loss fits
+ *
+ * @return Cut value
+ */
+ UShort_t GetMinQuality() const { return fMinQuality; }
/**
* Print information
*
* @param mult Signal
* @param d Detector
* @param r Ring
- * @param s Sector
- * @param t Strip (not used)
- * @param v Vertex bin
* @param eta Pseudo-rapidity
* @param lowFlux Low-flux flag
*
* @return The number of particles
*/
- virtual Float_t NParticles(Float_t mult,
- UShort_t d, Char_t r, UShort_t s, UShort_t t,
- UShort_t v, Float_t eta, Bool_t lowFlux) const;
+ virtual Float_t NParticles(Float_t mult,
+ UShort_t d,
+ Char_t r,
+ Float_t eta,
+ Bool_t lowFlux) const;
/**
* Get the inverse correction factor. This consist of
*
*
* @param d Detector
* @param r Ring
- * @param s Sector
- * @param t Strip (not used)
- * @param v Vertex bin
+ * @param t Strip
* @param eta Pseudo-rapidity
* @param lowFlux Low-flux flag
*
- * @return
+ * @return the correction factor
*/
- virtual Float_t Correction(UShort_t d, Char_t r, UShort_t s, UShort_t t,
- UShort_t v, Float_t eta, Bool_t lowFlux) const;
+ virtual Float_t Correction(UShort_t d, Char_t r, UShort_t t,
+ Float_t eta, Bool_t lowFlux) const;
/**
* Get the acceptance correction for strip @a t in an ring of type @a r
*
*
* @param eAxis
*/
- void Init(const TAxis& eAxis);
+ void SetupForData(const TAxis& eAxis);
/**
* Make output
*
* @param dir Where to put it
*/
- void Output(TList* dir);
+ void CreateOutputObjects(TList* dir);
/**
* Scale the histograms to the total number of events
*
* @param dir Where the output is
* @param nEvents Number of events
*/
- void ScaleHistograms(TList* dir, Int_t nEvents);
- TH2D* fEvsN; // Correlation of Eloss vs uncorrected Nch
- TH2D* fEvsM; // Correlation of Eloss vs corrected Nch
- TProfile* fEtaVsN; // Average uncorrected Nch vs eta
- TProfile* fEtaVsM; // Average corrected Nch vs eta
+ void Terminate(TList* dir, Int_t nEvents);
+ TList* fList;
+ // TH2D* fEvsN; // Correlation of Eloss vs uncorrected Nch
+ // TH2D* fEvsM; // Correlation of Eloss vs corrected Nch
+ // TProfile* fEtaVsN; // Average uncorrected Nch vs eta
+ // TProfile* fEtaVsM; // Average corrected Nch vs eta
TProfile* fCorr; // Average correction vs eta
TH2D* fDensity; // Distribution inclusive Nch
TH2D* fELossVsPoisson; // Correlation of energy loss vs Poisson N_ch
+ TH1D* fDiffELossPoisson;// Relative difference to Poisson
AliPoissonCalculator fPoisson; // Calculate density using Poisson method
TH1D* fELoss; // Energy loss as seen by this
TH1D* fELossUsed; // Energy loss in strips with signal
Double_t fMultCut; // If set, use this
-
- ClassDef(RingHistos,6);
+ TH1D* fTotal; // Total number of strips per eta
+ TH1D* fGood; // Number of good strips per eta
+ TH2D* fPhiAcc; // Phi acceptance vs IpZ
+ TH1D* fPhiBefore; // Phi before re-calce
+ TH1D* fPhiAfter; // Phi after re-calc
+ ClassDef(RingHistos,9);
};
/**
* Get the ring histogram container
Int_t fPhiLumping; // How to lump phi bins for Poisson
Int_t fDebug; // Debug level
AliFMDMultCuts fCuts; // Cuts
- Bool_t fRecalculateEta; // //Whether to recalculate eta and angle correction (disp vtx)
+ Bool_t fRecalculateEta; // Whether to recalc eta and angle correction (disp vtx)
+ Bool_t fRecalculatePhi; // Whether to correct for (X,Y) offset
+ UShort_t fMinQuality; // Least quality for fits
+ AliForwardUtil::Histos fCache;
+ Bool_t fDoTiming;
+ TProfile* fHTiming;
- ClassDef(AliFMDDensityCalculator,7); // Calculate Nch density
+ ClassDef(AliFMDDensityCalculator,13); // Calculate Nch density
};
#endif