ROOT logo
AliRoot » EMCAL » AliCaloCalibSignal

class AliCaloCalibSignal: public TObject


 A help class for monitoring and calibration tools: MOOD, AMORE etc.,
 It can be created and used a la (ctor):

  //Create the object for making the histograms
  fSignals = new AliCaloCalibSignal( fDetType );
  // AliCaloCalibSignal knows how many modules we have for PHOS or EMCAL
  fNumModules = fSignals->GetModules();

 fed an event:
  fSignals->ProcessEvent(fCaloRawStream,fRawEventHeaderBase);
 get some info:
  fSignals->GetXXX..()
 etc.

Function Members (Methods)

public:
AliCaloCalibSignal(AliCaloCalibSignal::kDetType detectorType = kPhos)
virtual~AliCaloCalibSignal()
voidTObject::AbstractMethod(const char* method) const
Bool_tAddInfo(const AliCaloCalibSignal* sig)
Bool_tAnalyze()
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Bool_tCheckFractionAboveAmp(const int* AmpVal, int* resultArray) const
Bool_tCheckLEDRefAboveAmp(const int* AmpVal, int* resultArray) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Bool_tDecodeChannelNum(const int chanId, int* imod, int* icol, int* irow, int* igain) const
Bool_tDecodeRefNum(const int refId, int* imod, int* istripMod, int* igain) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
AliCaloAltroMapping**GetAltroMapping() const
doubleGetAmpCut() const
doubleGetAmpCutLEDRef() const
TStringGetCaloString() const
intGetChannelNum(const int imod, const int icol, const int irow, const int igain) const
intGetColumns() const
doubleGetCurrentHour() const
AliCaloCalibSignal::kDetTypeGetDetectorType() const
intGetDownscale() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tGetFittingAlgorithm() const
doubleGetHour() const
virtual const char*TObject::GetIconName() const
doubleGetLatestHour() const
intGetLEDRefs() const
intGetModules() const
intGetNAcceptedEvents() const
virtual const char*TObject::GetName() const
intGetNEvents() const
intGetNHighGain(int towId) const
intGetNHighGain(int imod, int icol, int irow) const
intGetNLowGain(int towId) const
intGetNLowGain(int imod, int icol, int irow) const
intGetNRef(int refId) const
intGetNRef(const int imod, const int istripMod, const int igain) const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
AliCaloRawAnalyzer*GetRawAnalyzer() const
intGetRefNum(const int imod, const int istripMod, const int igain) const
boolGetReqFractionAboveAmp() const
doubleGetReqFractionAboveAmpCutVal() const
boolGetReqLEDRefAboveAmpCutVal() const
intGetRows() const
intGetRunNumber() const
intGetSecInAverage() const
intGetStartTime() const
virtual const char*TObject::GetTitle() const
intGetTowerNum(const int imod, const int icol, const int irow) const
TTree*GetTreeAmpVsTime() const
TTree*GetTreeAvgAmpVsTime() const
TTree*GetTreeLEDAmpVsTime() const
TTree*GetTreeLEDAvgAmpVsTime() const
virtual UInt_tTObject::GetUniqueID() const
boolGetUseAverage() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
Bool_tProcessEvent(AliRawReader* rawReader)
Bool_tProcessEvent(AliCaloRawStreamV3* in, UInt_t Timestamp)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidResetInfo()
Bool_tSave(TString fileName)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAltroMapping(AliCaloAltroMapping** mapp)
voidSetAmpCut(double d)
voidSetAmpCutLEDRef(double d)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDownscale(int i)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetFittingAlgorithm(Int_t val)
voidSetLatestHour(double d)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetParametersFromFile(const char* parameterFile)
voidSetReqFractionAboveAmp(bool b)
voidSetReqFractionAboveAmpCutVal(double d)
voidSetReqLEDRefAboveAmpCutVal(bool b)
voidSetRunNumber(int runNo)
voidSetSecInAverage(int secInAverage)
voidSetStartTime(int startTime)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUseAverage(bool b)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
voidWriteParametersToFile(const char* parameterFile)
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum kDetType { kPhos
kEmCal
kNone
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
doublefAmpCutamplitude cut value
doublefAmpCutLEDRefamplitude cut value for LED reference
TStringfCaloStringid for which detector type we have
intfColumnsThe number of columns per module
AliCaloCalibSignal::kDetTypefDetTypeThe detector type for this object
intfDownscaleto select 1 out every N (fDownscale) events
Int_tfFittingAlgorithmselect the fitting algorithm
doublefHourfraction of hour since beginning of run, for amp vs. time graphs, for current event
intfLEDRefsThe number of LED references/monitors per module
doublefLatestHourlargest fraction of hour since beginning of run, for amp vs. time graphs
AliCaloAltroMapping**fMapping! Altro Mapping object
intfModulesThe number of modules
intfNAcceptedEvents# events accepted
intfNEvents# events processed
intfNHighGain[17920]Number of Amp. vs. Time readings per tower
intfNLowGain[17920]same, for low gain
intfNRef[576]same, for LED refs; *2 for both gains
AliCaloRawAnalyzer*fRawAnalyzer! e.g. for sample selection for fits
boolfReqFractionAboveAmpflag to select if we should do some event selection based on amplitudes
doublefReqFractionAboveAmpCutValrequired fraction that should be above cut
boolfReqLEDRefAboveAmpCutValflag to select if we should require that signal is also seen in LED Reference/Monitoring channel
intfRowsThe number of rows per module
intfRunNumberThe run number. Needs to be set by the user.
intfSecInAveragetime interval for the graph averaging
intfStartTimeTime of first event
TTree*fTreeAmpVsTimestores channel, gain, amp, and time info
TTree*fTreeAvgAmpVsTimesame, for averages
TTree*fTreeLEDAmpVsTimesame, for LED reference
TTree*fTreeLEDAvgAmpVsTimesame, for LED reference - averages
boolfUseAverageflag to average graph points into over a time interval
static const intfgkMaxRefsAliEMCALGeoParams::fgkEMCALModules * AliEMCALGeoParams::fgkEMCALLEDRefs
static const intfgkMaxTowersfgkPhosModules * fgkPhosCols * fgkPhosRows;
static const intfgkNumSecInHrnumber of seconds in an hour, for the fractional hour conversion on the time graph
static const intfgkPhosColsnumber of columns per module for PHOS
static const intfgkPhosLEDRefsno LED monitor channels for PHOS
static const intfgkPhosModulesnumber of modules for PHOS
static const intfgkPhosRowsnumber of rows per module for PHOS

Class Charts

Inheritance Chart:
TObject
AliCaloCalibSignal

Function documentation

AliCaloCalibSignal(kDetType detectorType)
Default constructor. First we set the detector-type related constants.
~AliCaloCalibSignal()
void DeleteTrees()
 delete what was created in the ctor (TTrees)
void CreateTrees()
 initialize trees
 first, regular version
void ResetInfo()
void Zero()
 set all counters to 0; not cuts etc. though
Bool_t CheckFractionAboveAmp(const int* AmpVal, int* resultArray) const
Bool_t CheckLEDRefAboveAmp(const int* AmpVal, int* resultArray) const
void SetParametersFromFile(const char* parameterFile)
void WriteParametersToFile(const char* parameterFile)
void SetFittingAlgorithm(Int_t val)
Bool_t AddInfo(const AliCaloCalibSignal* sig)
 note/FIXME: we are not yet adding correctly the info for fN{HighGain,LowGain,Ref} here - but consider this a feature for now (20080905): we'll do Analyze() unless entries were found for a tower in this original object.
Bool_t ProcessEvent(AliRawReader* rawReader)
 if fMapping is NULL the rawstream will crate its own mapping
Bool_t ProcessEvent(AliCaloRawStreamV3* in, UInt_t Timestamp)
 Method to process=analyze one event in the data stream
Bool_t Save(TString fileName)
Saves all the TTrees to the designated file
Bool_t Analyze()
 Fill the tree holding the average values
Bool_t DecodeChannelNum(const int chanId, int* imod, int* icol, int* irow, int* igain) const
Bool_t DecodeRefNum(const int refId, int* imod, int* istripMod, int* igain) const
AliCaloCalibSignal(kDetType detectorType = kPhos)
AliCaloAltroMapping ** GetAltroMapping() const
 Mapping handling
{ return fMapping; }
void SetAltroMapping(AliCaloAltroMapping** mapp)
{ fMapping = mapp; }
Int_t GetFittingAlgorithm() const
 Fitter / Analyzer
AliCaloRawAnalyzer * GetRawAnalyzer() const
{ return fRawAnalyzer;}
TTree * GetTreeAmpVsTime() const
Simple getters
 for TTree
{ return fTreeAmpVsTime; }
TTree * GetTreeAvgAmpVsTime() const
TTree * GetTreeLEDAmpVsTime() const
TTree * GetTreeLEDAvgAmpVsTime() const
int GetNHighGain(int imod, int icol, int irow) const
 how many points do we have for each tower&gain
{ int towId = GetTowerNum(imod, icol, irow); return fNHighGain[towId];}
int GetNLowGain(int imod, int icol, int irow) const
{ int towId = GetTowerNum(imod, icol, irow); return fNLowGain[towId];}
int GetNHighGain(int towId) const
{ return fNHighGain[towId];}
int GetNLowGain(int towId) const
{ return fNLowGain[towId];}
int GetNRef(const int imod, const int istripMod, const int igain) const
 also for LED reference
{ int refId = GetRefNum(imod, istripMod, igain); return fNRef[refId];}
int GetNRef(int refId) const
{ return fNRef[refId];}
kDetType GetDetectorType() const
 Basic info: getters
{return fDetType;}
TString GetCaloString() const
{return fCaloString;}
int GetColumns() const
{return fColumns;}
int GetRows() const
{return fRows;}
int GetLEDRefs() const
{return fLEDRefs;}
int GetModules() const
{return fModules;}
int GetTowerNum(const int imod, const int icol, const int irow) const
{ return (imod*fColumns*fRows + icol*fRows + irow);}
int GetChannelNum(const int imod, const int icol, const int irow, const int igain) const
{ return (igain*fModules*fColumns*fRows + imod*fColumns*fRows + icol*fRows + irow);}
int GetRefNum(const int imod, const int istripMod, const int igain) const
 LED reference indexing
{ return (igain*fModules*fLEDRefs + imod*fLEDRefs + istripMod);}
int GetNEvents() const
 Basic Counters
{return fNEvents;}
int GetNAcceptedEvents() const
void SetAmpCut(double d)
  Get and Set Cuts
 Section for if we should help with the event selection of what is likely LED events
{ fAmpCut = d; }
double GetAmpCut() const
{ return fAmpCut; }
void SetReqFractionAboveAmpCutVal(double d)
double GetReqFractionAboveAmpCutVal() const
void SetReqFractionAboveAmp(bool b)
bool GetReqFractionAboveAmp() const
 also for LED Reference/Mon channels
void SetAmpCutLEDRef(double d)
{ fAmpCutLEDRef = d; }
double GetAmpCutLEDRef() const
{ return fAmpCutLEDRef; }
void SetReqLEDRefAboveAmpCutVal(bool b)
bool GetReqLEDRefAboveAmpCutVal() const
void SetUseAverage(bool b)
 We may select to get averaged info
{ fUseAverage = b; }
bool GetUseAverage() const
{ return fUseAverage; }
void SetSecInAverage(int secInAverage)
{fSecInAverage = secInAverage;}
int GetSecInAverage() const
{return fSecInAverage;}
void SetDownscale(int i)
{fDownscale = i;}
int GetDownscale() const
{return fDownscale;}
double GetHour() const
 Info on time since start of run
{ return fHour; }
double GetCurrentHour() const
{ return fHour; }
double GetLatestHour() const
 These times are typically the same, but not necessarily if the events do not come in order
{ return fLatestHour; }
void SetLatestHour(double d)
{ fLatestHour = d; }
void SetRunNumber(int runNo)
 RunNumbers : setters and getters
{fRunNumber = runNo;}
int GetRunNumber() const
{return fRunNumber;}
void SetStartTime(int startTime)
 Start-of-run timestamp : set and get
{fStartTime = startTime;}
int GetStartTime() const
{return fStartTime;}