ROOT logo
AliRoot » PWG » MUONDEP » AliAnalysisTriggerScalers

class AliAnalysisTriggerScalers: public TObject

Function Members (Methods)

public:
AliAnalysisTriggerScalers(const AliAnalysisTriggerScalers&)
AliAnalysisTriggerScalers(const vector<int>& runs, const char* source = "raw://")
AliAnalysisTriggerScalers(const set<int>& runs, const char* source = "raw://")
AliAnalysisTriggerScalers(Int_t runNumber, const char* source = "raw://")
AliAnalysisTriggerScalers(const char* runlist, const char* source = "raw://")
virtual~AliAnalysisTriggerScalers()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
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
TStringCrossSectionUnit() const
voidCrossSectionUnit(const char* unit = "ub")
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
voidDrawFill(Int_t run1, Int_t run2, double ymin, double ymax, const char* label, Int_t color = 5)
voidDrawFills(Double_t ymin, Double_t ymax, Int_t color = 5)
voidDrawPeriods(Double_t ymin, Double_t ymax, Int_t color = 5)
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
voidGetCTPObjects(Int_t runNumber, AliTriggerConfiguration*& tc, AliTriggerRunScalers*& trs, AliLHCData*& lhc) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
voidGetFillBoundaries(map<int,std::pair<int,int> >& fills)
Int_tGetFillNumberFromRunNumber(Int_t runNumber)
virtual const char*TObject::GetIconName() const
voidGetLHCPeriodBoundaries(map<std::string,std::pair<int,int> >& periods)
TStringGetLHCPeriodFromRunNumber(Int_t runNumber) const
voidGetLuminosityTriggerAndCrossSection(Int_t runNumber, TString& lumiTriggerClassName, Double_t& lumiTriggerCrossSection, Double_t& lumiTriggerCrossSectionError) const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
TObject*GetOCDBObject(const char* path, Int_t runNumber) const
virtual Option_t*TObject::GetOption() const
Float_tGetPauseAndConfigCorrection(Int_t runNumber, const char* triggerClassName)
voidGetPileUpFactor(Int_t runNumber, const char* triggerClassName, Double_t purity, Double_t& value, Double_t& error)
const vector<int>&GetRunList() const
virtual const char*TObject::GetTitle() const
Int_tGetTriggerInput(Int_t runNumber, const char* inputname)
AliAnalysisTriggerScalerItem*GetTriggerScaler(Int_t runNumber, const char* level, const char* triggerClassName)
virtual UInt_tTObject::GetUniqueID() 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
voidIntegratedLuminosity(const char* triggerList = "", const char* lumiTrigger = "C0TVX-B-NOPF-ALLNOTRD", Double_t lumiCrossSection = 0.755*2000, const char* csvOutputFile = "", const char sep = '\t', const char* csUnit = "ub")
TGraph*IntegratedLuminosityGraph(const char* triggerName, const char* triggerClassNameForPACEstimate = "")
TGraph*IntegratedLuminosityGraph(Int_t runNumber, const char* triggerClassName, const char* triggerClassNameForPACEstimate = "")
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
TGraph*MakeGraph(const vector<int>& vx, const vector<int>& vex, const vector<double>& vy, const vector<double>& vey)
voidTObject::MayNotUse(const char* method) const
static Double_tMu(Double_t L0B, Double_t Nb)
virtual Bool_tTObject::Notify()
Int_tNumberOfInteractingBunches(const AliLHCData& lhc, Int_t runNumber, Bool_t mainSat = kFALSE) const
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)
AliAnalysisTriggerScalers&operator=(const AliAnalysisTriggerScalers&)
virtual voidTObject::Paint(Option_t* option = "")
TGraph*PlotTrigger(const char* triggerClassName, const char* what)
TGraph*PlotTriggerEvolution(const char* triggerClassName, const char* what, bool draw = kTRUE, double* mean = 0x0, bool removeZero = kFALSE)
TGraph*PlotTriggerRatio(const char* triggerClassName1, const char* what1, const char* triggerClassName2, const char* what2)
TGraph*PlotTriggerRatioEvolution(const char* triggerClassName1, const char* what1, const char* triggerClassName2, const char* what2)
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = "") const
static voidPrintIntegers(const vector<int>& integers, char sep = '\n', ostream& out = std::cout)
virtual Int_tTObject::Read(const char* name)
static voidReadIntegers(const char* filename, vector<int>& integers, Bool_t resetVector = kTRUE)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetRunList(const vector<int>& runlist)
voidSetRunList(const set<int>& runlist)
voidSetRunList(Int_t runNumber)
voidSetRunList(const char* runlist)
virtual voidTObject::SetUniqueID(UInt_t uid)
Bool_tShouldCorrectForPileUp() const
voidShouldCorrectForPileUp(Bool_t flag)
virtual voidShowMembers(TMemberInspector&)
voidShowPileUpFactors(const char* triggerClassName, Double_t purity = 1.0)
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
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
Bool_tCheckRecord(const AliTriggerScalersRecord& record, UInt_t index, UInt_t refa, UInt_t refb, UInt_t timelapse) const

Data Members

private:
TStringfCrossSectionUnitcross-section unit (UB = microbarns) by default
TStringfOCDBPathOCDB path (default raw://)
vector<int>fRunListinput run list
Bool_tfShouldCorrectForPileUpwhether or not to correct scalers by pile-up

Class Charts

Inheritance Chart:
TObject
AliAnalysisTriggerScalers

Function documentation

AliAnalysisTriggerScalers(Int_t runNumber, const char* source = "raw://")
 ctor using a single run number
AliAnalysisTriggerScalers(const std::vector<int>& runs, const char* ocdbPath)
 ctor using a vector of run numbers
AliAnalysisTriggerScalers(const std::set<int>& runs, const char* ocdbPath)
 ctor using a set of run numbers
AliAnalysisTriggerScalers(const char* runlist, const char* source = "raw://")
 ctor from a run list (txt file)
~AliAnalysisTriggerScalers()
 dtor
Bool_t CheckRecord(const AliTriggerScalersRecord& record, UInt_t index, UInt_t refa, UInt_t refb, UInt_t timelapse) const
 Check if a trigger scaler record should be kept for our
 luminosity computations
void DrawFill(Int_t run1, Int_t run2, double ymin, double ymax, const char* label, Int_t color = 5)
 Draw a yellow box to indicate a run range
void DrawFills(Double_t ymin, Double_t ymax, Int_t color = 5)
 Draw the fill ranges corresponding to the list of runs
 Note that this method will scan the OCDB to get the run -> fill number relationship,
 so it's better in this case to use a local copy of the OCDB if you have one. Otherwise
 it will be long.

void DrawPeriods(Double_t ymin, Double_t ymax, Int_t color = 5)
 Draw the period ranges corresponding to the list of runs
 Note that this method will scan the OCDB to get the run -> fill number relationship,
 so it's better in this case to use a local copy of the OCDB if you have one. Otherwise
 it will be long.
void GetCTPObjects(Int_t runNumber, AliTriggerConfiguration*& tc, AliTriggerRunScalers*& trs, AliLHCData*& lhc) const
 For a given run, get the CTP objects we need to do our work

 FIXME: this is the method that should probably be virtualized so
 we can get those objects from either OCDB or run based container in AODs/ESDs
void GetFillBoundaries(map<int,std::pair<int,int> >& fills)
 Given a list of runs get the fills they are in
Int_t GetFillNumberFromRunNumber(Int_t runNumber)
 Get the fill number of a run
TObject* GetOCDBObject(const char* path, Int_t runNumber) const
 Helper method to get an object from the OCDB
TString GetLHCPeriodFromRunNumber(Int_t runNumber) const
 Get a list of LHC periods from a list of run numbers
GetLuminosityTriggerAndCrossSection(Int_t runNumber, TString& lumiTriggerClassName, Double_t& lumiTriggerCrossSection, Double_t& lumiTriggerCrossSectionError) const
 For one given run, get the trigger class name to be used as the luminometer,
 and its corresponding cross-section

 FIXME: all is hard-coded for now... (use OADB for this ?)
void GetLHCPeriodBoundaries(map<std::string,std::pair<int,int> >& periods)
 Given a list of runs get the fills they are in
Int_t GetTriggerInput(Int_t runNumber, const char* inputname)
 Get one trigger input for a given run
GetPauseAndConfigCorrection(Int_t runNumber, const char* triggerClassName)
 Tries to estimate the duration of the Pause and Configure phase(s) in a given run
 Probably not really accurate for the moment though.
void ShowPileUpFactors(const char* triggerClassName, Double_t purity = 1.0)
 Printout the pile-up factors for the runlist, including some purity if needed
void GetPileUpFactor(Int_t runNumber, const char* triggerClassName, Double_t purity, Double_t& value, Double_t& error)
 Get the mean pile-up correction factor for the given run
GetTriggerScaler(Int_t runNumber, const char* level, const char* triggerClassName)
 Get the scaler for a given trigger class and a given trigger level.
 Returned object must be deleted by the user.
IntegratedLuminosityGraph(const char* triggerName, const char* triggerClassNameForPACEstimate = "")
 Get the integrated luminosity graph for one trigger
IntegratedLuminosityGraph(Int_t runNumber, const char* triggerClassName, const char* triggerClassNameForPACEstimate = "")
 Get the integrated luminosity graph for one trigger for the given run

 the triggerClassNameForPACEstimate is only used if triggerClassName is,
 for the given run, the same as the luminometer trigger class name,
 and should be the trigger class with the higher and non-zero L0A rate (except during PACs)

void IntegratedLuminosity(const char* triggerList = "", const char* lumiTrigger = "C0TVX-B-NOPF-ALLNOTRD", Double_t lumiCrossSection = 0.755*2000, const char* csvOutputFile = "", const char sep = '\t', const char* csUnit = "ub")
 Compute the luminosity for a set of triggers
TGraph* MakeGraph(const vector<int>& vx, const vector<int>& vex, const vector<double>& vy, const vector<double>& vey)
 Build a graph from a set of stl vectors
Double_t Mu(Double_t L0B, Double_t Nb)
 L0B = trigger rate before any veto
 Nb = number of crossing bunches
Int_t NumberOfInteractingBunches(const AliLHCData& lhc, Int_t runNumber, Bool_t mainSat = kFALSE) const
 Extract the number of colliding bunches from the LHC data
 Use mainSat = true if the collisons were main - satellite ones
TGraph* PlotTrigger(const char* triggerClassName, const char* what)
 Plot one of the scalers (L0A,L0B,L0AOVERB,etc...) of a given triggerClass
 Get one value per run.
TGraph* PlotTriggerEvolution(const char* triggerClassName, const char* what, bool draw = kTRUE, double* mean = 0x0, bool removeZero = kFALSE)
 Make a graph of "what" for a given trigger class.

 What can be :

 - L0B (level 0 before any veto applied)
 - L0A (level 0 after all vetoes)
 - L0AOVERB (L0A/L0B)
 - mu ( = -TMath::Log( 1 - P(0) ) where P(0) is the proba to have zero collisions in a bunch crossing)
 - pileupfactor = mu/(1-exp(-mu)) : the factor to apply to correct the cint1b count rate
 - vsnb = L0B/(NumberOfInteractingBunches*11245)
 - NBCX = NumberOfInteractingBunches
TGraph* PlotTriggerRatio(const char* triggerClassName1, const char* what1, const char* triggerClassName2, const char* what2)
 Plot the ratio of two scalers.
 Get one value per run.
TGraph* PlotTriggerRatioEvolution(const char* triggerClassName1, const char* what1, const char* triggerClassName2, const char* what2)
 Plots the evolution of one trigger ratio
void Print(Option_t* opt = "") const
 print our runlist
void PrintIntegers(const vector<int>& integers, char sep = '\n', ostream& out = std::cout)
 print a list of integers
void ReadIntegers(const char* filename, vector<int>& integers, Bool_t resetVector = kTRUE)
 Read integers from filename, where integers are either
 separated by "," or by return carriage
void SetRunList(Int_t runNumber)
 Make the runlist be a single run
void SetRunList(const std::vector<int>& runs)
 Make the runlist be a single run
void SetRunList(const std::set<int>& runs)
 Make the runlist be a single run
void SetRunList(const char* runlist)
 Read the runlist from an ASCII file or a comma separated list
 or a space separated list
AliAnalysisTriggerScalers(const std::vector<int>& runs, const char* source="raw://")
void CrossSectionUnit(const char* unit = "ub")
TString CrossSectionUnit() const
{ return fCrossSectionUnit; }
const std::vector<int>& GetRunList() const
{ return fRunList; }
void ShouldCorrectForPileUp(Bool_t flag)
Bool_t ShouldCorrectForPileUp() const
AliAnalysisTriggerScalerItem& operator=(const AliAnalysisTriggerScalers& )