]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleVertPos.cxx
Add global hidden info type
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / AliFemtoCutMonitorParticleVertPos.cxx
index d600a789e51789993e073077394e1a204716db84..4958b2c9f17e543ce004318180f3228853ddb4b4 100644 (file)
@@ -6,6 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 #include "AliFemtoCutMonitorParticleVertPos.h"
 #include "AliFemtoModelHiddenInfo.h"
+#include "AliFemtoModelGlobalHiddenInfo.h"
 #include <TH1D.h>
 #include <TH2D.h>
 #include <TList.h>
 
 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos():
   fVertPos(0),
-  fEtaZ(0)
+  fEtaZ(0),
+  fRadPos(0)
 {
   // Default constructor
   fVertPos = new TH2D("VertPos", "Vertex position", 200, -20.0, 20.0, 200, -20.0, 20.0);
   fEtaZ    = new TH2D("EtaZPos", "Z vs. Eta", 200, -100.0, 100.0, 100, -1.5, 1.5);
+  fRadPos  = new TH1D("RadPos",  "Radial position", 200, 0.0, 1.0);
 }
 
 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const char *aName):
@@ -31,6 +34,8 @@ AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const char
   fVertPos = new TH2D(name, "Rapdity vs Pt", 200, -20.0, 20.0, 200, -20.0, 20.0);
   snprintf(name, 200, "EtaZPos%s", aName);
   fEtaZ    = new TH2D(name, "Z vs. Eta", 200, -100.0, 100.0, 100, -1.5, 1.5);
+  snprintf(name, 200, "RadPos%s", aName);
+  fRadPos  = new TH1D(name,  "Radial position", 200, 0.0, 1.0);
 }
 
 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const AliFemtoCutMonitorParticleVertPos &aCut):
@@ -44,6 +49,8 @@ AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const AliFe
   fVertPos = new TH2D(*aCut.fVertPos);
   if (fEtaZ) delete fEtaZ;
   fEtaZ = new TH2D(*aCut.fEtaZ);
+  if (fRadPos) delete fRadPos;
+  fRadPos = new TH1D(*aCut.fRadPos);
 }
 
 AliFemtoCutMonitorParticleVertPos::~AliFemtoCutMonitorParticleVertPos()
@@ -51,6 +58,7 @@ AliFemtoCutMonitorParticleVertPos::~AliFemtoCutMonitorParticleVertPos()
   // Destructor
   delete fVertPos;
   delete fEtaZ;
+  delete fRadPos;
 }
 
 AliFemtoCutMonitorParticleVertPos& AliFemtoCutMonitorParticleVertPos::operator=(const AliFemtoCutMonitorParticleVertPos& aCut)
@@ -63,6 +71,8 @@ AliFemtoCutMonitorParticleVertPos& AliFemtoCutMonitorParticleVertPos::operator=(
   fVertPos = new TH2D(*aCut.fVertPos);
   if (fEtaZ) delete fEtaZ;
   fEtaZ = new TH2D(*aCut.fEtaZ);
+  if (fRadPos) delete fRadPos;
+  fRadPos = new TH1D(*aCut.fRadPos);
   
   return *this;
 }
@@ -77,12 +87,13 @@ AliFemtoString AliFemtoCutMonitorParticleVertPos::Report(){
 void AliFemtoCutMonitorParticleVertPos::Fill(const AliFemtoTrack* aTrack)
 {
   // Fill in the monitor histograms with the values from the current track
-  AliFemtoModelHiddenInfo *hinfo = dynamic_cast<AliFemtoModelHiddenInfo *>(aTrack->GetHiddenInfo());
+  AliFemtoModelGlobalHiddenInfo *hinfo = dynamic_cast<AliFemtoModelGlobalHiddenInfo *>(aTrack->GetHiddenInfo());
   if (hinfo) {
     float tEta = -TMath::Log(TMath::Tan(hinfo->GetTrueMomentum()->theta()/2.0));
 
-    fVertPos->Fill(hinfo->GetEmissionPoint()->x(), hinfo->GetEmissionPoint()->y());
-    fEtaZ->Fill(hinfo->GetEmissionPoint()->z(), tEta);
+    fVertPos->Fill(hinfo->GetGlobalEmissionPoint()->x(), hinfo->GetGlobalEmissionPoint()->y());
+    fEtaZ->Fill(hinfo->GetGlobalEmissionPoint()->z(), tEta);
+    fRadPos->Fill(hinfo->GetGlobalEmissionPoint()->perp());
   }
 }
 
@@ -91,6 +102,7 @@ void AliFemtoCutMonitorParticleVertPos::Write()
   // Write out the relevant histograms
   fVertPos->Write();
   fEtaZ->Write();
+  fRadPos->Write();
 }
 
 TList *AliFemtoCutMonitorParticleVertPos::GetOutputList()
@@ -98,6 +110,7 @@ TList *AliFemtoCutMonitorParticleVertPos::GetOutputList()
   TList *tOutputList = new TList();
   tOutputList->Add(fVertPos);
   tOutputList->Add(fEtaZ);
+  tOutputList->Add(fRadPos);
 
   return tOutputList;
 }