fHVertex(0),
fHPhiR(0),
fHB(0),
+ fHMcC(0),
fHBvsPart(0),
fHBvsBin(0),
fHBvsCent(0),
fHVzComp(0),
fHCentVsPart(0),
fHCentVsBin(0),
+ fHCentVsMcC(0),
fProduction("")
{
//
fHVertex(0),
fHPhiR(0),
fHB(0),
+ fHMcC(0),
fHBvsPart(0),
fHBvsBin(0),
fHBvsCent(0),
fHVzComp(0),
fHCentVsPart(0),
fHCentVsBin(0),
+ fHCentVsMcC(0),
fProduction("")
{
//
// Parameters:
// name Name of object
//
+ fMC = true;
}
//____________________________________________________________________
fHVertex(0),
fHPhiR(0),
fHB(0),
+ fHMcC(0),
fHBvsPart(0),
fHBvsBin(0),
fHBvsCent(0),
fHVzComp(0),
fHCentVsPart(0),
fHCentVsBin(0),
+ fHCentVsMcC(0),
fProduction("")
{
//
// Parameters:
// vtxAxis Vertex axis in use
//
+
+ // We temporary disable the displaced vertices so we can initialize
+ // the routine ourselves.
+ Bool_t saveDisplaced = fUseDisplacedVertices;
+ fUseDisplacedVertices = false;
AliFMDEventInspector::SetupForData(vtxAxis);
+ fUseDisplacedVertices = saveDisplaced;
Int_t maxPart = 450;
Int_t maxBin = 225;
fHB->SetDirectory(0);
fList->Add(fHB);
+ fHMcC = static_cast<TH1F*>(fHCent->Clone("mcC"));
+ fHMcC->SetFillColor(kCyan+2);
+ fHMcC->SetDirectory(0);
+ fList->Add(fHMcC);
+
fHBvsPart = new TH2F("bVsParticipants", "Impact parameter vs Participants",
5*maxB, 0, maxB, maxPart, -.5, maxPart-.5);
fHBvsPart->SetXTitle("b [fm]");
fHCentVsBin->SetZTitle("Event");
fHCentVsBin->SetDirectory(0);
fList->Add(fHCentVsBin);
-}
-//____________________________________________________________________
-void
-AliFMDMCEventInspector::StoreInformation(Int_t runNo)
-{
- // Store information about running conditions in the output list
- if (!fList) return;
- AliFMDEventInspector::StoreInformation(runNo);
- TParameter<bool>* mc = new TParameter<bool>("mc",true); // , fProduction.Data());
- mc->SetUniqueID(1);
- fList->Add(mc);
+ Int_t nC = fHCent->GetNbinsX();
+ Double_t cL = fHCent->GetXaxis()->GetXmin();
+ Double_t cH = fHCent->GetXaxis()->GetXmax();
+ fHCentVsMcC = new TH2F("centralityRecoVsMC",
+ "Centrality from reconstruction vs MC derived",
+ nC, cL, cH, nC, cL, cH);
+ fHCentVsMcC->SetDirectory(0);
+ fHCentVsMcC->SetStats(0);
+ fHCentVsMcC->SetXTitle("Centralty from Reco [%]");
+ fHCentVsMcC->SetYTitle("Centralty derived from Impact Par. [%]");
+ fHCentVsMcC->SetZTitle("Events");
+ fList->Add(fHCentVsMcC);
+
+ if (fUseDisplacedVertices) fDisplacedVertex.SetupForData(fList, "", true);
}
namespace
fHVertex->Fill(vz);
fHPhiR->Fill(phiR);
fHB->Fill(b);
+ fHMcC->Fill(c);
fHBvsPart->Fill(b, npart);
fHBvsBin->Fill(b, nbin);
if(fUseDisplacedVertices) {
+#if 0
// Put the vertex at fixed locations
Double_t zvtx = vz;
Double_t ratio = zvtx/37.5;
zvtx = 37.5*((Double_t)ratioInt);
if(TMath::Abs(zvtx) > 999)
return kBadVertex;
+#endif
+ if (!fDisplacedVertex.ProcessMC(event))
+ return kBadVertex;
+ if (fDisplacedVertex.IsSatellite())
+ vz = fDisplacedVertex.GetVertexZ();
}
// Check for the vertex bin
return kOk;
}
+//____________________________________________________________________
+Bool_t
+AliFMDMCEventInspector::ReadCentrality(const AliESDEvent& esd,
+ Double_t& cent,
+ UShort_t& qual) const
+{
+ //
+ // Read centrality from event
+ //
+ // Parameters:
+ // esd Event
+ // cent On return, the centrality or negative if not found
+ //
+ // Return:
+ // False on error, true otherwise
+ //
+ Bool_t ret = AliFMDEventInspector::ReadCentrality(esd, cent, qual);
+ if (qual != 0) {
+ AliCentrality* centObj = const_cast<AliESDEvent&>(esd).GetCentrality();
+ if (!centObj) return ret;
+
+ // For MC, we allow `bad' centrality selections
+ cent = centObj->GetCentralityPercentileUnchecked(fCentMethod);
+ }
+ return ret;
+}
//____________________________________________________________________
namespace {
//____________________________________________________________________
Bool_t
AliFMDMCEventInspector::CompareResults(Double_t vz, Double_t trueVz,
- Double_t cent, Double_t b,
+ Double_t cent, Double_t mcC,
+ Double_t b,
Int_t npart, Int_t nbin)
{
fHVzComp->Fill(trueVz, vz);
fHBvsCent->Fill(b, cent);
fHCentVsPart->Fill(npart, cent);
fHCentVsBin->Fill(nbin, cent);
+ fHCentVsMcC->Fill(cent, mcC);
return true;
}
+
+
//
// EOF
//