*
* @ingroup pwglf_central_aod
*/
-#include <AliAnalysisTaskSE.h>
-#include "AliFMDMCEventInspector.h"
+#include "AliBaseMCCorrectionsTask.h"
#include "AliSPDMCTrackDensity.h"
-#include <TH1I.h>
class AliCentralCorrSecondaryMap;
class AliCentralCorrAcceptance;
-class AliESDEvent;
-class TH2D;
-class TH1D;
-class TList;
/**
* @ingroup pwglf_central_aod
*
*/
-class AliCentralMCCorrectionsTask : public AliAnalysisTaskSE
+class AliCentralMCCorrectionsTask : public AliBaseMCCorrectionsTask
{
public:
/**
* 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
*
*/
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 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
*/
const AliSPDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
+protected:
/**
- * Get a reference to the event inspector
+ * Copy constructor
*
- * @return Reference to the event inspector
+ * @param o Object to copy from
*/
- AliFMDMCEventInspector& GetEventInspector() { return fInspector; }
+ AliCentralMCCorrectionsTask(const AliCentralMCCorrectionsTask& o);
/**
- * Get a reference to the event inspector
+ * Assignment operator
*
- * @return Reference to the event inspector
+ * @param o Object to assign from
+ *
+ * @return Reference to this object
*/
- const AliFMDMCEventInspector& GetEventInspector() const { return fInspector;}
-protected:
+ AliCentralMCCorrectionsTask& operator=(const AliCentralMCCorrectionsTask& o);
/**
* A vertex bin
*
*/
- struct VtxBin : public TNamed
+ struct VtxBin : public AliBaseMCCorrectionsTask::VtxBin
{
/**
* Constructor
* @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);
+ TList* CreateOutputObjects(TList* list);
/**
* End of job process
*
- * @param o List to add output to
- * @param i Input list
- * @param iVz Vertex bin
+ * @param o List to add output to
+ * @param i Input list
+ * @param iVz Vertex bin
* @param effective Make an effective correction
- * @param acorr Acceptance correction
- * @param map Correctons map
+ * @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,
- AliCentralCorrSecondaryMap* map,
- AliCentralCorrAcceptance* acorr);
-
+ 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
};
* @param list List to read or add binst from/to
*/
void DefineBins(TList* list);
+ /**
+ * Create a vertex bin
+ *
+ * @param low Low cut on @f$IP_{z}@f$
+ * @param high High cut on @f$IP_{z}@f$
+ *
+ * @return Newly created vertex bin
+ */
+ AliBaseMCCorrectionsTask::VtxBin* CreateVtxBin(Double_t low, Double_t high);
+ /**
+ * Process an ESD event
+ *
+ * @param esd ESD event
+ * @param mc MC event
+ * @param bin Vertex bin
+ * @param vz @f$IP_{z}@f$
+ *
+ * @return true on success
+ */
+ Bool_t ProcessESD(const AliESDEvent& esd, const AliMCEvent& mc,
+ AliBaseMCCorrectionsTask::VtxBin& bin,
+ Double_t vz);
+ /**
+ * Create corrections objects and store them in passed list
+ *
+ * @param results Output list
+ */
+ virtual void CreateCorrections(TList* results);
+ /**
+ * Do the final processing of a vertex bin
+ *
+ * @param bin Vertex bin
+ * @param iVz Vertex bin number
+ *
+ * @return true on successd
+ */
+ virtual Bool_t FinalizeVtxBin(AliBaseMCCorrectionsTask::VtxBin* bin,
+ UShort_t iVz);
+
- AliFMDMCEventInspector fInspector; // Event inspector
- AliSPDMCTrackDensity fTrackDensity; // Get the track density
+ AliSPDMCTrackDensity fTrackDensity; // Get the track density
+ AliCentralCorrSecondaryMap* fSecCorr;
+ AliCentralCorrAcceptance* fAccCorr;
- 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
- ClassDef(AliCentralMCCorrectionsTask,2) // Central corrections class
+ Double_t fEtaCut; // Maximum Eta
+ Double_t fCorrCut; // Correction cut
+ ClassDef(AliCentralMCCorrectionsTask,3) // Central corrections class
};
#endif