class TH1;
class TF1;
class TAxis;
+class TArrayD;
class AliESDEvent;
class AliAODEvent;
class AliAnalysisTaskSE;
class AliForwardUtil : public TObject
{
public:
+ enum {
+ kSkipRing = (1 << 19) // Bit for skipping a histogram
+ };
/**
* Get the standard color for a ring
*
+ ((r == 'I' || r == 'i') ? 2 : -3));
}
//==================================================================
+ /**
+ * @{
+ * @name AliROOT version
+ */
+ /**
+ * Get the revision number of AliROOT
+ *
+ * @return Subversion revision number of AliROOT used
+ */
+ static ULong_t AliROOTRevision();
+ /**
+ * Get the branch identifier of AliROOT. In case of trunk, return
+ * 0xFFFFFFFF, while for @b vM-N-R{-S}, we get
+ *
+ * @code
+ * ((M & 0xFF) << 12 | (N & 0xFF) << 8 | (R & 0xFF) << 3 | (X))
+ * @endcode
+ * where @c X is 0xAA if @b S is specified (e.g., analysis tag).
+ *
+ * @return branch identifer encoded in bits
+ */
+ static ULong_t AliROOTBranch();
+ //==================================================================
/**
* @{
* @name Collision/run parameters
* @return Short integer value of magnetic field in kG
*/
static Short_t ParseMagneticField(Float_t field);
+ /**
+ * Get a string representation of the magnetic field
+ *
+ * @param field Magnetic field in kG
+ *
+ * @return String representation of the magnetic field
+ */
+ static const char* MagneticFieldString(Short_t field);
+ /* @} */
+
+ //==================================================================
+ /**
+ * @{
+ * @name Recalculate @f$\eta@f$, @f$\phi@f$, etc.
+ */
/**
* Get the radius of a strip.
*
*/
static Double_t GetPhiFromStrip(Char_t ring, UShort_t strip,
Double_t phi, Double_t xvtx, Double_t yvtx);
- /**
- * Get a string representation of the magnetic field
- *
- * @param field Magnetic field in kG
- *
- * @return String representation of the magnetic field
- */
- static const char* MagneticFieldString(Short_t field);
/* @} */
- //__________________________________________________________________
+ //==================================================================
+ /**
+ * @{
+ * @name Manager related tasks
+ */
/**
* Get the AOD event - either from the input (AOD analysis) or the
* output (ESD analysis)
* @return true if the needed task was found
*/
static Bool_t CheckForTask(const char* clsOrName, Bool_t cls=true);
+ /* @} */
- //__________________________________________________________________
+ //==================================================================
/**
* @{
* @name Member functions to store and retrieve analysis parameters
static TObject* MakeParameter(const char* name, Int_t value);
static TObject* MakeParameter(const char* name, Double_t value);
static TObject* MakeParameter(const char* name, Bool_t value);
+ static TObject* MakeParameter(const char* name, ULong_t value);
static void GetParameter(TObject* o, UShort_t& value);
static void GetParameter(TObject* o, Int_t& value);
static void GetParameter(TObject* o, Double_t& value);
static void GetParameter(TObject* o, Bool_t& value);
+ static void GetParameter(TObject* o, ULong_t& value);
/* @} */
+ //==================================================================
+ /**
+ * @{
+ * @name Axis functions
+ */
+ static TAxis* MakeFullIpZAxis(Int_t nCenter=20);
+ static void MakeFullIpZAxis(Int_t nCenter, TArrayD& bins);
+ static void MakeLogScale(Int_t nBins, Int_t minOrder, Int_t maxOrder, TArrayD& bins);
+ static void PrintTask(const TObject& o);
+ static void PrintName(const char* name);
+ static void PrintField(const char* name, const char* value, ...);
+ /* @} */
+
+ //==================================================================
+#if 0 // Moved to separate classes
/**
* @{
* @name Energy stragling functions
*
*/
virtual ~ELossFitter();
+ void SetDebug(Bool_t debug=true) { fDebug = debug; }
/**
- * Clear internal arrays
+ * Clear internal arrays
*
*/
void Clear();
* @return The function fitted to the data
*/
TF1* FitNParticle(TH1* dist, UShort_t n, Double_t sigman=-1);
+ /**
+ * Fit a composite distribution of energy loss from both primaries
+ * and secondaries
+ *
+ * @param dist Distribution
+ * @param sigman If larger than zero, the initial guess of the
+ * detector included noise. If zero or less this
+ * parameter is fixed to 0.
+ *
+ * @return Function fitted to the data
+ */
+ TF1* FitComposite(TH1* dist, Double_t sigman);
/**
* Get Lower cut on data
*
const UShort_t fMinusBins; // Number of bins from maximum to fit 1st peak
TObjArray fFitResults; // Array of fit results
TObjArray fFunctions; // Array of functions
+ Bool_t fDebug;
};
/* @} */
-
+#endif
//==================================================================
/**
* @param etaAxis Eta axis to use
*/
void Init(const TAxis& etaAxis);
+ /**
+ * Re-initialize the object with new @f$\eta@f$ axis
+ *
+ * @param etaAxis Eta axis to use
+ */
+ void ReInit(const TAxis& etaAxis);
/**
* Make a histogram
*
*
* @return Newly allocated histogram
*/
- TH2D* Make(UShort_t d, Char_t r, const TAxis& etaAxis) const;
+ static TH2D* Make(UShort_t d, Char_t r, const TAxis& etaAxis);
+ /**
+ * Set the @f$\eta@f$ axis
+ *
+ * @param hist Histogram
+ * @param etaAxis @f$\eta@f$ axis to use
+ */
+ static void RebinEta(TH2D* hist, const TAxis& etaAxis);
/**
* Clear data
*
* Constructor
*
*/
- RingHistos() : fDet(0), fRing('\0'), fName("") {}
+ RingHistos() : fDet(0), fRing('\0'), fName(""), fkNSector(0), fkNStrip(0) {}
/**
*
*
* @param r Ring
*/
RingHistos(UShort_t d, Char_t r)
- : fDet(d), fRing(r), fName(TString::Format("FMD%d%c", d, r))
+ : fDet(d), fRing(r), fName(TString::Format("FMD%d%c", d, r)),
+ fkNSector(r == 'i' || r == 'I' ? 20 : 40),
+ fkNStrip(r == 'i' || r == 'I' ? 512 : 256)
{}
/**
* Copy constructor
* @param o Object to copy from
*/
RingHistos(const RingHistos& o)
- : TObject(o), fDet(o.fDet), fRing(o.fRing), fName(o.fName)
+ : TObject(o), fDet(o.fDet), fRing(o.fRing), fName(o.fName),
+ fkNSector(o.fkNSector), fkNStrip(o.fkNStrip)
{}
/**
*
fDet = o.fDet;
fRing = o.fRing;
fName = o.fName;
+ fkNSector = o.fkNSector;
+ fkNStrip = o.fkNStrip;
return *this;
}
/**
*/
TH1* GetOutputHist(const TList* d, const char* name) const;
/**
- *
+ * Get the colour of this ring
*
*
* @return
* @return Name of this ring
*/
const char* GetName() const { return fName.Data(); }
+ /**
+ * Get number of sectors
+ */
+ const UShort_t& NSector() const { return fkNSector; }
+ /**
+ * Get number of strips
+ */
+ const UShort_t& NStrip() const { return fkNStrip; }
UShort_t fDet; // Detector
Char_t fRing; // Ring
TString fName; // Name
+ UShort_t fkNSector; // Number of sectors
+ UShort_t fkNStrip; // Number of strips
ClassDef(RingHistos,1)
};