ROOT logo
// 
// This class inspects the event 
//
// Input:
//   - AliESDFMD object possibly corrected for sharing
//
// Output:
//   - A histogram of v_z of events with triggers. 
//   - A histogram of v_z of events with vertex and triggers 
//   - A histogram of trigger counters 
// 
// Note, that these are added to the master output list 
//
// Corrections used: 
//   - None
//
#include "AliFMDMCEventInspector.h"
#include "AliLog.h"
#include "AliAODForwardMult.h"
#include "AliForwardUtil.h"
#include "AliCentrality.h"
#include "AliESDEvent.h"
#include "AliMCEvent.h"
#include "AliStack.h"
#include "AliGenPythiaEventHeader.h"
#include "AliGenDPMjetEventHeader.h"
#include "AliGenHijingEventHeader.h"
// #include "AliGenHydjetEventHeader.h"
#include "AliGenEposEventHeader.h"
#include "AliGenHerwigEventHeader.h"
#include "AliGenGeVSimEventHeader.h"
#include "AliAnalysisManager.h"
#include "AliMCEventHandler.h"
#include "AliHeader.h"
#include <TList.h>
#include <TH2F.h>
#include <TParticle.h>
#include <TMath.h>
#include <TParameter.h>

//====================================================================
AliFMDMCEventInspector::AliFMDMCEventInspector()
  : AliFMDEventInspector(), 
    fHVertex(0),
    fHPhiR(0), 
    fHB(0),
    fHMcC(0),
    fHBvsPart(0),
    fHBvsBin(0),
    fHBvsCent(0),
    fHVzComp(0),
    fHCentVsPart(0),
    fHCentVsBin(0),
    fHCentVsMcC(0),
    fProduction("")
{
  // 
  // Constructor 
  //
}

//____________________________________________________________________
AliFMDMCEventInspector::AliFMDMCEventInspector(const char* /* name */)
  : AliFMDEventInspector("fmdEventInspector"), 
    fHVertex(0),
    fHPhiR(0), 
    fHB(0),
    fHMcC(0),
    fHBvsPart(0),
    fHBvsBin(0),
    fHBvsCent(0),
    fHVzComp(0),
    fHCentVsPart(0),
    fHCentVsBin(0),
    fHCentVsMcC(0),
    fProduction("")
{
  // 
  // Constructor 
  // 
  // Parameters:
  //   name Name of object
  //
  fMC = true;
}

//____________________________________________________________________
AliFMDMCEventInspector::AliFMDMCEventInspector(const AliFMDMCEventInspector& o)
  : AliFMDEventInspector(o), 
    fHVertex(0),
    fHPhiR(0), 
    fHB(0),
    fHMcC(0),
    fHBvsPart(0),
    fHBvsBin(0),
    fHBvsCent(0),
    fHVzComp(0),
    fHCentVsPart(0),
    fHCentVsBin(0),
    fHCentVsMcC(0),
    fProduction("")
{
  // 
  // Copy constructor 
  // 
  // Parameters:
  //   o Object to copy from 
  //
}

//____________________________________________________________________
AliFMDMCEventInspector::~AliFMDMCEventInspector()
{
  // 
  // Destructor 
  //
}
//____________________________________________________________________
AliFMDMCEventInspector&
AliFMDMCEventInspector::operator=(const AliFMDMCEventInspector& o)
{
  // 
  // Assignement operator
  // 
  // Parameters:
  //   o Object to assign from 
  // 
  // Return:
  //    Reference to this object
  //
  AliFMDEventInspector::operator=(o);
  return *this;
}

//____________________________________________________________________
void
AliFMDMCEventInspector::SetupForData(const TAxis& vtxAxis)
{
  // 
  // Initialize the object 
  // 
  // Parameters:
  //   vtxAxis Vertex axis in use 
  //

  // We temporary disable the displaced vertices so we can initialize
  // the routine ourselves.
  Bool_t saveDisplaced  = AllowDisplaced();
  if (saveDisplaced) SetVertexMethod(kNormal);
  AliFMDEventInspector::SetupForData(vtxAxis);
  if (saveDisplaced) SetVertexMethod(kDisplaced);

  Int_t    maxPart = 450;
  Int_t    maxBin  = 225;
  Int_t    maxB    = 25;
  Int_t    nVtx = vtxAxis.GetNbins();
  Double_t lVtx = vtxAxis.GetXmin();
  Double_t hVtx = vtxAxis.GetXmax();
  fHVertex = new TH1F("vertex", "True vertex distribution", nVtx, lVtx, hVtx);
  fHVertex->SetXTitle("v_{z} [cm]");
  fHVertex->SetYTitle("# of events");
  fHVertex->SetFillColor(kGreen+1);
  fHVertex->SetFillStyle(3001);
  fHVertex->SetDirectory(0);
  // fHVertex->Sumw2();
  fList->Add(fHVertex);

  fHPhiR = new TH1F("phiR", "Event plane", 120, 0, 2*TMath::Pi());
  fHPhiR->SetXTitle("#Phi_{R} [radians]");
  fHPhiR->SetYTitle("# of events");
  fHPhiR->SetFillColor(kGreen+1);
  fHPhiR->SetFillStyle(3001);
  fHPhiR->SetDirectory(0);
  fList->Add(fHPhiR);

  fHB = new TH1F("b", "Impact parameter", 5*maxB, 0, maxB);
  fHB->SetXTitle("b [fm]");
  fHB->SetYTitle("# of events");
  fHB->SetFillColor(kGreen+1);
  fHB->SetFillStyle(3001);
  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]");
  fHBvsPart->SetYTitle("# of participants");
  fHBvsPart->SetZTitle("Events");
  fHBvsPart->SetDirectory(0);
  fList->Add(fHBvsPart);

  fHBvsBin = new TH2F("bVsBinary", "Impact parameter vs Binary Collisions",
		       5*maxB, 0, maxB, maxBin, -.5, maxBin-.5);
  fHBvsBin->SetXTitle("b [fm]");
  fHBvsBin->SetYTitle("# of binary collisions");
  fHBvsBin->SetZTitle("Events");
  fHBvsBin->SetDirectory(0);
  fList->Add(fHBvsBin);
  
  fHBvsCent = new TH2F("bVsCentrality", "Impact parameter vs Centrality",
		       5*maxB, 0, maxB, fCentAxis->GetNbins(), 
		       fCentAxis->GetXbins()->GetArray());
  fHBvsCent->SetXTitle("b [fm]");
  fHBvsCent->SetYTitle("Centrality [%]");
  fHBvsCent->SetZTitle("Event");
  fHBvsCent->SetDirectory(0);
  fList->Add(fHBvsCent);
  
  
  fHVzComp = new TH2F("vzComparison", "v_{z} truth vs reconstructed",
		      10*nVtx, lVtx, hVtx, 10*nVtx, lVtx, hVtx);
  fHVzComp->SetXTitle("True v_{z} [cm]");
  fHVzComp->SetYTitle("Reconstructed v_{z} [cm]");
  fHVzComp->SetZTitle("Events");
  fHVzComp->SetDirectory(0);
  fList->Add(fHVzComp);

  fHCentVsPart = new TH2F("centralityVsParticipans", 
			  "# of participants vs Centrality",
			  maxPart, -.5, maxPart-.5, fCentAxis->GetNbins(), 
			  fCentAxis->GetXbins()->GetArray());
  fHCentVsPart->SetXTitle("Participants");
  fHCentVsPart->SetYTitle("Centrality [%]");
  fHCentVsPart->SetZTitle("Event");
  fHCentVsPart->SetDirectory(0);
  fList->Add(fHCentVsPart);

  fHCentVsBin = new TH2F("centralityVsBinary", 
			 "# of binary collisions vs Centrality",
			 maxBin, -.5, maxBin-.5, fCentAxis->GetNbins(), 
			 fCentAxis->GetXbins()->GetArray());
  fHCentVsBin->SetXTitle("Binary collisions");
  fHCentVsBin->SetYTitle("Centrality [%]");
  fHCentVsBin->SetZTitle("Event");
  fHCentVsBin->SetDirectory(0);
  fList->Add(fHCentVsBin);

  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 (AllowDisplaced()) fDisplacedVertex.SetupForData(fList, "", true);
}

namespace
{
  TString& AppendField(TString& s, bool test, const char* f)
  {
    if (!test) return s;
    if (!s.IsNull()) s.Append(",");
    s.Append(f);
    return s;
  }
}

//____________________________________________________________________
void
AliFMDMCEventInspector::ReadProductionDetails(AliMCEvent* event)
{
  //Assign MC only triggers : True NSD etc.
  AliHeader*               header          = event->Header();
  AliGenEventHeader*       genHeader       = header->GenEventHeader();
  AliCollisionGeometry*    colGeometry     = 
    dynamic_cast<AliCollisionGeometry*>(genHeader);
  AliGenPythiaEventHeader* pythiaHeader    = 
    dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
  AliGenDPMjetEventHeader* dpmHeader       = 
    dynamic_cast<AliGenDPMjetEventHeader*>(genHeader);
  AliGenGeVSimEventHeader* gevHeader       = 
    dynamic_cast<AliGenGeVSimEventHeader*>(genHeader);
  AliGenHerwigEventHeader* herwigHeader    = 
    dynamic_cast<AliGenHerwigEventHeader*>(genHeader);
  AliGenHijingEventHeader* hijingHeader    = 
    dynamic_cast<AliGenHijingEventHeader*>(genHeader);
  // AliGenHydjetEventHeader* hydjetHeader    = 
  //   dynamic_cast<AliGenHydjetEventHeader*>(genHeader);
  AliGenEposEventHeader*   eposHeader      = 
    dynamic_cast<AliGenEposEventHeader*>(genHeader);

  AppendField(fProduction, colGeometry,  "Geometry");
  AppendField(fProduction, pythiaHeader, "Pythia");
  AppendField(fProduction, dpmHeader,    "DPM");
  AppendField(fProduction, gevHeader,    "GevSim");
  AppendField(fProduction, herwigHeader, "Herwig");
  AppendField(fProduction, hijingHeader, "Hijing");
  // AppendField(fProduction, hydjetHeader, "Hydjet");
  AppendField(fProduction, eposHeader,   "EPOS");
}

//____________________________________________________________________
UInt_t
AliFMDMCEventInspector::ProcessMC(AliMCEvent*       event, 
				  UInt_t&           triggers,
				  UShort_t&         ivz, 
				  Double_t&         vz,
				  Double_t&         b,
				  Double_t&         c,
				  Int_t&            npart, 
				  Int_t&            nbin,
				  Double_t&         phiR)
{
  // 
  // Process the event 
  // 
  // Parameters:
  //   event     Input event 
  //   triggers  On return, the triggers fired 
  //   ivz       On return, the found vertex bin (1-based).  A zero
  //                  means outside of the defined vertex range
  //   vz        On return, the z position of the interaction
  //   b         On return, the impact parameter - < 0 if not available
  //   c         On return, centrality estimate - < 0 if not available 
  //   phiR      On return, the event plane angle - < 0 if not available 
  // 
  // Return:
  //    0 (or kOk) on success, otherwise a bit mask of error codes 
  //

  // Check that we have an event 
  if (!event) { 
    AliWarning("No MC event found for input event");
    return kNoEvent;
  }

  //Assign MC only triggers : True NSD etc.
  AliHeader*               header          = event->Header();
  AliGenEventHeader*       genHeader       = header->GenEventHeader();
  AliCollisionGeometry*    colGeometry     = 
    dynamic_cast<AliCollisionGeometry*>(genHeader);
  AliGenPythiaEventHeader* pythiaHeader    = 
    dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
  AliGenDPMjetEventHeader* dpmHeader       = 
    dynamic_cast<AliGenDPMjetEventHeader*>(genHeader);
  AliGenGeVSimEventHeader* gevHeader       = 
    dynamic_cast<AliGenGeVSimEventHeader*>(genHeader);
  AliGenHerwigEventHeader* herwigHeader    = 
    dynamic_cast<AliGenHerwigEventHeader*>(genHeader);
  // AliGenHijingEventHeader* hijingHeader    = 
  //   dynamic_cast<AliGenHijingEventHeader*>(genHeader);
  // AliGenHydjetEventHeader* hydjetHeader    = 
  //   dynamic_cast<AliGenHydjetEventHeader*>(genHeader);
  // AliGenEposEventHeader*   eposHeader      = 
  //   dynamic_cast<AliGenEposEventHeader*>(genHeader);
  
  // Check if this is a single diffractive event 
  Bool_t   sd    = false;
  Double_t phi   = -1111;
  Bool_t   egSD  = false;
  npart          = 0;
  nbin           = 0;
  b              = -1;
  c              = -1;
  phiR           = -1111;
  if (colGeometry) { 
    b     = colGeometry->ImpactParameter();
    phi   = colGeometry->ReactionPlaneAngle();
    npart = (colGeometry->ProjectileParticipants() + 
	     colGeometry->TargetParticipants());
    nbin  = colGeometry->NN();
  }
  if (fDebug && !colGeometry) { 
    AliWarningF("Collision header of class %s is not a CollisionHeader", 
		genHeader->ClassName());
  }
    
  if(pythiaHeader) {
    Int_t pythiaType = pythiaHeader->ProcessType();
    egSD = true; // We have SD flag in EG
    if (pythiaType <= 100) {
      // Pythia6 
      // 92 and 93 are SD 
      // 94 is DD 
      if (pythiaType==92 || pythiaType==93) sd = true;
    }
    else {
      // Pythia8 
      if (pythiaType==103 || pythiaType==104) sd = true;
    }
    b     = pythiaHeader->GetImpactParameter();
    npart = 2; // Always 2 protons
    nbin  = 1; // Always 1 binary collision 
  }
  if (b >= 0) { 
#if 0
    if      (b <  3.5)  c = 2.5; //0-5%
    else if (b <  4.95) c = 7.5; //5-10%
    else if (b <  6.98) c = 15; //10-20%
    else if (b <  8.55) c = 25; //20-30%
    else if (b <  9.88) c = 35; //30-40%
    else if (b < 11.04) c = 45; //40-50%
    else                c = 55; //50-60%
#else 
    // Updated 4th of November 2014 from 
    // cern.ch/twiki/bin/view/ALICE/CentStudies#Tables_with_centrality_bins_AN1
    Float_t np=0;
    UInt_t  nc=0;
    if      (0.00 >= b  && b < 1.57)  { c=0.5;  np=403.8; nc=1861; } 
    else if (1.57 >= b  && b < 2.22)  { c=1.5;  np=393.6; nc=1766; } 
    else if (2.22 >= b  && b < 2.71)  { c=2.5;  np=382.9; nc=1678; } 
    else if (2.71 >= b  && b < 3.13)  { c=3.5;  np=372;   nc=1597; }  
    else if (3.13 >= b  && b < 3.50)  { c=4.5;  np=361.1; nc=1520; } 
    else if (3.50 >= b  && b < 4.94)  { c=7.5;  np=329.4; nc=1316; } 
    else if (4.94 >= b  && b < 6.05)  { c=12.5; np=281.2; nc=1032; } 
    else if (6.05 >= b  && b < 6.98)  { c=17.5; np=239;   nc=809.8; }
    else if (6.98 >= b  && b < 7.81)  { c=22.5; np=202.1; nc=629.6; }
    else if (7.81 >= b  && b < 8.55)  { c=27.5; np=169.5; nc=483.7; }
    else if (8.55 >= b  && b < 9.23)  { c=32.5; np=141;   nc=366.7; }
    else if (9.23 >= b  && b < 9.88)  { c=37.5; np=116;   nc=273.4; }
    else if (9.88 >= b  && b < 10.47) { c=42.5; np=94.11; nc=199.4; } 
    else if (10.47 >= b && b < 11.04) { c=47.5; np=75.3;  nc=143.1; } 
    else if (11.04 >= b && b < 11.58) { c=52.5; np=59.24; nc=100.1; }
    else if (11.58 >= b && b < 12.09) { c=57.5; np=45.58; nc=68.46; }
    else if (12.09 >= b && b < 12.58) { c=62.5; np=34.33; nc=45.79; }
    else if (12.58 >= b && b < 13.05) { c=67.5; np=25.21; nc=29.92; }
    else if (13.05 >= b && b < 13.52) { c=72.5; np=17.96; nc=19.08; }
    else if (13.52 >= b && b < 13.97) { c=77.5; np=12.58; nc=12.07; }
    else if (13.97 >= b && b < 14.43) { c=82.5; np=8.812; nc=7.682; }
    else if (14.43 >= b && b < 14.96) { c=87.5; np=6.158; nc=4.904; }
    else if (14.96 >= b && b < 15.67) { c=92.5; np=4.376; nc=3.181; }
    else if (15.67 >= b && b < 20.00) { c=97.5; np=3.064; nc=1.994; }
    // Be careful to round off
    if (npart <= 0) npart = Int_t(np+.5);
    if (nbin  <= 0) nbin  = Int_t(nc+.5)/2;
#endif
  }
  if(dpmHeader) { // Also an AliCollisionGeometry 
    Int_t processType = dpmHeader->ProcessType();
    egSD = true; // We have SD flag in EG
    // 1 & 4 are ND 
    // 5 & 6 are SD 
    // 7 is DD 
    if (processType == 5 || processType == 6)  sd = kTRUE;
  }
  if (gevHeader) { 
    phi  = gevHeader->GetEventPlane();
  }
  if (herwigHeader) {
    Int_t processType = herwigHeader->ProcessType();
    egSD = true; // We have SD flag in EG
    // This is a guess 
    if (processType == 5 || processType == 6)  sd = kTRUE;
    npart = 2; // Always 2 protons
    nbin  = 1; // Always 1 binary collision 
  }
  // if (hijingHeader) { 
  // b    = hijingHeader->ImpactParameter();
  // phi  = hijingHeader->ReactionPlaneAngle();
  // }
  // if (hydjetHeader) {
  //   b    = hydjetHeader->ImpactParameter();
  //   phi  = hydjetHeader->ReactionPlaneAngle();
  // }
  // if (eposHeader) {
  //   b    = eposHeader->ImpactParameter();
  // phi  = eposHeader->ReactionPlaneAngle();
  // }

  // Normalize event plane angle to [0,2pi]
  if (phi <= -1111) phiR = -1;
  else { 
    while (true) {
      if      (phi < 0)             phi += 2*TMath::Pi();
      else if (phi > 2*TMath::Pi()) phi -= 2*TMath::Pi();
      else                          break;
    }
    phiR = phi;
  }

  // Do a check on particles - but only if the EG does not give it or
  // the impact parameter is large enough
  if (!egSD && (b < 0 || b > 15)) sd = IsSingleDiffractive(event->Stack());

  // Set NSD flag
  if(!sd) {
    triggers |= AliAODForwardMult::kMCNSD;
    fHTriggers->Fill(kMCNSD+0.5);
  }
  
  // Get the primary vertex from EG 
  TArrayF vtx;
  genHeader->PrimaryVertex(vtx);
  vz = vtx[2];

  DMSG(fDebug, 2, "vz=%f, phiR=%f, b=%f, npart=%d, nbin=%d", 
       vz, phiR, b, npart, nbin);

  fHVertex->Fill(vz);
  fHPhiR->Fill(phiR);
  fHB->Fill(b);
  fHMcC->Fill(c);
  fHBvsPart->Fill(b, npart);
  fHBvsBin->Fill(b, nbin);

  if(AllowDisplaced()) {
#if 0
    // Put the vertex at fixed locations 
    Double_t zvtx  = vz;
    Double_t ratio = zvtx/37.5;
    if(ratio > 0) ratio = ratio + 0.5;
    if(ratio < 0) ratio = ratio - 0.5;
    Int_t ratioInt = Int_t(ratio);
    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 
  ivz = fVtxAxis.FindBin(vz);
  if (ivz <= 0 || ivz > fHEventsTr->GetXaxis()->GetNbins()) { 
    if (fDebug > 3) {
      AliWarning(Form("Vertex @ %f outside of range [%f,%f]", 
		      vz, fVtxAxis.GetXmin(), fVtxAxis.GetXmax())); }
    ivz = 0;
    return kBadVertex;
  }

  
  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 {
  Double_t rapidity(TParticle* p, Double_t mass)
  {
    Double_t pt = p->Pt();
    Double_t pz = p->Pz();
    Double_t ee = TMath::Sqrt(pt*pt+pz*pz+mass*mass);
    if (TMath::Abs(ee - TMath::Abs(pz)) < 1e-9) return TMath::Sign(1e30, pz);
    return .5 * TMath::Log((ee + pz) / (ee - pz)); 
  }
}

//____________________________________________________________________
Bool_t
AliFMDMCEventInspector::IsSingleDiffractive(AliStack* stack,
					    Double_t xiMin, 
					    Double_t xiMax) const
{
  // Re-implementation of AliPWG0Helper::IsHadronLevelSingleDiffrative
  // 
  // This is re-implemented here to be indendent of the PWG0 library. 
  TParticle* p1 = 0;     // Particle with least y 
  TParticle* p2 = 0;     // Particle with largest y 
  Double_t   y1 =  1e10; // y of p1 
  Double_t   y2 = -1e10; // y of p2 
  
  // Loop over primaries 
  for (Int_t i = 0; i < stack->GetNprimary(); i++) { 
    TParticle* p = stack->Particle(i);
    if (!p) continue;
    
    Int_t pdg = TMath::Abs(p->GetPdgCode());
    Int_t c1  = p->GetFirstDaughter();
    Int_t s   = p->GetStatusCode();
    Int_t mfl = Int_t(pdg/TMath::Power(10,Int_t(TMath::Log10(pdg))));

    // Select final state charm and beauty 
    if (c1 > -1 || s != 1) mfl = 0; 

    // Check if this is a primary, pi0, Sigma0, ???, or most
    // significant digit is larger than or equal to 4
    if (!(stack->IsPhysicalPrimary(i) || 
	  pdg == 111  || 
	  pdg == 3212 || 
	  pdg == 3124 || 
	  mfl >= 4)) continue;

    Int_t m1 = p->GetFirstMother();
    if (m1 > 0) { 
      TParticle* pm1  = stack->Particle(m1);
      Int_t      mpdg = TMath::Abs(pm1->GetPdgCode());
      // Check if mother is a p0, Simga0, or ???
      if (mpdg == 111 || mpdg == 3124 || mpdg == 3212) continue;
    }
    
    // Calculate the rapidity of the particle 
    Double_t mm = (pdg != 3124 ? p->GetMass() : 1.5195);
    Double_t yy = rapidity(p, mm);
    
    // Check if the rapidity of this particle is further out than any
    // of the preceding particles
    if (yy < y1) { 
      y1 = yy;
      p1 = p;
    }
    if (yy > y2) { 
      y2 = yy;
      p2 = p;
    }
  }
  if (!p1 || !p2) return false;
  
  // Calculate rapidities assuming protons 
  y1            = TMath::Abs(rapidity(p1, 0.938));
  y2            = TMath::Abs(rapidity(p2, 0.938));

  // Check if both or just one is a proton
  Int_t    pdg1 = p1->GetPdgCode();
  Int_t    pdg2 = p2->GetPdgCode();
  Int_t    arm  = -99999;
  if (pdg1 == 2212 && pdg2 == 2212) 
    arm = (y1 > y2 ? 0 : 1);
  else if (pdg1 == 2212) 
    arm = 0;
  else if (pdg2 == 2212) 
    arm = 1;
  else 
    return false;
  
  // Rapidity shift
  Double_t m02s = (fEnergy > 0 ? 1 - 2 * p1->Energy() / fEnergy : 0); 
  Double_t m12s = (fEnergy > 0 ? 1 - 2 * p2->Energy() / fEnergy : 0);
  
  if (arm == 0 && m02s > xiMin && m02s < xiMax) return true;
  if (arm == 1 && m12s > xiMin && m12s < xiMax) return true;
    
  return false;
}

//____________________________________________________________________
Bool_t
AliFMDMCEventInspector::CompareResults(Double_t vz,    Double_t trueVz, 
				       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
//

 AliFMDMCEventInspector.cxx:1
 AliFMDMCEventInspector.cxx:2
 AliFMDMCEventInspector.cxx:3
 AliFMDMCEventInspector.cxx:4
 AliFMDMCEventInspector.cxx:5
 AliFMDMCEventInspector.cxx:6
 AliFMDMCEventInspector.cxx:7
 AliFMDMCEventInspector.cxx:8
 AliFMDMCEventInspector.cxx:9
 AliFMDMCEventInspector.cxx:10
 AliFMDMCEventInspector.cxx:11
 AliFMDMCEventInspector.cxx:12
 AliFMDMCEventInspector.cxx:13
 AliFMDMCEventInspector.cxx:14
 AliFMDMCEventInspector.cxx:15
 AliFMDMCEventInspector.cxx:16
 AliFMDMCEventInspector.cxx:17
 AliFMDMCEventInspector.cxx:18
 AliFMDMCEventInspector.cxx:19
 AliFMDMCEventInspector.cxx:20
 AliFMDMCEventInspector.cxx:21
 AliFMDMCEventInspector.cxx:22
 AliFMDMCEventInspector.cxx:23
 AliFMDMCEventInspector.cxx:24
 AliFMDMCEventInspector.cxx:25
 AliFMDMCEventInspector.cxx:26
 AliFMDMCEventInspector.cxx:27
 AliFMDMCEventInspector.cxx:28
 AliFMDMCEventInspector.cxx:29
 AliFMDMCEventInspector.cxx:30
 AliFMDMCEventInspector.cxx:31
 AliFMDMCEventInspector.cxx:32
 AliFMDMCEventInspector.cxx:33
 AliFMDMCEventInspector.cxx:34
 AliFMDMCEventInspector.cxx:35
 AliFMDMCEventInspector.cxx:36
 AliFMDMCEventInspector.cxx:37
 AliFMDMCEventInspector.cxx:38
 AliFMDMCEventInspector.cxx:39
 AliFMDMCEventInspector.cxx:40
 AliFMDMCEventInspector.cxx:41
 AliFMDMCEventInspector.cxx:42
 AliFMDMCEventInspector.cxx:43
 AliFMDMCEventInspector.cxx:44
 AliFMDMCEventInspector.cxx:45
 AliFMDMCEventInspector.cxx:46
 AliFMDMCEventInspector.cxx:47
 AliFMDMCEventInspector.cxx:48
 AliFMDMCEventInspector.cxx:49
 AliFMDMCEventInspector.cxx:50
 AliFMDMCEventInspector.cxx:51
 AliFMDMCEventInspector.cxx:52
 AliFMDMCEventInspector.cxx:53
 AliFMDMCEventInspector.cxx:54
 AliFMDMCEventInspector.cxx:55
 AliFMDMCEventInspector.cxx:56
 AliFMDMCEventInspector.cxx:57
 AliFMDMCEventInspector.cxx:58
 AliFMDMCEventInspector.cxx:59
 AliFMDMCEventInspector.cxx:60
 AliFMDMCEventInspector.cxx:61
 AliFMDMCEventInspector.cxx:62
 AliFMDMCEventInspector.cxx:63
 AliFMDMCEventInspector.cxx:64
 AliFMDMCEventInspector.cxx:65
 AliFMDMCEventInspector.cxx:66
 AliFMDMCEventInspector.cxx:67
 AliFMDMCEventInspector.cxx:68
 AliFMDMCEventInspector.cxx:69
 AliFMDMCEventInspector.cxx:70
 AliFMDMCEventInspector.cxx:71
 AliFMDMCEventInspector.cxx:72
 AliFMDMCEventInspector.cxx:73
 AliFMDMCEventInspector.cxx:74
 AliFMDMCEventInspector.cxx:75
 AliFMDMCEventInspector.cxx:76
 AliFMDMCEventInspector.cxx:77
 AliFMDMCEventInspector.cxx:78
 AliFMDMCEventInspector.cxx:79
 AliFMDMCEventInspector.cxx:80
 AliFMDMCEventInspector.cxx:81
 AliFMDMCEventInspector.cxx:82
 AliFMDMCEventInspector.cxx:83
 AliFMDMCEventInspector.cxx:84
 AliFMDMCEventInspector.cxx:85
 AliFMDMCEventInspector.cxx:86
 AliFMDMCEventInspector.cxx:87
 AliFMDMCEventInspector.cxx:88
 AliFMDMCEventInspector.cxx:89
 AliFMDMCEventInspector.cxx:90
 AliFMDMCEventInspector.cxx:91
 AliFMDMCEventInspector.cxx:92
 AliFMDMCEventInspector.cxx:93
 AliFMDMCEventInspector.cxx:94
 AliFMDMCEventInspector.cxx:95
 AliFMDMCEventInspector.cxx:96
 AliFMDMCEventInspector.cxx:97
 AliFMDMCEventInspector.cxx:98
 AliFMDMCEventInspector.cxx:99
 AliFMDMCEventInspector.cxx:100
 AliFMDMCEventInspector.cxx:101
 AliFMDMCEventInspector.cxx:102
 AliFMDMCEventInspector.cxx:103
 AliFMDMCEventInspector.cxx:104
 AliFMDMCEventInspector.cxx:105
 AliFMDMCEventInspector.cxx:106
 AliFMDMCEventInspector.cxx:107
 AliFMDMCEventInspector.cxx:108
 AliFMDMCEventInspector.cxx:109
 AliFMDMCEventInspector.cxx:110
 AliFMDMCEventInspector.cxx:111
 AliFMDMCEventInspector.cxx:112
 AliFMDMCEventInspector.cxx:113
 AliFMDMCEventInspector.cxx:114
 AliFMDMCEventInspector.cxx:115
 AliFMDMCEventInspector.cxx:116
 AliFMDMCEventInspector.cxx:117
 AliFMDMCEventInspector.cxx:118
 AliFMDMCEventInspector.cxx:119
 AliFMDMCEventInspector.cxx:120
 AliFMDMCEventInspector.cxx:121
 AliFMDMCEventInspector.cxx:122
 AliFMDMCEventInspector.cxx:123
 AliFMDMCEventInspector.cxx:124
 AliFMDMCEventInspector.cxx:125
 AliFMDMCEventInspector.cxx:126
 AliFMDMCEventInspector.cxx:127
 AliFMDMCEventInspector.cxx:128
 AliFMDMCEventInspector.cxx:129
 AliFMDMCEventInspector.cxx:130
 AliFMDMCEventInspector.cxx:131
 AliFMDMCEventInspector.cxx:132
 AliFMDMCEventInspector.cxx:133
 AliFMDMCEventInspector.cxx:134
 AliFMDMCEventInspector.cxx:135
 AliFMDMCEventInspector.cxx:136
 AliFMDMCEventInspector.cxx:137
 AliFMDMCEventInspector.cxx:138
 AliFMDMCEventInspector.cxx:139
 AliFMDMCEventInspector.cxx:140
 AliFMDMCEventInspector.cxx:141
 AliFMDMCEventInspector.cxx:142
 AliFMDMCEventInspector.cxx:143
 AliFMDMCEventInspector.cxx:144
 AliFMDMCEventInspector.cxx:145
 AliFMDMCEventInspector.cxx:146
 AliFMDMCEventInspector.cxx:147
 AliFMDMCEventInspector.cxx:148
 AliFMDMCEventInspector.cxx:149
 AliFMDMCEventInspector.cxx:150
 AliFMDMCEventInspector.cxx:151
 AliFMDMCEventInspector.cxx:152
 AliFMDMCEventInspector.cxx:153
 AliFMDMCEventInspector.cxx:154
 AliFMDMCEventInspector.cxx:155
 AliFMDMCEventInspector.cxx:156
 AliFMDMCEventInspector.cxx:157
 AliFMDMCEventInspector.cxx:158
 AliFMDMCEventInspector.cxx:159
 AliFMDMCEventInspector.cxx:160
 AliFMDMCEventInspector.cxx:161
 AliFMDMCEventInspector.cxx:162
 AliFMDMCEventInspector.cxx:163
 AliFMDMCEventInspector.cxx:164
 AliFMDMCEventInspector.cxx:165
 AliFMDMCEventInspector.cxx:166
 AliFMDMCEventInspector.cxx:167
 AliFMDMCEventInspector.cxx:168
 AliFMDMCEventInspector.cxx:169
 AliFMDMCEventInspector.cxx:170
 AliFMDMCEventInspector.cxx:171
 AliFMDMCEventInspector.cxx:172
 AliFMDMCEventInspector.cxx:173
 AliFMDMCEventInspector.cxx:174
 AliFMDMCEventInspector.cxx:175
 AliFMDMCEventInspector.cxx:176
 AliFMDMCEventInspector.cxx:177
 AliFMDMCEventInspector.cxx:178
 AliFMDMCEventInspector.cxx:179
 AliFMDMCEventInspector.cxx:180
 AliFMDMCEventInspector.cxx:181
 AliFMDMCEventInspector.cxx:182
 AliFMDMCEventInspector.cxx:183
 AliFMDMCEventInspector.cxx:184
 AliFMDMCEventInspector.cxx:185
 AliFMDMCEventInspector.cxx:186
 AliFMDMCEventInspector.cxx:187
 AliFMDMCEventInspector.cxx:188
 AliFMDMCEventInspector.cxx:189
 AliFMDMCEventInspector.cxx:190
 AliFMDMCEventInspector.cxx:191
 AliFMDMCEventInspector.cxx:192
 AliFMDMCEventInspector.cxx:193
 AliFMDMCEventInspector.cxx:194
 AliFMDMCEventInspector.cxx:195
 AliFMDMCEventInspector.cxx:196
 AliFMDMCEventInspector.cxx:197
 AliFMDMCEventInspector.cxx:198
 AliFMDMCEventInspector.cxx:199
 AliFMDMCEventInspector.cxx:200
 AliFMDMCEventInspector.cxx:201
 AliFMDMCEventInspector.cxx:202
 AliFMDMCEventInspector.cxx:203
 AliFMDMCEventInspector.cxx:204
 AliFMDMCEventInspector.cxx:205
 AliFMDMCEventInspector.cxx:206
 AliFMDMCEventInspector.cxx:207
 AliFMDMCEventInspector.cxx:208
 AliFMDMCEventInspector.cxx:209
 AliFMDMCEventInspector.cxx:210
 AliFMDMCEventInspector.cxx:211
 AliFMDMCEventInspector.cxx:212
 AliFMDMCEventInspector.cxx:213
 AliFMDMCEventInspector.cxx:214
 AliFMDMCEventInspector.cxx:215
 AliFMDMCEventInspector.cxx:216
 AliFMDMCEventInspector.cxx:217
 AliFMDMCEventInspector.cxx:218
 AliFMDMCEventInspector.cxx:219
 AliFMDMCEventInspector.cxx:220
 AliFMDMCEventInspector.cxx:221
 AliFMDMCEventInspector.cxx:222
 AliFMDMCEventInspector.cxx:223
 AliFMDMCEventInspector.cxx:224
 AliFMDMCEventInspector.cxx:225
 AliFMDMCEventInspector.cxx:226
 AliFMDMCEventInspector.cxx:227
 AliFMDMCEventInspector.cxx:228
 AliFMDMCEventInspector.cxx:229
 AliFMDMCEventInspector.cxx:230
 AliFMDMCEventInspector.cxx:231
 AliFMDMCEventInspector.cxx:232
 AliFMDMCEventInspector.cxx:233
 AliFMDMCEventInspector.cxx:234
 AliFMDMCEventInspector.cxx:235
 AliFMDMCEventInspector.cxx:236
 AliFMDMCEventInspector.cxx:237
 AliFMDMCEventInspector.cxx:238
 AliFMDMCEventInspector.cxx:239
 AliFMDMCEventInspector.cxx:240
 AliFMDMCEventInspector.cxx:241
 AliFMDMCEventInspector.cxx:242
 AliFMDMCEventInspector.cxx:243
 AliFMDMCEventInspector.cxx:244
 AliFMDMCEventInspector.cxx:245
 AliFMDMCEventInspector.cxx:246
 AliFMDMCEventInspector.cxx:247
 AliFMDMCEventInspector.cxx:248
 AliFMDMCEventInspector.cxx:249
 AliFMDMCEventInspector.cxx:250
 AliFMDMCEventInspector.cxx:251
 AliFMDMCEventInspector.cxx:252
 AliFMDMCEventInspector.cxx:253
 AliFMDMCEventInspector.cxx:254
 AliFMDMCEventInspector.cxx:255
 AliFMDMCEventInspector.cxx:256
 AliFMDMCEventInspector.cxx:257
 AliFMDMCEventInspector.cxx:258
 AliFMDMCEventInspector.cxx:259
 AliFMDMCEventInspector.cxx:260
 AliFMDMCEventInspector.cxx:261
 AliFMDMCEventInspector.cxx:262
 AliFMDMCEventInspector.cxx:263
 AliFMDMCEventInspector.cxx:264
 AliFMDMCEventInspector.cxx:265
 AliFMDMCEventInspector.cxx:266
 AliFMDMCEventInspector.cxx:267
 AliFMDMCEventInspector.cxx:268
 AliFMDMCEventInspector.cxx:269
 AliFMDMCEventInspector.cxx:270
 AliFMDMCEventInspector.cxx:271
 AliFMDMCEventInspector.cxx:272
 AliFMDMCEventInspector.cxx:273
 AliFMDMCEventInspector.cxx:274
 AliFMDMCEventInspector.cxx:275
 AliFMDMCEventInspector.cxx:276
 AliFMDMCEventInspector.cxx:277
 AliFMDMCEventInspector.cxx:278
 AliFMDMCEventInspector.cxx:279
 AliFMDMCEventInspector.cxx:280
 AliFMDMCEventInspector.cxx:281
 AliFMDMCEventInspector.cxx:282
 AliFMDMCEventInspector.cxx:283
 AliFMDMCEventInspector.cxx:284
 AliFMDMCEventInspector.cxx:285
 AliFMDMCEventInspector.cxx:286
 AliFMDMCEventInspector.cxx:287
 AliFMDMCEventInspector.cxx:288
 AliFMDMCEventInspector.cxx:289
 AliFMDMCEventInspector.cxx:290
 AliFMDMCEventInspector.cxx:291
 AliFMDMCEventInspector.cxx:292
 AliFMDMCEventInspector.cxx:293
 AliFMDMCEventInspector.cxx:294
 AliFMDMCEventInspector.cxx:295
 AliFMDMCEventInspector.cxx:296
 AliFMDMCEventInspector.cxx:297
 AliFMDMCEventInspector.cxx:298
 AliFMDMCEventInspector.cxx:299
 AliFMDMCEventInspector.cxx:300
 AliFMDMCEventInspector.cxx:301
 AliFMDMCEventInspector.cxx:302
 AliFMDMCEventInspector.cxx:303
 AliFMDMCEventInspector.cxx:304
 AliFMDMCEventInspector.cxx:305
 AliFMDMCEventInspector.cxx:306
 AliFMDMCEventInspector.cxx:307
 AliFMDMCEventInspector.cxx:308
 AliFMDMCEventInspector.cxx:309
 AliFMDMCEventInspector.cxx:310
 AliFMDMCEventInspector.cxx:311
 AliFMDMCEventInspector.cxx:312
 AliFMDMCEventInspector.cxx:313
 AliFMDMCEventInspector.cxx:314
 AliFMDMCEventInspector.cxx:315
 AliFMDMCEventInspector.cxx:316
 AliFMDMCEventInspector.cxx:317
 AliFMDMCEventInspector.cxx:318
 AliFMDMCEventInspector.cxx:319
 AliFMDMCEventInspector.cxx:320
 AliFMDMCEventInspector.cxx:321
 AliFMDMCEventInspector.cxx:322
 AliFMDMCEventInspector.cxx:323
 AliFMDMCEventInspector.cxx:324
 AliFMDMCEventInspector.cxx:325
 AliFMDMCEventInspector.cxx:326
 AliFMDMCEventInspector.cxx:327
 AliFMDMCEventInspector.cxx:328
 AliFMDMCEventInspector.cxx:329
 AliFMDMCEventInspector.cxx:330
 AliFMDMCEventInspector.cxx:331
 AliFMDMCEventInspector.cxx:332
 AliFMDMCEventInspector.cxx:333
 AliFMDMCEventInspector.cxx:334
 AliFMDMCEventInspector.cxx:335
 AliFMDMCEventInspector.cxx:336
 AliFMDMCEventInspector.cxx:337
 AliFMDMCEventInspector.cxx:338
 AliFMDMCEventInspector.cxx:339
 AliFMDMCEventInspector.cxx:340
 AliFMDMCEventInspector.cxx:341
 AliFMDMCEventInspector.cxx:342
 AliFMDMCEventInspector.cxx:343
 AliFMDMCEventInspector.cxx:344
 AliFMDMCEventInspector.cxx:345
 AliFMDMCEventInspector.cxx:346
 AliFMDMCEventInspector.cxx:347
 AliFMDMCEventInspector.cxx:348
 AliFMDMCEventInspector.cxx:349
 AliFMDMCEventInspector.cxx:350
 AliFMDMCEventInspector.cxx:351
 AliFMDMCEventInspector.cxx:352
 AliFMDMCEventInspector.cxx:353
 AliFMDMCEventInspector.cxx:354
 AliFMDMCEventInspector.cxx:355
 AliFMDMCEventInspector.cxx:356
 AliFMDMCEventInspector.cxx:357
 AliFMDMCEventInspector.cxx:358
 AliFMDMCEventInspector.cxx:359
 AliFMDMCEventInspector.cxx:360
 AliFMDMCEventInspector.cxx:361
 AliFMDMCEventInspector.cxx:362
 AliFMDMCEventInspector.cxx:363
 AliFMDMCEventInspector.cxx:364
 AliFMDMCEventInspector.cxx:365
 AliFMDMCEventInspector.cxx:366
 AliFMDMCEventInspector.cxx:367
 AliFMDMCEventInspector.cxx:368
 AliFMDMCEventInspector.cxx:369
 AliFMDMCEventInspector.cxx:370
 AliFMDMCEventInspector.cxx:371
 AliFMDMCEventInspector.cxx:372
 AliFMDMCEventInspector.cxx:373
 AliFMDMCEventInspector.cxx:374
 AliFMDMCEventInspector.cxx:375
 AliFMDMCEventInspector.cxx:376
 AliFMDMCEventInspector.cxx:377
 AliFMDMCEventInspector.cxx:378
 AliFMDMCEventInspector.cxx:379
 AliFMDMCEventInspector.cxx:380
 AliFMDMCEventInspector.cxx:381
 AliFMDMCEventInspector.cxx:382
 AliFMDMCEventInspector.cxx:383
 AliFMDMCEventInspector.cxx:384
 AliFMDMCEventInspector.cxx:385
 AliFMDMCEventInspector.cxx:386
 AliFMDMCEventInspector.cxx:387
 AliFMDMCEventInspector.cxx:388
 AliFMDMCEventInspector.cxx:389
 AliFMDMCEventInspector.cxx:390
 AliFMDMCEventInspector.cxx:391
 AliFMDMCEventInspector.cxx:392
 AliFMDMCEventInspector.cxx:393
 AliFMDMCEventInspector.cxx:394
 AliFMDMCEventInspector.cxx:395
 AliFMDMCEventInspector.cxx:396
 AliFMDMCEventInspector.cxx:397
 AliFMDMCEventInspector.cxx:398
 AliFMDMCEventInspector.cxx:399
 AliFMDMCEventInspector.cxx:400
 AliFMDMCEventInspector.cxx:401
 AliFMDMCEventInspector.cxx:402
 AliFMDMCEventInspector.cxx:403
 AliFMDMCEventInspector.cxx:404
 AliFMDMCEventInspector.cxx:405
 AliFMDMCEventInspector.cxx:406
 AliFMDMCEventInspector.cxx:407
 AliFMDMCEventInspector.cxx:408
 AliFMDMCEventInspector.cxx:409
 AliFMDMCEventInspector.cxx:410
 AliFMDMCEventInspector.cxx:411
 AliFMDMCEventInspector.cxx:412
 AliFMDMCEventInspector.cxx:413
 AliFMDMCEventInspector.cxx:414
 AliFMDMCEventInspector.cxx:415
 AliFMDMCEventInspector.cxx:416
 AliFMDMCEventInspector.cxx:417
 AliFMDMCEventInspector.cxx:418
 AliFMDMCEventInspector.cxx:419
 AliFMDMCEventInspector.cxx:420
 AliFMDMCEventInspector.cxx:421
 AliFMDMCEventInspector.cxx:422
 AliFMDMCEventInspector.cxx:423
 AliFMDMCEventInspector.cxx:424
 AliFMDMCEventInspector.cxx:425
 AliFMDMCEventInspector.cxx:426
 AliFMDMCEventInspector.cxx:427
 AliFMDMCEventInspector.cxx:428
 AliFMDMCEventInspector.cxx:429
 AliFMDMCEventInspector.cxx:430
 AliFMDMCEventInspector.cxx:431
 AliFMDMCEventInspector.cxx:432
 AliFMDMCEventInspector.cxx:433
 AliFMDMCEventInspector.cxx:434
 AliFMDMCEventInspector.cxx:435
 AliFMDMCEventInspector.cxx:436
 AliFMDMCEventInspector.cxx:437
 AliFMDMCEventInspector.cxx:438
 AliFMDMCEventInspector.cxx:439
 AliFMDMCEventInspector.cxx:440
 AliFMDMCEventInspector.cxx:441
 AliFMDMCEventInspector.cxx:442
 AliFMDMCEventInspector.cxx:443
 AliFMDMCEventInspector.cxx:444
 AliFMDMCEventInspector.cxx:445
 AliFMDMCEventInspector.cxx:446
 AliFMDMCEventInspector.cxx:447
 AliFMDMCEventInspector.cxx:448
 AliFMDMCEventInspector.cxx:449
 AliFMDMCEventInspector.cxx:450
 AliFMDMCEventInspector.cxx:451
 AliFMDMCEventInspector.cxx:452
 AliFMDMCEventInspector.cxx:453
 AliFMDMCEventInspector.cxx:454
 AliFMDMCEventInspector.cxx:455
 AliFMDMCEventInspector.cxx:456
 AliFMDMCEventInspector.cxx:457
 AliFMDMCEventInspector.cxx:458
 AliFMDMCEventInspector.cxx:459
 AliFMDMCEventInspector.cxx:460
 AliFMDMCEventInspector.cxx:461
 AliFMDMCEventInspector.cxx:462
 AliFMDMCEventInspector.cxx:463
 AliFMDMCEventInspector.cxx:464
 AliFMDMCEventInspector.cxx:465
 AliFMDMCEventInspector.cxx:466
 AliFMDMCEventInspector.cxx:467
 AliFMDMCEventInspector.cxx:468
 AliFMDMCEventInspector.cxx:469
 AliFMDMCEventInspector.cxx:470
 AliFMDMCEventInspector.cxx:471
 AliFMDMCEventInspector.cxx:472
 AliFMDMCEventInspector.cxx:473
 AliFMDMCEventInspector.cxx:474
 AliFMDMCEventInspector.cxx:475
 AliFMDMCEventInspector.cxx:476
 AliFMDMCEventInspector.cxx:477
 AliFMDMCEventInspector.cxx:478
 AliFMDMCEventInspector.cxx:479
 AliFMDMCEventInspector.cxx:480
 AliFMDMCEventInspector.cxx:481
 AliFMDMCEventInspector.cxx:482
 AliFMDMCEventInspector.cxx:483
 AliFMDMCEventInspector.cxx:484
 AliFMDMCEventInspector.cxx:485
 AliFMDMCEventInspector.cxx:486
 AliFMDMCEventInspector.cxx:487
 AliFMDMCEventInspector.cxx:488
 AliFMDMCEventInspector.cxx:489
 AliFMDMCEventInspector.cxx:490
 AliFMDMCEventInspector.cxx:491
 AliFMDMCEventInspector.cxx:492
 AliFMDMCEventInspector.cxx:493
 AliFMDMCEventInspector.cxx:494
 AliFMDMCEventInspector.cxx:495
 AliFMDMCEventInspector.cxx:496
 AliFMDMCEventInspector.cxx:497
 AliFMDMCEventInspector.cxx:498
 AliFMDMCEventInspector.cxx:499
 AliFMDMCEventInspector.cxx:500
 AliFMDMCEventInspector.cxx:501
 AliFMDMCEventInspector.cxx:502
 AliFMDMCEventInspector.cxx:503
 AliFMDMCEventInspector.cxx:504
 AliFMDMCEventInspector.cxx:505
 AliFMDMCEventInspector.cxx:506
 AliFMDMCEventInspector.cxx:507
 AliFMDMCEventInspector.cxx:508
 AliFMDMCEventInspector.cxx:509
 AliFMDMCEventInspector.cxx:510
 AliFMDMCEventInspector.cxx:511
 AliFMDMCEventInspector.cxx:512
 AliFMDMCEventInspector.cxx:513
 AliFMDMCEventInspector.cxx:514
 AliFMDMCEventInspector.cxx:515
 AliFMDMCEventInspector.cxx:516
 AliFMDMCEventInspector.cxx:517
 AliFMDMCEventInspector.cxx:518
 AliFMDMCEventInspector.cxx:519
 AliFMDMCEventInspector.cxx:520
 AliFMDMCEventInspector.cxx:521
 AliFMDMCEventInspector.cxx:522
 AliFMDMCEventInspector.cxx:523
 AliFMDMCEventInspector.cxx:524
 AliFMDMCEventInspector.cxx:525
 AliFMDMCEventInspector.cxx:526
 AliFMDMCEventInspector.cxx:527
 AliFMDMCEventInspector.cxx:528
 AliFMDMCEventInspector.cxx:529
 AliFMDMCEventInspector.cxx:530
 AliFMDMCEventInspector.cxx:531
 AliFMDMCEventInspector.cxx:532
 AliFMDMCEventInspector.cxx:533
 AliFMDMCEventInspector.cxx:534
 AliFMDMCEventInspector.cxx:535
 AliFMDMCEventInspector.cxx:536
 AliFMDMCEventInspector.cxx:537
 AliFMDMCEventInspector.cxx:538
 AliFMDMCEventInspector.cxx:539
 AliFMDMCEventInspector.cxx:540
 AliFMDMCEventInspector.cxx:541
 AliFMDMCEventInspector.cxx:542
 AliFMDMCEventInspector.cxx:543
 AliFMDMCEventInspector.cxx:544
 AliFMDMCEventInspector.cxx:545
 AliFMDMCEventInspector.cxx:546
 AliFMDMCEventInspector.cxx:547
 AliFMDMCEventInspector.cxx:548
 AliFMDMCEventInspector.cxx:549
 AliFMDMCEventInspector.cxx:550
 AliFMDMCEventInspector.cxx:551
 AliFMDMCEventInspector.cxx:552
 AliFMDMCEventInspector.cxx:553
 AliFMDMCEventInspector.cxx:554
 AliFMDMCEventInspector.cxx:555
 AliFMDMCEventInspector.cxx:556
 AliFMDMCEventInspector.cxx:557
 AliFMDMCEventInspector.cxx:558
 AliFMDMCEventInspector.cxx:559
 AliFMDMCEventInspector.cxx:560
 AliFMDMCEventInspector.cxx:561
 AliFMDMCEventInspector.cxx:562
 AliFMDMCEventInspector.cxx:563
 AliFMDMCEventInspector.cxx:564
 AliFMDMCEventInspector.cxx:565
 AliFMDMCEventInspector.cxx:566
 AliFMDMCEventInspector.cxx:567
 AliFMDMCEventInspector.cxx:568
 AliFMDMCEventInspector.cxx:569
 AliFMDMCEventInspector.cxx:570
 AliFMDMCEventInspector.cxx:571
 AliFMDMCEventInspector.cxx:572
 AliFMDMCEventInspector.cxx:573
 AliFMDMCEventInspector.cxx:574
 AliFMDMCEventInspector.cxx:575
 AliFMDMCEventInspector.cxx:576
 AliFMDMCEventInspector.cxx:577
 AliFMDMCEventInspector.cxx:578
 AliFMDMCEventInspector.cxx:579
 AliFMDMCEventInspector.cxx:580
 AliFMDMCEventInspector.cxx:581
 AliFMDMCEventInspector.cxx:582
 AliFMDMCEventInspector.cxx:583
 AliFMDMCEventInspector.cxx:584
 AliFMDMCEventInspector.cxx:585
 AliFMDMCEventInspector.cxx:586
 AliFMDMCEventInspector.cxx:587
 AliFMDMCEventInspector.cxx:588
 AliFMDMCEventInspector.cxx:589
 AliFMDMCEventInspector.cxx:590
 AliFMDMCEventInspector.cxx:591
 AliFMDMCEventInspector.cxx:592
 AliFMDMCEventInspector.cxx:593
 AliFMDMCEventInspector.cxx:594
 AliFMDMCEventInspector.cxx:595
 AliFMDMCEventInspector.cxx:596
 AliFMDMCEventInspector.cxx:597
 AliFMDMCEventInspector.cxx:598
 AliFMDMCEventInspector.cxx:599
 AliFMDMCEventInspector.cxx:600
 AliFMDMCEventInspector.cxx:601
 AliFMDMCEventInspector.cxx:602
 AliFMDMCEventInspector.cxx:603
 AliFMDMCEventInspector.cxx:604
 AliFMDMCEventInspector.cxx:605
 AliFMDMCEventInspector.cxx:606
 AliFMDMCEventInspector.cxx:607
 AliFMDMCEventInspector.cxx:608
 AliFMDMCEventInspector.cxx:609
 AliFMDMCEventInspector.cxx:610
 AliFMDMCEventInspector.cxx:611
 AliFMDMCEventInspector.cxx:612
 AliFMDMCEventInspector.cxx:613
 AliFMDMCEventInspector.cxx:614
 AliFMDMCEventInspector.cxx:615
 AliFMDMCEventInspector.cxx:616
 AliFMDMCEventInspector.cxx:617
 AliFMDMCEventInspector.cxx:618
 AliFMDMCEventInspector.cxx:619
 AliFMDMCEventInspector.cxx:620
 AliFMDMCEventInspector.cxx:621
 AliFMDMCEventInspector.cxx:622
 AliFMDMCEventInspector.cxx:623
 AliFMDMCEventInspector.cxx:624
 AliFMDMCEventInspector.cxx:625
 AliFMDMCEventInspector.cxx:626
 AliFMDMCEventInspector.cxx:627
 AliFMDMCEventInspector.cxx:628
 AliFMDMCEventInspector.cxx:629
 AliFMDMCEventInspector.cxx:630
 AliFMDMCEventInspector.cxx:631
 AliFMDMCEventInspector.cxx:632
 AliFMDMCEventInspector.cxx:633
 AliFMDMCEventInspector.cxx:634
 AliFMDMCEventInspector.cxx:635
 AliFMDMCEventInspector.cxx:636
 AliFMDMCEventInspector.cxx:637
 AliFMDMCEventInspector.cxx:638
 AliFMDMCEventInspector.cxx:639
 AliFMDMCEventInspector.cxx:640
 AliFMDMCEventInspector.cxx:641
 AliFMDMCEventInspector.cxx:642
 AliFMDMCEventInspector.cxx:643
 AliFMDMCEventInspector.cxx:644
 AliFMDMCEventInspector.cxx:645
 AliFMDMCEventInspector.cxx:646
 AliFMDMCEventInspector.cxx:647
 AliFMDMCEventInspector.cxx:648
 AliFMDMCEventInspector.cxx:649
 AliFMDMCEventInspector.cxx:650
 AliFMDMCEventInspector.cxx:651
 AliFMDMCEventInspector.cxx:652
 AliFMDMCEventInspector.cxx:653
 AliFMDMCEventInspector.cxx:654
 AliFMDMCEventInspector.cxx:655
 AliFMDMCEventInspector.cxx:656
 AliFMDMCEventInspector.cxx:657
 AliFMDMCEventInspector.cxx:658
 AliFMDMCEventInspector.cxx:659
 AliFMDMCEventInspector.cxx:660
 AliFMDMCEventInspector.cxx:661
 AliFMDMCEventInspector.cxx:662
 AliFMDMCEventInspector.cxx:663
 AliFMDMCEventInspector.cxx:664
 AliFMDMCEventInspector.cxx:665
 AliFMDMCEventInspector.cxx:666
 AliFMDMCEventInspector.cxx:667
 AliFMDMCEventInspector.cxx:668
 AliFMDMCEventInspector.cxx:669
 AliFMDMCEventInspector.cxx:670
 AliFMDMCEventInspector.cxx:671
 AliFMDMCEventInspector.cxx:672
 AliFMDMCEventInspector.cxx:673
 AliFMDMCEventInspector.cxx:674
 AliFMDMCEventInspector.cxx:675
 AliFMDMCEventInspector.cxx:676
 AliFMDMCEventInspector.cxx:677
 AliFMDMCEventInspector.cxx:678
 AliFMDMCEventInspector.cxx:679
 AliFMDMCEventInspector.cxx:680
 AliFMDMCEventInspector.cxx:681
 AliFMDMCEventInspector.cxx:682
 AliFMDMCEventInspector.cxx:683
 AliFMDMCEventInspector.cxx:684
 AliFMDMCEventInspector.cxx:685