10#include "EventMultiplicityCut.h"
17 EventMultiplicityCut::EventMultiplicityCut() : EventCut(1) { SetUnitName(
"Multiplicity [N_{particles}]"); }
19 EventMultiplicityCut::~EventMultiplicityCut() {
23 Bool_t EventMultiplicityCut::Pass(
Event* event) {
28 EventMultiChargedCut::EventMultiChargedCut() :
EventCut(1), fScale(1), fMinEta(-1), fMaxEta(1), fRange(2), fPDG(NULL) {
33 Double_t charged_no = 0;
34 for (
int i = 0; i <
event->GetTotalTrackNo(); i++) {
35 Track* track =
event->GetTrack(i);
37 if (eta >= fMinEta && eta <= fMaxEta) {
38 if (track->
GetCharge() != 0) charged_no++;
41 Double_t value = charged_no * fScale;
55 fPDG = TDatabasePDG::Instance();
56 fRange = fMaxEta - fMinEta;
57 fScale = fScale / fRange;
61 EventMultiChargedCut::~EventMultiChargedCut() {
virtual Bool_t Init(Int_t=0)
void SetValue(Double_t val, Int_t i=0)
void SetUnitName(TString name, Int_t i=0)
virtual Package * Report() const
Bool_t Pass(Event *event)
void SetAveragingRange(Double_t min, Double_t max)
void SetEfficiencyScale(Double_t scale)
virtual Package * Report() const
virtual Bool_t Init(Int_t task_id=0)
Int_t GetTotalTrackNo() const
void AddObject(TObject *object)
const TLorentzVector & GetMomentum() const
Double_t GetCharge() const