18 #include "AliProdInfo.h"
20 #include "AliESDEvent.h"
21 #include "AliMultiplicity.h"
22 #include "AliAnalysisManager.h"
23 #include "AliMCEventHandler.h"
24 #include "AliInputEventHandler.h"
25 #include "AliTriggerAnalysis.h"
26 #include "AliPhysicsSelection.h"
27 #include "AliOADBPhysicsSelection.h"
30 #include "AliCentrality.h"
31 #include "AliVVZERO.h"
34 #include <TDirectory.h>
36 #include <TParameter.h>
37 #include <TMatrixDSym.h>
41 #include "AliMCEvent.h"
42 #include "AliHeader.h"
43 #include "AliGenEventHeader.h"
44 #include "AliCollisionGeometry.h"
45 #include "AliVVZERO.h"
59 AliPhysicsSelection* GetPhysicsSelection()
63 Warning(
"GetPhysicsSelection",
"No analysis manager");
68 AliInputEventHandler* ih =
69 dynamic_cast<AliInputEventHandler*
>(am->GetInputEventHandler());
71 Warning(
"GetPhysicsSelection",
"No input handler");
75 AliPhysicsSelection* ps =
76 dynamic_cast<AliPhysicsSelection*
>(ih->GetEventSelection());
78 Warning(
"GetPhysicsSelection",
"No physics selection");
94 fHEventsAcceptedXY(0),
116 fPileupFlags(kSPD|kTracks|kOutOfBunch|kSPDBins),
117 fMinPileupContrib(3),
118 fMinPileupDistance(0.8),
123 fCentMethod(
"default"),
138 DGUARD(
fDebug,1,
"Default CTOR of AliFMDEventInspector");
143 :
TNamed(fgkFolderName, name),
147 fHEventsAcceptedXY(0),
169 fPileupFlags(kSPD|kTracks|kOutOfBunch|kSPDBins),
170 fMinPileupContrib(3),
171 fMinPileupDistance(0.8),
176 fCentMethod(
"default"),
194 DGUARD(
fDebug,1,
"Named CTOR of AliFMDEventInspector: %s", name);
195 if (!GetPhysicsSelection()) {
196 AliWarning(
"No physics selection defined in manager\n"
197 "=======================================================\n"
198 " The use of AliFMDEventInspector _suggests_ a valid\n"
199 " AliPhysicsSelection registered with the input handler.\n\n"
200 " Please check our train setup\n"
201 "=======================================================\n");
243 "*******************************************************\n"
244 "* Setting centrality cuts in this stage is deprecated *\n"
245 "*******************************************************");
253 "*******************************************************\n"
254 "* Setting centrality cuts in this stage is deprecated *\n"
255 "*******************************************************");
265 TH1I*& hTriggers)
const
279 DGUARD(
fDebug,3,
"Fetch histograms in AliFMDEventInspector");
284 TList* dd =
dynamic_cast<TList*
>(d->FindObject(GetName()));
285 if (!dd)
return kFALSE;
287 hEventsTr =
dynamic_cast<TH1I*
>(dd->FindObject(
"nEventsTr"));
288 hEventsTrVtx =
dynamic_cast<TH1I*
>(dd->FindObject(
"nEventsTrVtx"));
289 hEventsAcc =
dynamic_cast<TH1I*
>(dd->FindObject(
"nEventsAccepted"));
290 hTriggers =
dynamic_cast<TH1I*
>(dd->FindObject(
"triggers"));
295 !hTriggers)
return kFALSE;
301 const TList* classes,
304 TIter nextClass(classes);
305 TObjString* trigClass = 0;
316 Printf(
"Inspecting physics selection: %p", o);
318 while ((trigClass = static_cast<TObjString*>(nextClass()))) {
320 TString side = o->GetBeamSide(trigClass->String());
321 TObjArray* parts = trigClass->String().Tokenize(
" ");
322 TObjString* part = 0;
323 TIter nextPart(parts);
324 while ((part = static_cast<TObjString*>(nextPart()))) {
330 TObjArray* words = part->String().Tokenize(
",");
331 TObjString* word = 0;
332 TIter nextWord(words);
333 while ((word = static_cast<TObjString*>(nextWord()))) {
334 char first = word->String()[0];
342 word->String().Remove(0,1);
345 if (cache.FindObject(word->String())) {
346 DMSG(
fDebug, 3,
"Word %s already cached", word->GetName());
352 store->GetTitle(), store->GetName());
373 AliPhysicsSelection* ps = GetPhysicsSelection();
375 AliWarning(
"No physics selection");
382 AliWarning(
"No OADB physics selection object");
386 const TList* collTriggClasses = ps->GetCollisionTriggerClasses();
387 const TList* bgTriggClasses = ps->GetBGTriggerClasses();
388 if (!collTriggClasses) {
389 AliWarning(
"No configured collision trigger classes");
392 if (!bgTriggClasses) {
393 AliWarning(
"No configured background trigger classes");
398 fHWords =
new TH1I(
"words",
"Trigger words seen", 1, 0, 0);
399 fHWords->SetFillColor(kBlue-2);
415 DMSG(
fDebug,3,
"Got a total of %d+%d=%d trigger words",
416 nColl, nBg, nColl+nBg);
417 xAxis->Set(nColl+nBg, 0.5, nColl+nBg+.5);
422 while((word = nextC())) {
423 DMSG(
fDebug, 3,
"Defining bin %d to be %s", bin, word->GetName());
424 word->SetUniqueID(bin);
425 xAxis->SetBinLabel(bin++, word->GetName());
427 while((word = nextB())) {
428 DMSG(
fDebug, 3,
"Defining bin %d to be %s", bin, word->GetName());
429 word->SetUniqueID(bin);
430 xAxis->SetBinLabel(bin++, word->GetName());
437 DMSG(
fDebug, 3,
"Background trigger classes");
451 for (
Int_t i = 0; i < 91; i++) limits[i] = -.5 + i;
457 for (
Int_t i = 0; i < n; i++) {
462 if (vtxAxis.GetXbins() && vtxAxis.GetXbins()->GetArray())
463 fVtxAxis.Set(vtxAxis.GetNbins(), vtxAxis.GetXbins()->GetArray());
465 fVtxAxis.Set(vtxAxis.GetNbins(), vtxAxis.GetXmin(), vtxAxis.GetXmax());
469 if (vtxAxis.GetXbins() && vtxAxis.GetXbins()->GetArray())
470 fHEventsTr =
new TH1I(
"nEventsTr",
"Number of events w/trigger",
471 vtxAxis.GetNbins(), vtxAxis.GetXbins()->GetArray());
473 fHEventsTr =
new TH1I(
"nEventsTr",
"Number of events w/trigger",
474 4*vtxAxis.GetNbins(),
476 2*vtxAxis.GetXmax());
477 fHEventsTr->SetXTitle(
"v_{z} [cm]");
478 fHEventsTr->SetYTitle(
"# of events");
479 fHEventsTr->SetFillColor(kRed+1);
480 fHEventsTr->SetFillStyle(3001);
481 fHEventsTr->SetDirectory(0);
483 fList->Add(fHEventsTr);
486 fHEventsTrVtx->SetTitle(
"Number of events w/trigger and vertex");
493 if (vtxAxis.GetXbins() && vtxAxis.GetXbins()->GetArray())
495 new TH1I(
"nEventsAccepted",
496 "Number of events w/trigger and vertex in range",
497 vtxAxis.GetNbins(), vtxAxis.GetXbins()->GetArray());
500 new TH1I(
"nEventsAccepted",
501 "Number of events w/trigger and vertex in range",
502 2*vtxAxis.GetNbins(),
504 2*vtxAxis.GetXmax());
514 "XY vertex w/trigger and Z vertex in range",
515 1000,-1,1,1000,-1,1);
529 fHType =
new TH1I(
"type", Form(
"Event type (cut: SPD mult>%d)",
531 fHType->SetFillColor(kRed+1);
532 fHType->SetFillStyle(3001);
535 fHType->GetXaxis()->SetBinLabel(1,
"Low-flux");
536 fHType->GetXaxis()->SetBinLabel(2,
"High-flux");
541 fHCent =
new TH1F(
"cent",
"Centrality", limits.GetSize()-1,limits.GetArray());
542 fHCent->SetFillColor(kBlue+1);
543 fHCent->SetFillStyle(3001);
546 fHCent->SetXTitle(
"Centrality [%]");
547 fHCent->SetYTitle(
"Events");
552 limits.GetSize()-1, limits.GetArray());
557 qAxis->SetBinLabel(1,
"OK");
558 qAxis->SetBinLabel(2,
"198: beyond anchor");
559 qAxis->SetBinLabel(3,
"199: no calib");
560 qAxis->SetBinLabel(4,
"200: not desired trigger");
561 qAxis->SetBinLabel(5,
"201: not INEL0 with tracklets");
562 qAxis->SetBinLabel(6,
"202: vertex Z not within 10cm");
563 qAxis->SetBinLabel(7,
"203: tagged as pileup (SPD)");
564 qAxis->SetBinLabel(8,
"204: inconsistent SPD/tracking vertex");
565 qAxis->SetBinLabel(9,
"205: rejected by tracklets-vs-clusters");
576 xAxis->SetBinLabel(1,
"OK");
577 xAxis->SetBinLabel(2,
"No event");
578 xAxis->SetBinLabel(3,
"No triggers");
579 xAxis->SetBinLabel(4,
"No SPD");
580 xAxis->SetBinLabel(5,
"No FMD");
581 xAxis->SetBinLabel(6,
"No vertex");
582 xAxis->SetBinLabel(7,
"Bad vertex");
583 xAxis->SetBinLabel(8,
"No centrality");
593 xAxis->SetBinLabel(
kVtxOK,
"OK");
594 xAxis->SetBinLabel(
kNoVtx,
"None/bad status");
595 xAxis->SetBinLabel(
kNoSPDVtx,
"No SPD/bad status");
596 xAxis->SetBinLabel(
kFewContrib,
"N_{contrib} <= 0");
598 xAxis->SetBinLabel(
kNotVtxZ,
"Not Z vertexer");
609 xAxis->SetBinLabel(
kPP2760Fast,
"FAST in pp@#sqrt{s}=2.76TeV");
610 xAxis->SetBinLabel(
kMUON,
"Muon trigger");
612 xAxis->SetBinLabel(
kMinBias,
"CINT1 (V0A||V0C||FASTOR)");
614 xAxis->SetBinLabel(
kV0AndTrg,
"CINT7 (V0A&&V0C)");
615 xAxis->SetBinLabel(
kMinBiasAD,
"CINT10 (ADA||ADC||V0A||V0C||FASTOR)");
617 xAxis->SetBinLabel(
kCentral,
"Central");
620 xAxis->SetBinLabel(
kADOr,
"(ADA || ADC)");
621 xAxis->SetBinLabel(
kADAnd,
"(ADA && ADC)");
622 xAxis->SetBinLabel(
kUser,
"User");
623 xAxis->SetBinLabel(
kOther,
"Other");
626 fHPileup =
new TH1I(
"pileupStatus",
"Pile-up status", 4, 0, 4);
632 xAxis->SetBinLabel(1,
"SPD tracklets");
633 xAxis->SetBinLabel(2,
"Tracks");
634 xAxis->SetBinLabel(3,
"Out-of-bunch");
635 xAxis->SetBinLabel(4,
"SPD tracklets (bins)");
647 DGUARD(
fDebug,2,
"Store information from AliFMDEventInspector");
678 AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
680 AliWarning(
"Got no input handler");
683 TList *uiList = inputHandler->GetUserInfo();
685 AliWarning(
"Got no user list from input tree");
689 AliProdInfo p(uiList);
691 if (p.GetAlirootSvnVersion() <= 0)
return;
696 out->SetName(
"production");
700 TString period = p.GetLHCPeriod();
702 fProdSVN = p.GetAlirootSvnVersion();
704 Int_t rootSVN = p.GetRootSvnVersion();
708 if (period.Length() > 0) {
709 TObjArray* pp = TPRegexp(
"LHC([0-9]+)([a-z]+)").MatchS(period);
710 fProdYear =
static_cast<TObjString*
>(pp->At(1))->String().Atoi();
711 fProdLetter =
static_cast<TObjString*
>(pp->At(2))->String()[0];
737 DGUARD(
fDebug,1,
"Define output from AliFMDEventInspector");
739 fList->SetName(GetName());
770 DGUARD(
fDebug,1,
"Process event in AliFMDEventInspector");
773 AliWarning(
"No ESD event found for input event");
781 AliWarning(
"Failed to process satellite event");
787 AliWarning(
"Failed to read triggers from ESD"); }
795 const AliMultiplicity* testmult =
event->GetMultiplicity();
798 AliWarning(
"No central multiplicity object found"); }
801 lowFlux = testmult->GetNumberOfTracklets() <
fLowFluxCut;
803 fHType->Fill(lowFlux ? 0 : 1);
810 AliWarning(
"Failed to read vertex from ESD"); }
821 AliWarning(
"Failed to get centrality");
835 if (ivz <= 0 || ivz >
fVtxAxis.GetNbins()) {
837 AliWarning(Form(
"Vertex @ %f outside of range [%f,%f]",
849 if (!event->GetFMDData()) {
851 AliWarning(
"No FMD data found in ESD"); }
876 DGUARD(
fDebug,2,
"Read the centrality in AliFMDEventInspector");
897 AliVVZERO* esdV0 = esd.GetVZEROData();
898 if ((esdV0->GetV0ADecision()!=1) || (esdV0->GetV0CDecision()!=1))
918 DGUARD(
fDebug,2,
"Read the triggers in AliFMDEventInspector");
923 DMSG(
fDebug,10,
"Got analysis manager %p", am);
925 AliWarning(
"No analysis manager defined!");
930 AliInputEventHandler* ih =
931 static_cast<AliInputEventHandler*
>(am->GetInputEventHandler());
934 AliWarning(
"No input handler");
937 AliPhysicsSelection* ps =
938 dynamic_cast<AliPhysicsSelection*
>(ih->GetEventSelection());
940 AliTriggerAnalysis ta;
942 trgMask = ih->IsEventSelected();
946 Int_t v0A = ta.V0Trigger(&esd, AliTriggerAnalysis::kASide,
true,
false);
947 Int_t v0C = ta.V0Trigger(&esd, AliTriggerAnalysis::kCSide,
true,
false);
948 Int_t fso = ta.SPDFiredChips(&esd, 1,
false, 0);
949 Bool_t v0Abg = (v0A == 2);
950 Bool_t v0Cbg = (v0C == 2);
951 Bool_t v0Abb = (v0A == 1 || v0A == 3);
952 Bool_t v0Cbb = (v0A == 1 || v0A == 3);
953 Bool_t isBg = (v0Abg || v0Cbg);
954 if (!isBg && (v0Abb || v0Cbb || fso > 0)) trgMask |= AliVEvent::kMB;
955 if (!isBg && (v0Abb || v0Cbb)) trgMask |= AliVEvent::kCINT5;
956 if (!isBg && (v0Abb && v0Cbb)) trgMask |= AliVEvent::kINT7;
957 DMSG(
fDebug, 1,
"HW replay: v0A=%d v0C=%d gfo=%d mask=0x%x",
958 v0A, v0C, fso, trgMask);
970 Bool_t fastonly = (trgMask & AliVEvent::kFastOnly);
971 TString trigStr = esd.GetFiredTriggerClasses();
976 DMSG(
fDebug,3,
"Using displaced vertex stuff");
1005 DMSG(
fDebug,2,
"Event is %striggered by off-line", offline ?
"" :
"NOT ");
1009 if (trgMask & AliVEvent::kMB) {
1014 if (trgMask & AliVEvent::kINT7) {
1021 if (ta.IsOfflineTriggerFired(&esd, AliTriggerAnalysis::kNSD1))
1025 if (ta.IsSPDClusterVsTrackletBG(&esd,
false))
1038 #define TEST_TRIG_BIN(RET,BIN,TRIGGERS) \
1039 do { switch (BIN) { \
1040 case kInel: RET = triggers & AliAODForwardMult::kInel; break; \
1041 case kInelGt0: RET = triggers & AliAODForwardMult::kInelGt0; break; \
1042 case kNSD: RET = triggers & AliAODForwardMult::kNSD; break; \
1043 case kV0AND: RET = triggers & AliAODForwardMult::kV0AND; break; \
1044 case kEmpty: RET = triggers & AliAODForwardMult::kEmpty; break; \
1045 case kA: RET = triggers & AliAODForwardMult::kA; break; \
1046 case kB: RET = triggers & AliAODForwardMult::kB; break; \
1047 case kC: RET = triggers & AliAODForwardMult::kC; break; \
1048 case kE: RET = triggers & AliAODForwardMult::kE; break; \
1049 case kPileUp: RET = triggers & AliAODForwardMult::kPileUp; break; \
1050 case kMCNSD: RET = triggers & AliAODForwardMult::kMCNSD; break; \
1051 case kSatellite: RET = triggers & AliAODForwardMult::kSatellite; break; \
1052 case kSpdOutlier:RET = triggers & AliAODForwardMult::kSPDOutlier; break; \
1053 case kOffline: RET = triggers & AliAODForwardMult::kOffline; break; \
1054 default: RET = false; } } while(false)
1057 AliWarning(
"Histogram of triggers not defined - has init been called");
1063 TEST_TRIG_BIN(hasX, i, triggers);
1064 if (!hasX)
continue;
1066 for (
Int_t j = 0; j < kOffline+1; j++) {
1068 TEST_TRIG_BIN(hasY, j, triggers);
1069 if (!hasY)
continue;
1071 fHTriggerCorr->Fill(i+.5, j+.5);
1086 if (TMath::Abs(
fEnergy - 2750.) > 20)
return false;
1088 if (
fMC)
return false;
1101 if(trigStr.Contains(
"CMUS1")) {
1102 DMSG(
fDebug,1,
"Cosmic trigger ins't min-bias, removed");
1114 Int_t nTracklets = 0;
1118 const AliMultiplicity* spdmult = esd.GetMultiplicity();
1120 AliWarning(
"No SPD multiplicity");
1129 Int_t n = spdmult->GetNumberOfTracklets();
1130 for (
Int_t j = 0; j < n; j++) {
1131 if(TMath::Abs(spdmult->GetEta(j)) < 1) nTracklets++;
1135 nClusters = nTracklets;
1138 n = spdmult->GetNumberOfSingleClusters();
1139 for (
Int_t j = 0; j < n; j++) {
1140 Double_t eta = -TMath::Log(TMath::Tan(spdmult->GetThetaSingle(j)/2.));
1141 if (TMath::Abs(eta) < 1) nClusters++;
1173 (esd.GetHeader()->GetIRInt2ClosestInteractionMap() != 0 ||
1174 esd.GetHeader()->GetIRInt1ClosestInteractionMap() != 0)) {
1180 (esd.IsPileupFromSPDInMultBins())) {
1192 triggers |= locTrig;
1193 Bool_t pileup = locTrig != 0;
1201 Bool_t checkOtherBC)
const
1209 Int_t n = esd.GetNumberOfPileupVerticesTracks();
1215 const AliESDVertex* primary = esd.GetPrimaryVertexTracks();
1216 if (primary->GetStatus() != 1)
1221 Int_t bcPrimary = primary->GetBC();
1223 for (
Int_t i = 0; i < n; i++) {
1224 const AliESDVertex* other = esd.GetPileupVertexTracks(i);
1230 if (other->GetChi2perNDF() > maxChi2nu)
1234 Int_t bcOther = other->GetBC();
1235 if (bcOther != AliVTrack::kTOFBCNA && TMath::Abs(bcOther-bcPrimary) > 2)
1241 Double_t dx = primary->GetX() - other->GetX();
1242 Double_t dy = primary->GetY() - other->GetY();
1243 Double_t dz = primary->GetZ() - other->GetZ();
1244 Double_t covPrimary[6], covOther[6];
1245 primary->GetCovarianceMatrix(covPrimary);
1246 other->GetCovarianceMatrix(covOther);
1248 v(0,0) = covPrimary[0] + covOther[0];
1249 v(1,1) = covPrimary[2] + covOther[2];
1250 v(2,2) = covPrimary[5] + covOther[5];
1251 v(1,0) = v(0,1) = covPrimary[1]+covOther[1];
1252 v(0,2) = v(1,2) = v(2,0) = v(2,1) = 0;
1258 d = (v(0,0) * dx * dx + v(1,1) * dy * dy + v(2,2) * dz * dz +
1259 2 * (v(0,1) * dx * dy + v(0,2) * dx * dz + v(1,2) * dy * dz));
1275 if (trigStr.Contains(
"CBEAMB-ABCE-NOPF-ALL")||
1276 trigStr.Contains(
"CBEAMB-B-NOPF-ALLNOTRD")) {
1288 while ((word = nextColl())) {
1289 DMSG(
fDebug,10,
"Checking if %s (Coll) trigger %s is fired (%d)",
1290 word->GetTitle(), word->GetName(), word->GetUniqueID());
1291 if (!esd.IsTriggerClassFired(word->GetName()))
continue;
1295 TString beamSide = word->GetTitle();
1296 DMSG(
fDebug,10,
"Found it - this is a %s trigger", beamSide.Data());
1298 if (!beamSide.EqualTo(
"B"))
continue;
1307 while ((word = nextBg())) {
1308 DMSG(
fDebug,10,
"Checking if %s (BG) trigger %s is fired (%d)",
1309 word->GetTitle(), word->GetName(), word->GetUniqueID());
1310 if (!esd.IsTriggerClassFired(word->GetName()))
continue;
1314 TString beamSide = word->GetTitle();
1315 DMSG(
fDebug,10,
"Found it - this is a %s trigger", beamSide.Data());
1321 if ((triggers & all) == all)
break;
1341 DGUARD(
fDebug,2,
"Read the vertex in AliFMDEventInspector");
1342 ip.SetXYZ(1024, 1024, 0);
1369 const AliESDVertex* vertex = esd.GetPrimaryVertex();
1370 if (!vertex || !vertex->GetStatus()) {
1371 DMSG(
fDebug,2,
"No primary vertex (%p) or bad status %d",
1372 vertex, (vertex ? vertex->GetStatus() : -1));
1375 const AliESDVertex* vertexSPD = esd.GetPrimaryVertexSPD();
1376 if (!vertexSPD || !vertexSPD->GetStatus()) {
1377 DMSG(
fDebug,2,
"No primary SPD vertex (%p) or bad status %d",
1378 vertexSPD, (vertexSPD ? vertexSPD->GetStatus() : -1));
1383 if (vertex->IsFromVertexerZ()) {
1384 if (vertex->GetDispersion() >
fMaxVzErr ||
1386 DMSG(
fDebug,2,
"Dispersion %f > %f or resolution %f > %f",
1392 ip.SetZ(vertex->GetZ());
1394 if(!vertex->IsFromVertexerZ()) {
1395 ip.SetX(vertex->GetX());
1396 ip.SetY(vertex->GetY());
1405 const Int_t nMinContrib = 0;
1406 const AliESDVertex *vertex = esd.GetPrimaryVertexSPD();
1408 if (vertex->GetNContributors() <= nMinContrib)
return kFewContrib;
1410 if (vertex->IsFromVertexerZ())
return kNotVtxZ;
1412 if (vertex->GetDispersion() >= 0.04 || vertex->GetZRes()>=0.25)
1415 ip.SetX(vertex->GetX());
1416 ip.SetY(vertex->GetY());
1417 ip.SetZ(vertex->GetZ());
1430 const Int_t nMinContrib = 0;
1431 const AliESDVertex* primVtx = esd.GetPrimaryVertex();
1432 if (!primVtx)
return kNoVtx;
1433 if (primVtx->GetNContributors() <= nMinContrib)
return kFewContrib;
1435 const AliESDVertex* spdVtx = esd.GetPrimaryVertexSPD();
1437 if (spdVtx->GetNContributors() <= nMinContrib)
return kFewContrib;
1441 if (spdVtx->IsFromVertexerZ() && spdVtx->GetZRes()>0.25)
return kUncertain;
1443 Bool_t correlateVtx =
true;
1445 if (TMath::Abs(spdVtx->GetZ() - primVtx->GetZ()) > 0.5)
return kUncertain;
1448 ip.SetX(primVtx->GetX());
1449 ip.SetY(primVtx->GetY());
1450 ip.SetZ(primVtx->GetZ());
1462 const AliESDVertex* vertex = esd.GetPrimaryVertexSPD();
1465 AliWarning(
"No SPD vertex found in ESD"); }
1471 if(vertex->GetNContributors() <= 0) {
1472 DMSG(
fDebug,2,
"Number of contributors to vertex is %d<=0",
1473 vertex->GetNContributors());
1481 DMSG(
fDebug,2,
"Uncertaintity in Z of vertex is too large %f > %f",
1487 ip.SetZ(vertex->GetZ());
1488 const AliESDVertex* vertexXY = esd.GetPrimaryVertex();
1490 DMSG(
fDebug, 2,
"Read vertex: Primary (%f,%f,%f) [%3s] SPD (%f,%f,%f) [%3s]",
1491 vertexXY->GetX(), vertexXY->GetY(), vertexXY->GetZ(),
1492 vertexXY->IsFromVertexerZ() ?
"Z" :
"XYZ",
1493 vertex ->GetX(), vertex ->GetY(), vertex ->GetZ(),
1494 vertex ->IsFromVertexerZ() ?
"Z" :
"XYZ");
1497 ip.SetX(vertexXY->GetX());
1498 ip.SetY(vertexXY->GetY());
1523 DGUARD(
fDebug,2,
"Read the run details in AliFMDEventInspector");
1524 const char* sys = esd->GetBeamType();
1525 Float_t cms = 2 * esd->GetBeamEnergy();
1526 Float_t fld = esd->GetMagneticField();
1533 Int_t a0 = esd->GetBeamParticleA(0);
1534 Int_t a1 = esd->GetBeamParticleA(1);
1535 Int_t z0 = esd->GetBeamParticleZ(0);
1536 Int_t z1 = esd->GetBeamParticleZ(1);
1537 if (
fCentMethod.EqualTo(
"default", TString::kIgnoreCase)) {
1541 if (a0 != 0 && a1 != 0)
1556 AliWarningF(
"Unknown collision system: %s - please check", sys);
1560 AliWarningF(
"Unknown CMS energy: %f (%d) - please check", cms,
fEnergy);
1563 if (TMath::Abs(
fField) > 10) {
1564 AliWarningF(
"Unknown L3 field setting: %f (%d) - please check", fld,
fField);
1578 if (code &
kNoEvent) s.Append(
"NOEVENT ");
1580 if (code &
kNoSPD) s.Append(
"NOSPD ");
1581 if (code &
kNoFMD) s.Append(
"NOFMD ");
1582 if (code &
kNoVertex) s.Append(
"NOVERTEX ");
1583 if (code &
kBadVertex) s.Append(
"BADVERTEX ");
1586 #define PF(N,V,...) \
1587 AliForwardUtil::PrintField(N,V, ## __VA_ARGS__)
1588 #define PFB(N,FLAG) \
1590 AliForwardUtil::PrintName(N); \
1591 std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
1593 #define PFV(N,VALUE) \
1595 AliForwardUtil::PrintName(N); \
1596 std::cout << (VALUE) << std::endl; } while(false)
1610 sNN.ReplaceAll(
"GeV",
" GeV");
1612 field.ReplaceAll(
"p",
"+");
1613 field.ReplaceAll(
"m",
"-");
1614 field.ReplaceAll(
"kG",
" kG");
1616 gROOT->IncreaseDirLevel();
1617 PFV(
"Production",
"");
1618 gROOT->IncreaseDirLevel();
1622 gROOT->DecreaseDirLevel();
1627 PF(
"Pile-up methods",
"spd:%s,tracks:%s,out-of-bunch:%s",
1634 PFV(
"CMS energy per nucleon", sNN);
1635 PFV(
"Field", field);
1641 case kNormal: vtxMethod =
"normal" ;
break;
1642 case kpA2012: vtxMethod =
"pA 2012";
break;
1643 case kpA2013: vtxMethod =
"pA 2013";
break;
1644 case kPWGUD: vtxMethod =
"PWG-UD";
break;
1645 case kDisplaced: vtxMethod =
"Satellite";
break;
1647 PFV(
"IP method", vtxMethod);
1648 PFB(
"Simulation input",
fMC );
1653 for (
Int_t i = 0; i < nBin; i++) {
1654 if (i != 0 && (i % 10) == 0) std::cout <<
'\n';
1655 if ((i % 10) == 0) std::cout <<
" ";
1656 std::cout << std::setw(5) <<
fCentAxis->GetBinLowEdge(i+1) <<
'-';
1658 std::cout << std::setw(5) <<
fCentAxis->GetBinUpEdge(nBin) << std::endl;
1659 gROOT->DecreaseDirLevel();
static Short_t ParseMagneticField(Float_t field)
Bool_t Process(const AliESDEvent *esd)
static void FillTriggerHistogram(UInt_t triggerMask, UInt_t trg, TH1 *hist)
UShort_t fEnergy
Histogram container.
virtual EVtxStatus CheckVertex(const AliESDEvent &esd, TVector3 &ip) const
static const char * CenterOfMassEnergyString(UShort_t cms)
virtual Bool_t CheckPileup(const AliESDEvent &esd, UInt_t &triggers) const
TH1I * fHEventsTrVtx
Histogram of events w/trigger.
static UShort_t ParseCenterOfMassEnergy(UShort_t sys, Float_t cms)
Int_t fLowFluxCut
Pile-up status.
virtual Bool_t CheckCosmics(const TString &trigStri) const
TH1I * fHTriggers
XY vtx with trigger and Z vertex in range.
static TH1I * MakeTriggerHistogram(const char *name="triggers", UInt_t mask=0)
#define DMSG(L, N, F,...)
void SetMaxCentrality(Double_t maxcent=-1.0)
TH1I * fHPileup
Trigger processing status.
TH2D * fHEventsAcceptedXY
Events w/trigger and vertex in range.
Double_t fMinPileupDistance
Bool_t ReadRunDetails(const AliESDEvent *esd)
void CacheConfiguredTriggerClasses(TList &cache, const TList *classes, AliOADBPhysicsSelection *o)
Bool_t FetchHistograms(const TList *d, TH1I *&hEventsTr, TH1I *&hEventsTrVtx, TH1I *&hEventsAcc, TH1I *&hTriggers) const
virtual Bool_t CheckFastPartition(bool fastonly) const
TH1I * fHVtxStatus
Event processing status.
UInt_t Process(const AliESDEvent *event, UInt_t &triggers, Bool_t &lowFlux, UShort_t &ivz, TVector3 &ip, Double_t ¢, UShort_t &nClusters)
static const char * MagneticFieldString(Short_t field)
static const char * fgkFolderName
virtual EVtxStatus CheckpA2012Vertex(const AliESDEvent &esd, TVector3 &ip) const
Various utilities used in PWGLF/FORWARD.
void SetCentralityMethod(const TString &m)
virtual void StoreProduction()
TList fBgWords
Configured collision words.
Bool_t ReadVertex(const AliESDEvent &esd, TVector3 &ip)
virtual EVtxStatus CheckpA2013Vertex(const AliESDEvent &esd, TVector3 &ip) const
virtual void StoreInformation()
virtual Bool_t ReadCentrality(const AliESDEvent &esd, Double_t ¢, UShort_t &qual) const
TH1I * fHEventsAccepted
Events w/trigger and vertex.
void CreateOutputObjects(TList *dir)
virtual Bool_t CheckINELGT0(const AliESDEvent &esd, UShort_t &nClusters, UInt_t &triggers) const
#define DGUARD(L, N, F,...)
TH1I * fHStatus
Centrality vs quality.
static void PrintTask(const TObject &o)
static TObject * MakeParameter(const char *name, UShort_t value)
TString fCentMethod
Configured background words.
static UShort_t ParseCollisionSystem(const char *sys)
void SetMinCentrality(Double_t mincent=-1.0)
AliDisplacedVertexSelection fDisplacedVertex
TH1I * fHTrgStatus
Vertex processing status.
static Float_t GetCentrality(const AliVEvent &event, const TString &method, Int_t &qual, Bool_t verbose=false)
UShort_t fMinPileupContrib
TH1I * fHWords
Type (low/high flux) of event.
static ULong_t AliROOTBranch()
virtual Bool_t CheckWords(const AliESDEvent &esd, UInt_t &triggers) const
void Print(Option_t *option="") const
Double_t GetCentralityPercentile() const
virtual Bool_t CheckMultiVertex(const AliESDEvent &esd, Bool_t checkOtherBC=false) const
virtual ~AliFMDEventInspector()
TH1F * fHCent
Trigger words.
static const char * CollisionSystemString(UShort_t sys)
Double_t GetVertexZ() const
void SetupForData(TList *l, const char *name=0, Bool_t mc=false)
TH2F * fHCentVsQual
Centrality.
Bool_t IsSatellite() const
static const char * CodeString(UInt_t mask)
static ULong_t AliROOTRevision()
UShort_t fCollisionSystem
Bool_t AllowDisplaced() const
Bool_t ReadTriggers(const AliESDEvent &esd, UInt_t &triggers, UShort_t &nClusters)
virtual Bool_t CheckEmpty(const TString &trigStr, UInt_t &triggers) const
Bool_t CheckpAExtraV0(const AliESDEvent &esd) const
virtual void SetupForData(const TAxis &vtxAxis)
virtual EVtxStatus CheckPWGUDVertex(const AliESDEvent &esd, TVector3 &ip) const