// // Calculate the corrections in the central regions // #ifndef ALICENTRALMCCORRECTIONS_H #define ALICENTRALMCCORRECTIONS_H /** * @file AliCentralMCCorrectionsTask.h * @author Christian Holm Christensen * @date Wed Mar 23 14:05:51 2011 * * @brief * * * @ingroup pwglf_central_aod */ #include #include "AliFMDMCEventInspector.h" #include "AliSPDMCTrackDensity.h" class AliCentralCorrSecondaryMap; class AliCentralCorrAcceptance; class AliESDEvent; class TH2D; class TH1D; class TH1I; class TList; /** * Calculate the corrections in the central regions * * @par Inputs: * - AliESDEvent * * @par Outputs: * - AliAODCentralMult * * @par Histograms * * @par Corrections used * * @ingroup pwglf_central_tasks * @ingroup pwglf_central_mc * @ingroup pwglf_central_aod * */ class AliCentralMCCorrectionsTask : public AliAnalysisTaskSE { public: /** * Constructor * * @param name Name of task */ AliCentralMCCorrectionsTask(const char* name); /** * Constructor */ AliCentralMCCorrectionsTask(); /** * Copy constructor * * @param o Object to copy from */ AliCentralMCCorrectionsTask(const AliCentralMCCorrectionsTask& o); /** * Assignment operator * * @param o Object to assign from * * @return Reference to this object */ AliCentralMCCorrectionsTask& operator=(const AliCentralMCCorrectionsTask& o); /** * @{ * @name Interface methods */ /** * Initialize the task * */ virtual void Init(); /** * Create output objects * */ virtual void UserCreateOutputObjects(); /** * Process each event * * @param option Not used */ virtual void UserExec(Option_t* option); /** * End of job * * @param option Not used */ virtual void Terminate(Option_t* option); /** * @} */ /** * Print this object * * @param option Not used */ void Print(Option_t* option="") const; /** * Set the vertex axis to use * * @param nBins Number of bins * @param vzMin Least @f$z@f$ coordinate of interation point * @param vzMax Largest @f$z@f$ coordinate of interation point */ void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000); /** * Set the vertex axis to use * * @param axis Axis */ void SetVertexAxis(const TAxis& axis); /** * Set the eta axis to use * * @param nBins Number of bins * @param etaMin Least @f$\eta@f$ * @param etaMax Largest @f$\eta@f$ */ void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000); /** * Set the eta axis to use * * @param axis Axis */ void SetEtaAxis(const TAxis& axis); /** * Set the number of phi bins to use * * @param nBins */ void SetNPhiBins(UShort_t nBins) { fNPhiBins = nBins; } /** * Whether to make effective corrections * * @param e if true, make effective correction */ void SetEffectiveCorrection(Bool_t e) { fEffectiveCorr = e; } /** * Set the maximum @f$|\eta|@f$ to accept. * * @param maxEta maximum @f$|\eta|@f$ */ void SetEtaCut(Double_t maxEta=1.9) { fEtaCut = maxEta; } /** * If a particular phi bin has less then this fraction of the * largest signal in the corresponding @f$\eta@f$ slice, then it is * not used. * * @param least Lower bound on fraction of largest signal in this * @f$\eta@f$ slice */ void SetAcceptanceCut(Double_t least=0.8) { fCorrCut = least; } /** * Get a reference to the track density calculator * * @return Reference to the track density calculator */ AliSPDMCTrackDensity& GetTrackDensity() { return fTrackDensity; } /** * Get a reference to the track density calculator * * @return Reference to the track density calculator */ const AliSPDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; } /** * Get a reference to the event inspector * * @return Reference to the event inspector */ AliFMDMCEventInspector& GetEventInspector() { return fInspector; } /** * Get a reference to the event inspector * * @return Reference to the event inspector */ const AliFMDMCEventInspector& GetEventInspector() const { return fInspector;} protected: /** * A vertex bin * */ struct VtxBin : public TNamed { /** * Constructor */ VtxBin(); /** * Constructor * * @param low Lower @f$v_z@f$ bound * @param high Upper @f$v_z@f$ bound * @param etaAxis @f$\eta@f$ axis to use * @param nPhi Number of phi bins */ VtxBin(Double_t low, Double_t high, const TAxis& etaAxis, UShort_t nPhi); /** * Copy constructor * * @param o Object to copy from */ VtxBin(const VtxBin& o); /** * Assignment operator * * @param o Object to assign from * * @return Reference to this object */ VtxBin& operator=(const VtxBin& o); /** * Get bin name * * @param low Lower @f$v_z@f$ bound * @param high Upper @f$v_z@f$ bound * * @return Bin name */ static const char* BinName(Double_t low, Double_t high); /** * Declare output in passed list * * @param list List to put output in */ void CreateOutputObjects(TList* list); /** * End of job process * * @param o List to add output to * @param i Input list * @param iVz Vertex bin * @param effective Make an effective correction * @param etaCut Maximum @f$|\eta|@f$ to use * @param accCut Cut on acceptance * @param acorr Acceptance correction * @param map Corrections map */ void Terminate(const TList* i, TList* o, UShort_t iVz, Bool_t effective, Double_t etaCut, Double_t accCut, AliCentralCorrSecondaryMap* map, AliCentralCorrAcceptance* acorr); TH2D* fHits; // Cache of MC-truth hits TH2D* fClusters; // Cache of reconstructed hits TH2D* fPrimary; // Cache or primary TH1D* fCounts; // Event count ClassDef(VtxBin,3); // Vertex bin }; /** * Define our vertex bins * * @param list List to read or add binst from/to */ void DefineBins(TList* list); AliFMDMCEventInspector fInspector; // Event inspector AliSPDMCTrackDensity fTrackDensity; // Get the track density TObjArray* fVtxBins; // Vertex bins Bool_t fFirstEvent; // First event flag TH1I* fHEvents; // All Events TH1I* fHEventsTr; // Histogram of events w/trigger TH1I* fHEventsTrVtx; // Events w/trigger and vertex TAxis fVtxAxis; // Vertex axis TAxis fEtaAxis; // Eta axis TList* fList; // Output list UShort_t fNPhiBins; // Nunber of phi bins Bool_t fEffectiveCorr; // Whether to make effective corrections Double_t fEtaCut; // Maximum Eta Double_t fCorrCut; // Correction cut ClassDef(AliCentralMCCorrectionsTask,3) // Central corrections class }; #endif // Local Variables: // mode: C++ // End: