Implementation of Class AliPhysicsSelection This class selects collision candidates from data runs, applying selection cuts on triggers and background rejection based on the content of the ESD Usage: Create the object: fPhysicsSelection = new AliPhysicsSelection; For MC data, call fPhysicsSelection->SetAnalyzeMC() To check if an event is a collision candidate, use: fPhysicsSelection->IsCollisionCandidate(fESD) After processing save the resulting histograms to a file with (a folder physics_selection will be created that contains the histograms): fPhysicsSelection->SaveHistograms("physics_selection") To print statistics after processing use: fPhysicsSelection->Print(); The BX ids corresponding to real bunches crossings p2 are automatically selected. You cannot process runs with different filling schemes if this option is set. If you want to disable this, use: fPhysicsSelection->SetUseBXNumbers(0); If you are analizing muons and you want to keep the muon triggers besides the CINT1B you can set: fPhysicsSelection->SetUseMuonTriggers(); To compute the Background automatically using the control triggers use: fPhysicsSelection->SetComputeBG(); this will show the value of the Beam Gas, accidentals and good events as additional rows in the statistic tables, but it will NOT subtract the background automatically. This option will only work for runs taken with the CINT1 suite. This options enables automatically also the usage of BX numbers. You can only process one run at a time if you require this options, because it uses the bunch intensity estimated run by run. The BG will usually be more important in the so-called "bin 0": the class can also compute the statistics table for events in this bin. Since the definition of bin 0 may in general change from analysis to analysis, the user needs to provide a callback implementing the definition of bin zero. The callback should be implemented as a method in the analysis task and should override the IsEventInBinZero method of AliAnalysisTaskSE, and should thus have the the following prototype: Bool_t IsEventInBinZero(); It should return true if the event is in the bin 0 and it is set by passing to the physics selection the NAME of the task where the callback is implemented: fPhysicsSelection->SetBin0Callback("MyTask"). Usually the class selects the trigger scheme by itself depending on the run number. Nevertheless, you can do that manually by calling AddCollisionTriggerClass() and AddBGTriggerClass() Example: To define the class CINT1B-ABCE-NOPF-ALL as collision trigger (those will be accepted as collision candidates when they pass the selection): AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL #769 #3119"); To select on bunch crossing IDs in addition, use: AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL #769 #3119"); To define the class CINT1A-ABCE-NOPF-ALL as a background trigger (those will only be counted for the control histograms): AddBGTriggerClass("+CINT1A-ABCE-NOPF-ALL"); You can also specify more than one trigger class in a string or you can require that some are *not* present. The following line would require CSMBA-ABCE-NOPF-ALL, but CSMBB-ABCE-NOPF-ALL is not allowed to be present: AddBGTriggerClass("+CSMBA-ABCE-NOPF-ALL -CSMBB-ABCE-NOPF-ALL"); The class also supports the triggers used in heavy ion runs Origin: Jan Fiete Grosse-Oetringhaus, CERN Michele Floris, CERN
AliPhysicsSelection() | |
virtual | ~AliPhysicsSelection() |
void | TObject::AbstractMethod(const char* method) const |
void | AddBackgroundIdentification(AliAnalysisCuts*) |
void | AddBGTriggerClass(const char* className) |
void | AddCollisionTriggerClass(const char* className) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
void | DetectPassName() |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
Int_t | GetBGStatOffset() const |
const TList* | GetBGTriggerClasses() const |
const TH2F* | GetBunchCrossingHistogram() const |
const TList* | GetCollisionTriggerClasses() const |
Int_t | GetCurrentRun() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual UInt_t | AliAnalysisCuts::GetFilterMask() const |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
static const char* | GetOADBFileName() |
const AliOADBFillingScheme* | GetOADBFillingScheme() const |
const AliOADBPhysicsSelection* | GetOADBPhysicsSelection() const |
const AliOADBTriggerAnalysis* | GetOADBTriggerAnalysis() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual TList* | AliAnalysisCuts::GetOutput() |
virtual UInt_t | GetSelectionMask(const TObject* obj) |
virtual TObject* | GetStatistics(Option_t* option) const |
const TH2F* | GetStatisticsHistogram(Int_t idx = kStatIdxAll) const |
virtual const char* | TNamed::GetTitle() const |
AliTriggerAnalysis* | GetTriggerAnalysis(Int_t i = 0) |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | AliAnalysisCuts::Init() |
Bool_t | Initialize(const AliESDEvent* aEsd) |
Bool_t | Initialize(Int_t runNumber) |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
UInt_t | IsCollisionCandidate(const AliESDEvent* aEsd) |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | IsMC() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | IsSelected(TList*) |
virtual Bool_t | IsSelected(TObject*) |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Long64_t | Merge(TCollection* list) |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::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 void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
void | SaveHistograms(const char* folder = 0) |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
virtual UInt_t | AliAnalysisCuts::Selected() const |
void | SetAnalyzeMC(Bool_t flag = kTRUE) |
void | SetBIFactors(const AliESDEvent* aESD) |
void | SetBin0Callback(const char* cb) |
void | SetBin0CallbackViaPointer(AliPhysicsSelection::Bin0Callback_t cb) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | SetComputeBG(UInt_t flag = AliVEvent::kMB) |
void | SetCustomOADBObjects(AliOADBPhysicsSelection* oadbPS, AliOADBFillingScheme* oadbFS, AliOADBTriggerAnalysis* oadbTA = 0) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | AliAnalysisCuts::SetFilterMask(UInt_t mask) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetPassName(const TString passName) |
virtual void | AliAnalysisCuts::SetSelected(Bool_t dec) |
void | SetSkipTriggerClassSelection(Bool_t flag = kTRUE) |
void | SetSkipV0(Bool_t flag = kTRUE) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetUseBXNumbers(Bool_t flag = kTRUE) |
void | SetUseMuonTriggers(Bool_t) |
virtual void | ShowMembers(TMemberInspector&) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
TH2F* | BookHistStatistics(const char* tag) |
UInt_t | CheckTriggerClass(const AliESDEvent* aEsd, const char* trigger, Int_t& triggerLogic) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
Bool_t | EvaluateTriggerLogic(const AliESDEvent* aEsd, AliTriggerAnalysis* triggerAnalysis, const char* triggerLogic, Bool_t offline) |
Int_t | GetStatRow(const char* triggerBXClass, UInt_t offlineTriggerType, UInt_t** rowIDs) const |
const char* | GetTriggerString(TObjString* obj) |
void | TObject::MakeZombie() |
AliPhysicsSelection(const AliPhysicsSelection&) | |
AliPhysicsSelection& | operator=(const AliPhysicsSelection&) |
enum { | kStatTriggerClass | |
kStatHWTrig | ||
kStatV0ABG | ||
kStatV0CBG | ||
kStatMB1 | ||
kStatMB1Prime | ||
kStatLaserCut | ||
kHVdipCut | ||
kStatFO1 | ||
kStatFO2 | ||
kStatFO2L1 | ||
kStatV0A | ||
kStatV0C | ||
kStatT0BB | ||
kStatT0BG | ||
kStatT0PileUp | ||
kStatZDCA | ||
kStatZDCC | ||
kStatZDCAC | ||
kStatZDCTime | ||
kStatZNABG | ||
kStatZNCBG | ||
kStatV0 | ||
kStatV0ZN | ||
kStatOffline | ||
kStatBG | ||
kStatAcceptedPileUp | ||
kStatAccepted | ||
kStatRowAllB | ||
kStatRowAllAC | ||
kStatRowAllE | ||
kStatRowBG | ||
kStatRowAcc | ||
kStatRowGood | ||
kStatIdxAll | ||
kStatIdxBin0 | ||
}; | ||
enum ETriggerLogic { | kCINT1 | |
kCMBS2A | ||
kCMBS2C | ||
kCMBAC | ||
kCMBACS2 | ||
kHighMultL1 | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Int_t | fBGStatOffset | Offset of the BG statistics computed at the end of the processing. It depends on how many trigger classes you have selected |
TList | fBGTrigClasses | trigger classes identifying background events |
Float_t | fBIFactorA | ratio of interacting over non interacting bunch intensities for beam 1 |
Float_t | fBIFactorAC | ratio of interacting over non interacting bunch intensities for beam 1&2: |
Float_t | fBIFactorC | ratio of interacting over non interacting bunch intensities for beam 2 |
TString | fBin0CallBack | callback used to determine if an event is in the bin0 (name of the task where the callback is implemented); |
void* | fBin0CallBackPointer | ! don't stream this. TO BE REMOVED SOON |
TList* | fCashedTokens | ! trigger token lookup list |
TList | fCollTrigClasses | trigger class identifying collision candidates |
UInt_t | fComputeBG | Switch on computation of background and filling of relevant stat table entries. If you enable this you can only process one run at a time (the relative bunch intensity used to compute this chages from run to run); This is a mask of the trigger types to be used in the selection, as defined in AliVEvent |
Int_t | fCurrentRun | run number for which the object is initialized |
AliOADBFillingScheme* | fFillOADB | Filling scheme OADB object |
TString | fFillingScheme | stores the filling scheme of the current run. |
TH2F* | fHistBunchCrossing | histograms of accepted bunch crossing numbers |
TH2F* | fHistStatistics[2] | how many events are cut away why {all,bin 0} |
TH1F* | fHistTriggerPattern | Pattern of the individual detectors in the MB1 trigger. Can reveal inconsistencies/inefficiencies in the trigger |
Bool_t | fIsPP | True if processing pp run, false if heavy ion |
Bool_t | fMC | flag if MC is analyzed |
TString | TNamed::fName | object identifier |
AliOADBPhysicsSelection* | fPSOADB | Physics selection OADB object |
TString | fPassName | pass name for current run |
TPRegexp* | fRegexp | ! regular expression for trigger tokens |
Bool_t | fSkipTriggerClassSelection | flag that determines if the trigger class selection is skipped |
Bool_t | fSkipV0 | ignore information from v0 |
TString | TNamed::fTitle | object title |
TList | fTriggerAnalysis | list of offline trigger objects (several are needed to keep the control histograms separate per trigger class) |
AliOADBTriggerAnalysis* | fTriggerOADB | Trigger analysis OADB object |
Bool_t | fUseBXNumbers | Explicitely select "good" bunch crossing numbers (exclude pilot, afterpulses and fakes). If you anable this you can only process runs within the same filling scheme. |
Bool_t | fUseMuonTriggers | if true, also use the muon triggers |
Bool_t | fUsingCustomClasses | flag that is set if costum trigger classes are defined |
Inheritance Chart: | ||||||||||||||||||||
|
checks if the given trigger class(es) are found for the current event format of trigger: +TRIGGER1,TRIGGER1b,TRIGGER1c -TRIGGER2 [#XXX] [&YY] [*ZZ] requires one out of TRIGGER1,TRIGGER1b,TRIGGER1c and rejects TRIGGER2 in bunch crossing XXX if successful, YY is returned (for association between entry in fCollTrigClasses and AliVEvent::EOfflineTriggerTypes) triggerLogic is filled with ZZ, defaults to kCINT1
Get the statistics histograms ("ALL" and "BIN0" and "TOK")
evaluates trigger logic. If called with no ESD pointer/triggerAnalysis pointer, it just caches the tokens Fills the statistics histogram, if booked at row i
checks if the given event is a collision candidate returns a bit word describing the fired offline triggers (see AliVEvent::EOfflineTriggerTypes)
add 6 rows to count for the estimate of good, accidentals and BG and the ratio of BG and accidentals to total +ratio goot to first col + 2 for error on good. TODO: Remember the the indexes of rows for the BG selection. Add new member fBGRows[] and use kStat as indexes
Merge a list of AliMultiplicityCorrection objects with this (needed for PROOF). Returns the number of merged objects (including this).
Puts inside the array rowIDs the row number for a given offline trigger in a given bx class. Returns the total number of lines matching the selection triggerBXClass can be either "A", "AC", "B" or "E" offlineTriggerType is one of the types defined in AliVEvent User should delete rowIDs if no longer needed
AliAnalysisCuts interface
{ return IsCollisionCandidate((const AliESDEvent*) obj); }
{ AliError ("This method is deprecated! Please change the OADB configuration instead") ; fSkipV0 = flag;}
{ AliFatal ("This method is deprecated. Please use the kSPDClsVsTrkBG tag in the OADB configuration instead"); }
{ fPSOADB = oadbPS; fFillOADB = oadbFS; fTriggerOADB = oadbTA; fUsingCustomClasses = kTRUE;}
{ return (fTriggerAnalysis.GetEntries() > 0) ? (AliTriggerAnalysis*) fTriggerAnalysis.At(i) : 0; }
{ Printf("ERROR: Use of AliPhysicsSelection::SetUseMuonTriggers is deprecated. Use AliVEvent::kMUON selection instead."); }
{ static TString filename; filename.Form("%s/COMMON/PHYSICSSELECTION/data/physicsSelection.root", AliAnalysisManager::GetOADBPath()); return filename.Data();}