21 #include <TObjString.h> 22 #include <TObjArray.h> 25 #if 0 // def DOXY_INPUT 49 fHist(
"forwardMult",
"d^{2}N_{ch}/d#etad#varphi in the forward regions",
50 200, -4, 6, 20, 0, 2*TMath::Pi()),
62 fHist.SetXTitle(
"#eta");
63 fHist.SetYTitle(
"#varphi [radians]");
64 fHist.SetZTitle(
"#frac{d^{2}N_{ch}}{d#etad#varphi}");
65 fHist.SetDirectory(0);
78 fHist.SetBins(etaAxis.GetNbins(), etaAxis.GetXmin(), etaAxis.GetXmax(),
79 20, 0, 2*TMath::Pi());
102 TH1* ret =
fHist.ProjectionX(Form(
"%s_etacov",
fHist.GetName()),
104 ret->SetDirectory(0);
105 ret->SetYTitle(
"#it{#eta} coverage");
113 TH1* ret =
fHist.ProjectionX(Form(
"%s_phiacc",
fHist.GetName()),
115 ret->SetDirectory(0);
116 ret->SetYTitle(
"#it{#varphi} acceptance");
142 fHist.SetBinContent(0,0,snn);
153 fHist.SetBinContent(
fHist.GetNbinsX()+1,0,sys);
200 static TObjString ipz;
201 static TObjString trg;
202 static TObjString cnt;
203 static TObjString ncl;
204 ipz = Form(
"ip_z=%fcm",
fIpZ);
216 void AppendAnd(
TString& trg,
const char* sep,
const TString& what)
218 if (!trg.IsNull()) trg.Append(Form(
" %s ", sep));
234 if (mask == 0)
return "none";
237 UInt_t tmp = 0x7FFFFFFF & mask;
239 if (s.IsNull()) s = isOr ?
"|" :
"&";
241 if ((tmp &
kInel) != 0x0) AppendAnd(trg, s,
"MBOR");
242 if ((tmp &
kInelGt0) != 0x0) AppendAnd(trg, s,
"INEL>0");
243 if ((tmp &
kNSD) != 0x0) AppendAnd(trg, s,
"MBAND");
244 if ((tmp &
kV0AND) != 0x0) AppendAnd(trg, s,
"V0AND");
245 if ((tmp &
kA) != 0x0) AppendAnd(trg, s,
"A");
246 if ((tmp &
kB) != 0x0) AppendAnd(trg, s,
"B");
247 if ((tmp &
kC) != 0x0) AppendAnd(trg, s,
"C");
248 if ((tmp &
kE) != 0x0) AppendAnd(trg, s,
"E");
249 if ((tmp &
kMCNSD) != 0x0) AppendAnd(trg, s,
"MCNSD");
250 if ((tmp &
kNClusterGt0) != 0x0) AppendAnd(trg, s,
"NCluster>0");
251 if ((tmp &
kSatellite) != 0x0) AppendAnd(trg, s,
"Satellite");
252 if ((tmp &
kOffline) != 0x0) AppendAnd(trg, s,
"Offline");
253 if ((tmp &
kSPDOutlier) != 0x0) AppendAnd(trg, s,
"Outlier");
254 if ((tmp &
kPileUp) != 0x0) AppendAnd(trg, s,
"Pileup");
255 if ((tmp &
kPileupSPD) != 0x0) AppendAnd(trg, s,
"Pileup-SPD");
256 if ((tmp &
kPileupTrack) != 0x0) AppendAnd(trg, s,
"Pileup-TRK");
257 if ((tmp &
kPileupBC) != 0x0) AppendAnd(trg, s,
"Pileup-BC");
258 if ((tmp &
kPileupBins) != 0x0) AppendAnd(trg, s,
"Pileup-BIN");
259 if ((tmp &
kADOR) != 0x0) AppendAnd(trg, s,
"ADOR");
260 if ((tmp &
kADAND) != 0x0) AppendAnd(trg, s,
"ADAND");
283 Form(
"Triggers (%s)", sel.Data()),
285 ret->SetYTitle(
"Events");
286 ret->SetFillColor(kRed-2);
287 ret->SetFillStyle(3002);
288 ret->GetXaxis()->SetBinLabel(
kBinAll,
"All events");
289 ret->GetXaxis()->SetBinLabel(
kBinInel,
"Coll. & MBOR");
290 ret->GetXaxis()->SetBinLabel(
kBinInelGt0,
"Coll. & MBOR&&nTracklet>0");
291 ret->GetXaxis()->SetBinLabel(
kBinNSD,
"Coll. & V0AND||FASTOR>5");
292 ret->GetXaxis()->SetBinLabel(
kBinV0AND,
"Coll. & V0AND");
293 ret->GetXaxis()->SetBinLabel(
kBinADOR,
"Coll. & ADOR");
294 ret->GetXaxis()->SetBinLabel(
kBinADAND,
"Coll. & ADAND");
295 ret->GetXaxis()->SetBinLabel(
kBinB,
"B (Coll.) & Sel.");
296 ret->GetXaxis()->SetBinLabel(
kBinA,
"A & Sel.");
297 ret->GetXaxis()->SetBinLabel(
kBinC,
"C & Sel.");
298 ret->GetXaxis()->SetBinLabel(
kBinE,
"E & Sel.");
300 ret->GetXaxis()->SetBinLabel(
kBinMCNSD,
"NSD (MC truth)");
301 ret->GetXaxis()->SetBinLabel(
kBinPileUp,
"w/Pileup");
302 ret->GetXaxis()->SetBinLabel(
kBinOffline,
"w/Offline");
304 ret->GetXaxis()->SetBinLabel(
kWithVertex,
"w/Vertex");
305 ret->GetXaxis()->SetBinLabel(
kWithTrigger,
"w/Selected trigger");
306 ret->GetXaxis()->SetBinLabel(
kAccepted,
"Accepted by cut");
307 ret->GetXaxis()->SetNdivisions(
kAccepted,
false);
329 TH1I* ret =
new TH1I(name,
"Event selection status", nBins+1, -.5, nBins+.5);
330 ret->SetYTitle(
"Events");
331 ret->SetFillColor(kBlue+1);
332 ret->SetFillStyle(3002);
333 ret->GetXaxis()->SetBinLabel(
kGoodEvent+1,
"Good");
334 ret->GetXaxis()->SetBinLabel(
kWrongCentrality+1,
"Out-of-range centrality");
335 ret->GetXaxis()->SetBinLabel(
kWrongTrigger+1,
"Wrong trigger");
336 ret->GetXaxis()->SetBinLabel(
kIsPileup+1,
"Pile-up");
337 ret->GetXaxis()->SetBinLabel(
kIsFilterOut+1,
"Filtered out");
338 ret->GetXaxis()->SetBinLabel(
kNoVertex+1,
"No IP_{z}");
339 ret->GetXaxis()->SetBinLabel(
kWrongVertex+1,
"Out-or-range IP_{z}");
340 ret->GetXaxis()->SetBinLabel(
kOutlierEvent+1,
"SPD Outlier");
341 ret->GetXaxis()->SetNdivisions(nBins,
false);
353 if (trgs.EqualTo(
"NONE") || trgs.EqualTo(
"ALL"))
return trgMask;
357 if (sep && sep[0] ==
'|') trgMask |=
kInclusive;
358 else if (sep && sep[0] ==
'&') trgMask &= ~
kInclusive;
359 while ((trg = static_cast<TObjString*>(next()))) {
364 if (s.IsNull())
continue;
365 if (s.CompareTo(
"INEL") == 0) trgMask |=
kInel;
366 else if (s.CompareTo(
"MBOR") == 0) trgMask |=
kInel;
367 else if (s.CompareTo(
"INEL>0") == 0) trgMask |=
kInelGt0;
368 else if (s.CompareTo(
"INELGT0") == 0) trgMask |=
kInelGt0;
369 else if (s.CompareTo(
"MBAND") == 0) trgMask |=
kNSD;
370 else if (s.CompareTo(
"NSD") == 0) trgMask |=
kV0AND;
371 else if (s.CompareTo(
"V0AND") == 0) trgMask |=
kV0AND;
372 else if (s.CompareTo(
"MCNSD") == 0) trgMask |=
kMCNSD;
373 else if (s.CompareTo(
"B") == 0) trgMask |=
kB;
374 else if (s.CompareTo(
"A") == 0) trgMask |=
kA;
375 else if (s.CompareTo(
"C") == 0) trgMask |=
kC;
376 else if (s.CompareTo(
"SAT") == 0) trgMask |=
kSatellite;
377 else if (s.CompareTo(
"E") == 0) trgMask |=
kE;
378 else if (s.CompareTo(
"NCLUSTER>0") == 0) trgMask |=
kNClusterGt0;
379 else if (s.CompareTo(
"CENT") == 0) trgMask |=
kInel;
380 else if (s.CompareTo(
"MULT") == 0) trgMask |=
kInel;
381 else if (s.CompareTo(
"OFFLINE") == 0) trgMask |=
kOffline;
382 else if (s.CompareTo(
"OUTLIER") == 0) trgMask |=
kSPDOutlier;
383 else if (s.CompareTo(
"PILEUP-SPD") == 0) trgMask |=
kPileupSPD;
384 else if (s.CompareTo(
"PILEUP-TRK") == 0) trgMask |=
kPileupTrack;
385 else if (s.CompareTo(
"PILEUP-BIN") == 0) trgMask |=
kPileupBins;
386 else if (s.CompareTo(
"PILEUP-BC") == 0) trgMask |=
kPileupBC;
387 else if (s.CompareTo(
"PILEUP") == 0) trgMask |=
kPileUp;
388 else if (s.CompareTo(
"ADOR") == 0) trgMask |=
kADOR;
389 else if (s.CompareTo(
"ADAND") == 0) trgMask |=
kADAND;
390 else if (s.CompareTo(
"CENTCALIB") == 0) trgMask |=
kCentNoCalib;
391 else if (s.BeginsWith(
"INCL")) trgMask |=
kInclusive;
394 AliWarningGeneral(
"MakeTriggerMask",
395 Form(
"Unknown trigger %s", s.Data()));
433 ::Warning(
"FillTriggerHistogram",
434 "event: 0x%x, mask: 0x%x, tmp: 0x%x, tmp|b: 0x%x",
435 trg, triggerMask, tmp, tmp|
kB);
474 if (vzMin < vzMax && !
HasIpZ()) {
482 if (vzMin < vzMax && !
InRange(vzMin, vzMax)) {
536 return FilterEvent(vzMin,vzMax,hist,status,filterMask);
551 case 1: str =
"pp";
break;
552 case 2: str =
"PbPb";
break;
553 case 3: str =
"pPb" ;
break;
555 std::cout <<
"Ipz: " <<
fIpZ <<
"cm " << (
HasIpZ() ?
"" :
"in")
558 <<
"sNN: " <<
GetSNN() <<
"GeV\n" 559 <<
"System: " << str <<
"\n"
UShort_t GetSystem() const
static UInt_t MakeTriggerMask(const char *what, const char *sep="&")
static void FillTriggerHistogram(UInt_t triggerMask, UInt_t trg, TH1 *hist)
TH1 * GetPhiAcceptance() const
void SetSNN(UShort_t sNN)
void Clear(Option_t *option="")
static TH1I * MakeTriggerHistogram(const char *name="triggers", UInt_t mask=0)
void FillPhiAcceptance(TH1 &h) const
void Init(const TAxis &etaAxis)
static Bool_t IsTriggerBits(UInt_t bits, UInt_t trg)
TH1 * GetEtaCoverage() const
void SetSystem(UShort_t sys)
Bool_t FilterEvent(Double_t vzMin, Double_t vzMax, TH1 *hist, TH1 *status, UInt_t filterMask) const
void Print(Option_t *option="") const
static const Char_t * GetTriggerString(UInt_t mask, const char *sep="&")
static TH1I * MakeStatusHistogram(const char *name="status")
Bool_t InRange(Float_t low, Float_t high) const
Int_t GetEtaCoverageBin() const
static const Float_t fgkInvalidIpZ
void FillEtaCoverage(TH1 &h) const
Int_t GetPhiAcceptanceBin() const
Bool_t CheckEvent(UInt_t triggerMask=kInel, Double_t vzMin=-10, Double_t vzMax=10, Double_t cMin=0, Double_t cMax=100, TH1 *hist=0, TH1 *status=0, UInt_t filterMask=kDefaultFilter) const