X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGLF%2FFORWARD%2Fanalysis2%2FAliCentralMultiplicityTask.h;h=2433a3968ed7ea5b034ccb8bcc249527598b23ad;hb=7fbd3a2c767212ee1f5b08ffcd70fd3ab82f9c76;hp=bc3819fd84a49d8aea5ab3348c35896a9a7ab29d;hpb=1e0e4b435a3dc366b49e4ac3a908fcce4d57ca6d;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGLF/FORWARD/analysis2/AliCentralMultiplicityTask.h b/PWGLF/FORWARD/analysis2/AliCentralMultiplicityTask.h index bc3819fd84a..2433a3968ed 100644 --- a/PWGLF/FORWARD/analysis2/AliCentralMultiplicityTask.h +++ b/PWGLF/FORWARD/analysis2/AliCentralMultiplicityTask.h @@ -14,7 +14,7 @@ * @ingroup pwglf_forward_aod * */ -#include +#include "AliBaseESDTask.h" #include "AliFMDEventInspector.h" #include "AliAODCentralMult.h" class AliCentralCorrectionManager; @@ -43,7 +43,7 @@ class TObjArray; * @ingroup pwglf_forward_aod * */ -class AliCentralMultiplicityTask : public AliAnalysisTaskSE +class AliCentralMultiplicityTask : public AliBaseESDTask { public: /** @@ -63,44 +63,46 @@ public: */ AliCentralMultiplicityTask(); /** - * Copy constructor + * Create output objects * - * @param o Object to copy from + * @return true on success */ - AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o); + virtual Bool_t Book(); /** - * Assignment operator - * - * @param o Object to assign from + * Creat output objects in tree * - * @return Reference to this object + * @param ah Handler */ - AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o); + virtual void CreateBranches(AliAODHandler* ah); /** - * Configure this task via a macro + * Called just before first event * - * @param macro Macro to configure va + * @param v Vertex axis + * @param e @f$\eta@f$ axis * - * @return true on success, false otherwise + * @return true on success */ - virtual Bool_t Configure(const char* macro="CentralAODConfig.C"); + virtual Bool_t PreData(const TAxis& v, const TAxis& e); /** - * Create output objects + * Called before event * + * @return true on success */ - virtual void UserCreateOutputObjects(); + virtual Bool_t PreEvent(); /** * Process each event * - * @param option Not used + * @param esd ESD event + * + * @return true on success */ - virtual void UserExec(Option_t* option); + virtual Bool_t Event(AliESDEvent& esd); /** * End of job * - * @param option Not used + * @return true on success */ - virtual void Terminate(Option_t* option); + virtual Bool_t Finalize(); /** * Print information * @@ -130,27 +132,29 @@ public: * * @return Reference to used event inspector */ - AliFMDEventInspector& GetInspector() { return fInspector; } + AliFMDEventInspector& GetEventInspector() { return fInspector; } /** * Get the event inspector * * @return Reference to used event inspector */ - const AliFMDEventInspector& GetInspector() const { return fInspector; } + const AliFMDEventInspector& GetEventInspector() const { return fInspector; } protected: /** - * Get the ESD event and initialise manager on first event if not - * done already + * Copy constructor * - * @return Pointer to valid ESD event object + * @param o Object to copy from */ - virtual AliESDEvent* GetESDEvent(); + AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o); /** - * Mark this event for storage in AOD output + * Assignment operator + * + * @param o Object to assign from * + * @return Reference to this object */ - virtual void MarkEventForStore() const; + AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o); /** * Process the ESD SPD information * @@ -159,11 +163,6 @@ protected: */ virtual void ProcessESD(TH2D& hist, const AliMultiplicity* spdmult) const; - /** - * Find our eta limits - * - */ - virtual void FindEtaLimits(); /** * A vertex bin. * @@ -171,16 +170,59 @@ protected: */ struct VtxBin : public TObject { + /** + * Constructor + * + * @param iVz Bin number + * @param minIpZ Least @f$IP_{z}@f$ + * @param maxIpZ Largest @f$IP_{z}@f$ + */ VtxBin(Int_t iVz=0, Double_t minIpZ=0, Double_t maxIpZ=0); + /** + * 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 the name + * + * @return The name + */ const char* GetName() const; + /** + * Prepare for data + * + * @param l List + * @param coverage Template + * @param store Whether to store results + */ void SetupForData(TList* l, TH2* coverage, Bool_t store=true); + /** + * Correct the input data + * + * @param aodHist Histogram + * @param useSecondary Whether to use secondary correction or not + * @param useAcceptance Whether to use acceptance correction or not + * @param sum Whether to sum or not + */ void Correct(TH2D& aodHist, Bool_t useSecondary, Bool_t useAcceptance, Bool_t sum=true) const; + /** + * Print information + * + * @param option Not used + */ void Print(Option_t* option="") const; Int_t fId; // Vertex bin number @@ -196,12 +238,28 @@ protected: }; protected: + /** + * Make a simple @f$\frac{dN_{ch}}{d\eta}@f$ estimate. + * + * @param input Sum list + * @param output Output list + * @param nTr On return, the number of events w/triggers + * @param nTrVtx On return, the number of events w/triggers+vertex + * @param nAcc On return, the number of accepted events + * + * @return true on success, false otherwise + */ + Bool_t MakeSimpledNdeta(const TList* input, + TList* output, + Double_t& nTr, + Double_t& nTrVtx, + Double_t& nAcc); + TAxis* DefaultEtaAxis() const { return new TAxis(200,-4,6); } + TAxis* DefaultVertexAxis() const { return new TAxis(10,-10,10); } AliFMDEventInspector fInspector; // Inspect events - TList* fList; // Output list AliAODCentralMult fAODCentral; // Output object Bool_t fUseSecondary; // Whether to secondary map Bool_t fUseAcceptance; // Whether to use acceptance corr. - Bool_t fFirstEventSeen; // Have we seen first event Int_t fIvz; // Event's vertex bin TH2D* fNClusterTracklet; // # of clusters vs tracklets TH2D* fClusterPerTracklet; // Clusters per tracklet. @@ -209,8 +267,8 @@ protected: TH1D* fNTracklet; //! number of tracklets TObjArray* fVtxList; //! Array of vertex bins Bool_t fStore; // Store diagnostics + TH2D* fHData; // Sum of signals private: - AliCentralCorrectionManager* fCorrManager; ClassDef(AliCentralMultiplicityTask,5) // Forward multiplicity class };