//
#include "AliFMDInput.h"
#include <TObjArray.h>
+#include <TTimer.h>
class TCanvas;
class TPad;
class TButton;
/** Continue to next event */
void Continue() { fWait = kFALSE; }
+ /** Run throug events as fast as possible */
+ void Start() { fContinous = kTRUE; fWait = kFALSE; }
+ /** Pause the processing */
+ void Pause() { fContinous = kFALSE; fWait = kTRUE; }
/** Zoom mode */
void Zoom() { fZoomMode = kTRUE; }
/** Pick mode */
void Pick() { fZoomMode = kFALSE; }
/** Redisplay the event */
virtual void Redisplay(); // *MENU*
+ /** Break */
+ virtual void Break();
+ /** Render in 3D */
+ virtual void Render();
+
/** Change cut */
virtual void ChangeCut();
+ /** Change cut */
+ virtual void ChangeFactor();
/** Called when a mouse or similar event happens in the display.
@param event Event type
@param px where the event happened in pixels along X
@param py where the event happened in pixels along Y */
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
- /** Calculate distance from point @f$ (p_x,p_y)@f$ to this object.
- @param px Pixel X coordinate
- @param py Pixel Y coordinate
- @return distance. */
- virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
/** Paint into canvas
@param option Not used */
virtual void Paint(Option_t* option="") { (void)option; }
@param digit Digit to draw
@return @c false on error */
virtual Bool_t ProcessDigit(AliFMDDigit* digit);
+ /** Visualize a summable digit
+ @param sdigit Summable digit to draw
+ @return @c false on error */
+ virtual Bool_t ProcessSDigit(AliFMDSDigit* sdigit);
/** Visualize a raw digit
@param digit Raw digit.
@return @c false on error */
- virtual Bool_t ProcessRaw(AliFMDDigit* digit);
+ virtual Bool_t ProcessRawDigit(AliFMDDigit* digit);
+ /** Visualize a raw digit
+ @param digit Raw digit.
+ @return @c false on error */
+ virtual Bool_t ProcessRawCalibDigit(AliFMDDigit* digit);
/** Visualize a reconstructed point.
@param recpoint Reconstructed point
@return @c false on error */
@param x Value
@param max Maximum (for example 1023 for digits)
@return @c false on error */
- virtual Int_t LookupColor(Float_t x, Float_t max) const;
- /** Set multiplicity cut
- @param cut Cut-off in multiplicity */
- virtual void SetMultiplicityCut(Float_t c=.01) { fMultCut = c; }//*MENU*
- /** Set pedestal width factor
- @param fac Factor */
- virtual void SetPedestalFactor(Float_t f=3) { fPedestalFactor = f; }//*MENU*
+ virtual Int_t LookupColor(Float_t x, Float_t min, Float_t max) const;
+
+ /** Set range of displayed values */
+ virtual void SetCut(Float_t l=0., Float_t h=1.); //*MENU*
+ virtual void SetFactor(Float_t f=1);
protected:
/** Copy constructor
@param o Object to copy from */
fPad(0),
fButtons(0),
fSlider(0),
+ fFactor(0),
fZoomMode(0),
fX0(0),
fY0(0),
fX1(0),
fY1(0),
- fMultCut(0),
- fPedestalFactor(0),
fXPixel(0),
fYPixel(0),
fOldXPixel(0),
fOnlyFMD(kTRUE),
fSpec(0),
fSpecCut(0),
- fAux(0)
+ fAux(0),
+ fReturn(kFALSE),
+ fContinous(kFALSE),
+ fTimeout(),
+ fInitialMin(0),
+ fInitialMax(1),
+ fInitialFactor(3./10)
{ }
/** Assignment operator
@return Reference to this object */
AliFMDDisplay& operator=(const AliFMDDisplay&) { return *this; }
+ /** Add a marker to the display
+ @param x X position
+ @param y Y position
+ @param z Z position
+ @param o Object to refer to
+ @param s Signal
+ @param max Maximum of signal */
+ virtual void AddMarker(Float_t x, Float_t y, Float_t z,
+ TObject* o, Float_t s, Float_t min, Float_t max);
/** Add a marker to the display
@param det Detector
@param rng Ring
@param s Signal
@param max Maximum of signal */
virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
- TObject* o, Float_t s, Float_t max);
+ TObject* o, Float_t s, Float_t min, Float_t max);
/** Show only the FMD detectors. */
void ShowOnlyFMD();
virtual void DrawAux();
virtual void Idle();
virtual void AtEnd();
+ virtual Bool_t InsideCut(Float_t v, const Float_t& min,
+ const Float_t& max) const;
+ virtual Double_t GetADCThreshold(UShort_t d, Char_t r,
+ UShort_t s, UShort_t t) const;
static AliFMDDisplay* fgInstance; // Static instance
Bool_t fWait; // Wait until user presses `Continue'
TPad* fPad; // View pad.
TObjArray fButtons; // Continue button
TSlider* fSlider; // Cut slider
+ TSlider* fFactor; // Factor slider
Bool_t fZoomMode; // Whether we're in Zoom mode
Float_t fX0; // X at lower left corner or range
Float_t fY0; // Y at lower left corner or range
Float_t fX1; // X at upper right corner or range
Float_t fY1; // Y at upper right corner or range
- Float_t fMultCut; // Multiplicity cut
- Float_t fPedestalFactor; // ADC acceptance factor
Int_t fXPixel; // X pixel of mark
Int_t fYPixel; // Y pixel of mark
Int_t fOldXPixel; // Old x pixel of mark
TH1* fSpec; // Spectra
TH1* fSpecCut; // Cut spectra
TCanvas* fAux; // Aux canvas.
+ Bool_t fReturn; // Stop
+ Bool_t fContinous;
+ TTimer fTimeout;
+ Float_t fInitialMin;
+ Float_t fInitialMax;
+ Float_t fInitialFactor;
+
+ struct Range_t {
+ UInt_t fNbins;
+ Float_t fLow;
+ Float_t fHigh;
+ };
+ static const Range_t fgkEdepRange;
+ static const Range_t fgkAdcRange;
+ static const Range_t fgkMultRange;
+
ClassDef(AliFMDDisplay,0) // FMD specialised event display
};