]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add dEdx monitoring class.
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Apr 2010 08:20:06 +0000 (08:20 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Apr 2010 08:20:06 +0000 (08:20 +0000)
PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.cxx [new file with mode: 0644]
PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.h [new file with mode: 0644]
PWG2/libPWG2femtoscopy.pkg

diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.cxx
new file mode 100644 (file)
index 0000000..069d325
--- /dev/null
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoCutMonitorParticlePID - the cut monitor for particles to study     //
+// various aspects of the PID determination                                   //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoCutMonitorParticlePID.h"
+#include "AliFemtoModelHiddenInfo.h"
+#include <TH1D.h>
+#include <TH2D.h>
+#include <TList.h>
+#include <TMath.h>
+
+AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID():
+  fTPCdEdx(0)
+{
+  // Default constructor
+  fTPCdEdx = new TH2D("TPCdEdx", "TPC dEdx vs momentum", 190, 0.1, 2.0, 500, 0.0, 500.0);
+}
+
+AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const char *aName):
+  AliFemtoCutMonitor(),
+  fTPCdEdx(0)
+{
+  // Normal constructor
+  char name[200];
+  snprintf(name, 200, "TPCdEdx%s", aName);
+  fTPCdEdx = new TH2D(name, "TPC dEdx vs. momentum", 190, 0.1, 2.0, 500, 0.0, 500.0);
+}
+
+AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMonitorParticlePID &aCut):
+  AliFemtoCutMonitor(),
+  fTPCdEdx(0)
+{
+  // copy constructor
+  if (fTPCdEdx) delete fTPCdEdx;
+  fTPCdEdx = new TH2D(*aCut.fTPCdEdx);
+}
+
+AliFemtoCutMonitorParticlePID::~AliFemtoCutMonitorParticlePID()
+{
+  // Destructor
+  delete fTPCdEdx;
+}
+
+AliFemtoCutMonitorParticlePID& AliFemtoCutMonitorParticlePID::operator=(const AliFemtoCutMonitorParticlePID& aCut)
+{
+  // assignment operator
+  if (this == &aCut) 
+    return *this;
+
+  if (fTPCdEdx) delete fTPCdEdx;
+  fTPCdEdx = new TH2D(*aCut.fTPCdEdx);
+  
+  return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorParticlePID::Report(){ 
+  // Prepare report from the execution
+  string stemp = "*** AliFemtoCutMonitorParticlePID report"; 
+  AliFemtoString returnThis = stemp;
+  return returnThis; 
+}
+
+void AliFemtoCutMonitorParticlePID::Fill(const AliFemtoTrack* aTrack)
+{
+  // Fill in the monitor histograms with the values from the current track
+  float tMom = aTrack->P().Mag();
+  float tdEdx = aTrack->TPCsignal();
+
+  fTPCdEdx->Fill(tMom, tdEdx);
+}
+
+void AliFemtoCutMonitorParticlePID::Write()
+{
+  // Write out the relevant histograms
+  fTPCdEdx->Write();
+}
+
+TList *AliFemtoCutMonitorParticlePID::GetOutputList()
+{
+  TList *tOutputList = new TList();
+  tOutputList->Add(fTPCdEdx);
+
+  return tOutputList;
+}
diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.h
new file mode 100644 (file)
index 0000000..3efd682
--- /dev/null
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+///                                                                          ///
+/// AliFemtoCutMonitorParticlePID - the cut monitor for particles to study   ///
+/// various aspects of the PID determination                                 ///
+///                                                                          ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorParticlePID_hh
+#define AliFemtoCutMonitorParticlePID_hh
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; // Gael 12/04/02
+class TH1D;
+class TH2D;
+class TList;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorParticlePID : public AliFemtoCutMonitor{
+  
+public:
+  AliFemtoCutMonitorParticlePID();
+  AliFemtoCutMonitorParticlePID(const char *aName);
+  AliFemtoCutMonitorParticlePID(const AliFemtoCutMonitorParticlePID &aCut);
+  virtual ~AliFemtoCutMonitorParticlePID();
+
+  AliFemtoCutMonitorParticlePID& operator=(const AliFemtoCutMonitorParticlePID& aCut);
+
+  virtual AliFemtoString Report();
+  virtual void Fill(const AliFemtoEvent* aEvent) {AliFemtoCutMonitor::Fill(aEvent);}
+  virtual void Fill(const AliFemtoTrack* aTrack);
+  virtual void Fill(const AliFemtoV0* aV0) {AliFemtoCutMonitor::Fill(aV0);}
+  virtual void Fill(const AliFemtoKink* aKink) {AliFemtoCutMonitor::Fill(aKink);}
+  virtual void Fill(const AliFemtoPair* aPair) {AliFemtoCutMonitor::Fill(aPair);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
+  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
+  {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+
+
+  void Write();
+
+  virtual TList *GetOutputList();
+
+private:
+  TH2D *fTPCdEdx;   // TPC dEdx information
+
+};
+
+#endif
index 4a2305c459a96212d8e377d02dc8ea45523deb1c..bf1355a7ff7d1cc8651933ee2d22e204764fc7a5 100644 (file)
@@ -41,6 +41,7 @@ SRCS= FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorLednicky.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleVertPos.cxx \
+      FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventVertex.cxx \
       FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx \