New base class AliPIDResponse
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 20:25:16 +0000 (20:25 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 20:25:16 +0000 (20:25 +0000)
Jens Wiechula

STEER/AliPIDResponse.cxx [new file with mode: 0644]
STEER/AliPIDResponse.h [new file with mode: 0644]
STEER/AliVTrack.h
STEER/CMakelibSTEERBase.pkg
STEER/STEERBaseLinkDef.h

diff --git a/STEER/AliPIDResponse.cxx b/STEER/AliPIDResponse.cxx
new file mode 100644 (file)
index 0000000..bd28b11
--- /dev/null
@@ -0,0 +1,30 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliESDpid.cxx 46193 2010-12-21 09:00:14Z hristov $ */
+
+//-----------------------------------------------------------------
+//           Implementation of the combined PID class
+//           For the Event Summary Data Class
+//           produced by the reconstruction process
+//           and containing information on the particle identification
+//      Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//-----------------------------------------------------------------
+
+
+#include "AliPIDResponse.h"
+
+ClassImp(AliPIDResponse);
+
diff --git a/STEER/AliPIDResponse.h b/STEER/AliPIDResponse.h
new file mode 100644 (file)
index 0000000..1998f1c
--- /dev/null
@@ -0,0 +1,81 @@
+#ifndef ALIPIDRESPONSE_H
+#define ALIPIDRESPONSE_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+//---------------------------------------------------------------//
+//        Base class for handling the pid response               //
+//        functions of all detectors                             //
+//        and give access to the nsigmas                         //
+//                                                               //
+//   Origin: Jens Wiechula, Uni Tuebingen, jens.wiechula@cern.ch //
+//---------------------------------------------------------------//
+
+#include "AliITSPIDResponse.h"
+#include "AliTPCPIDResponse.h"
+#include "AliTRDPIDResponse.h"
+#include "AliTOFPIDResponse.h"
+
+#include "AliVParticle.h"
+#include "AliVTrack.h"
+
+#include "TNamed.h"
+
+class AliVEvent;
+
+class AliPIDResponse : public TNamed {
+public:
+  AliPIDResponse(Bool_t isMC=kFALSE) : fITSResponse(isMC), fTPCResponse(), fTRDResponse(), fTOFResponse() {;}
+  virtual ~AliPIDResponse() {;}
+
+  enum EStartTimeType_t {kFILL_T0,kTOF_T0, kT0_T0, kBest_T0};
+  
+  AliITSPIDResponse &GetITSResponse() {return fITSResponse;}
+  AliTPCPIDResponse &GetTPCResponse() {return fTPCResponse;}
+  AliTOFPIDResponse &GetTOFResponse() {return fTOFResponse;}
+  AliTRDPIDResponse &GetTRDResponse() {return fTRDResponse;}
+  
+  virtual Float_t NumberOfSigmasITS(const AliVParticle *track, AliPID::EParticleType type) const;
+  virtual Float_t NumberOfSigmasTPC(const AliVParticle *track, AliPID::EParticleType type) const;
+  virtual Float_t NumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticleType type) const = 0;
+
+  void SetTOFResponse(AliVEvent */*event*/,EStartTimeType_t /*option*/) {;}
+  
+protected:
+  AliITSPIDResponse fITSResponse;    //PID response function of the ITS
+  AliTPCPIDResponse fTPCResponse;    //PID response function of the TPC
+  AliTRDPIDResponse fTRDResponse;    //PID response function of the TRD
+  AliTOFPIDResponse fTOFResponse;    //PID response function of the TOF
+  
+  ClassDef(AliPIDResponse,1);  //PID response handling
+};
+
+inline Float_t AliPIDResponse::NumberOfSigmasTPC(const AliVParticle *vtrack, AliPID::EParticleType type) const {
+  AliVTrack *track=(AliVTrack*)vtrack;
+  Double_t mom  = track->GetTPCmomentum();
+  Double_t sig  = track->GetTPCsignal();
+  UInt_t   sigN = track->GetTPCsignalN();
+
+  Double_t nSigma = -999.;
+  if (sigN>0) nSigma=fTPCResponse.GetNumberOfSigmas(mom,sig,sigN,type);
+
+  return nSigma;
+}
+
+inline Float_t AliPIDResponse::NumberOfSigmasITS(const AliVParticle *vtrack, AliPID::EParticleType type) const {
+  AliVTrack *track=(AliVTrack*)vtrack;
+  Float_t dEdx=track->GetITSsignal();
+  if (dEdx<=0) return -999.;
+  
+  UChar_t clumap=track->GetITSClusterMap();
+  Int_t nPointsForPid=0;
+  for(Int_t i=2; i<6; i++){
+    if(clumap&(1<<i)) ++nPointsForPid;
+  }
+  Float_t mom=track->P();
+  Bool_t isSA=kTRUE;
+  if(track->GetTPCNcls()>0) isSA=kFALSE;
+  return fITSResponse.GetNumberOfSigmas(mom,dEdx,type,nPointsForPid,isSA);
+}
+
+#endif
index 0375cd5dc43468b6cb073e5e1d2d5bda0c6d4d17..faba22c8b858d82f418cbdfc64329c68a7d7a665 100644 (file)
@@ -26,8 +26,17 @@ public:
 
   virtual Int_t    GetID() const = 0;
   virtual UChar_t  GetITSClusterMap() const = 0;
+  virtual Float_t  GetTPCClusterInfo(Int_t /*nNeighbours*/, Int_t /*type*/, Int_t /*row0*/=0, Int_t /*row1*/=159) const {return 0.;}
   virtual UShort_t GetTPCNcls() const { return 0;}
-  virtual Double_t GetTPCsignal() const { return 0.; }
+  virtual UShort_t GetTPCNclsF() const { return 0;}
+  
+  //pid info
+  virtual Double_t  GetITSsignal()       const {return 0.;}
+  virtual Double_t  GetTPCsignal()       const {return 0.;}
+  virtual UShort_t  GetTPCsignalN()      const {return 0 ;}
+  virtual Double_t  GetTPCmomentum()     const {return 0.;}
+  virtual Double_t  GetTOFsignal()       const {return 0.;}
+  
   virtual ULong_t  GetStatus() const = 0;
   virtual Bool_t   GetXYZ(Double_t *p) const = 0;
   virtual Double_t GetBz() const;
index 0f2e693de99ee39b4817244e7f12d192de1c258e..d8ecb69d924b3f9a9d8bde0b7251923eba51704f 100644 (file)
@@ -1,4 +1,4 @@
-set ( SRCS  AliVParticle.cxx AliVTrack.cxx AliVCluster.cxx AliVCaloCells.cxx AliVVertex.cxx AliVEvent.cxx AliMixedEvent.cxx AliVHeader.cxx AliVEventHandler.cxx AliVEventPool.cxx AliVCuts.cxx AliVVZERO.cxx AliCentrality.cxx AliPID.cxx AliLog.cxx AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx AliFileTag.cxx AliEventTagCuts.cxx AliRunTagCuts.cxx AliLHCTagCuts.cxx AliDetectorTagCuts.cxx AliTagCreator.cxx AliHeader.cxx AliGenEventHeader.cxx AliDetectorEventHeader.cxx AliGenPythiaEventHeader.cxx AliGenCocktailEventHeader.cxx AliGenGeVSimEventHeader.cxx AliGenHijingEventHeader.cxx AliCollisionGeometry.cxx AliGenDPMjetEventHeader.cxx AliGenHerwigEventHeader.cxx AliGenEposEventHeader.cxx AliStack.cxx AliMCEventHandler.cxx AliInputEventHandler.cxx AliTrackReference.cxx AliSysInfo.cxx AliMCEvent.cxx AliMCParticle.cxx AliMCVertex.cxx AliMagF.cxx AliMagWrapCheb.cxx AliCheb3D.cxx AliCheb3DCalc.cxx AliNeutralTrackParam.cxx AliCodeTimer.cxx AliPDG.cxx AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx AliExternalTrackParam.cxx AliQA.cxx AliITSPidParams.cxx AliITSPIDResponse.cxx AliTPCPIDResponse.cxx AliTOFPIDResponse.cxx AliTRDPIDResponse.cxx AliDAQ.cxx AliRefArray.cxx)
+set ( SRCS  AliVParticle.cxx AliVTrack.cxx AliVCluster.cxx AliVCaloCells.cxx AliVVertex.cxx AliVEvent.cxx AliMixedEvent.cxx AliVHeader.cxx AliVEventHandler.cxx AliVEventPool.cxx AliVCuts.cxx AliVVZERO.cxx AliCentrality.cxx AliPID.cxx AliLog.cxx AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx AliFileTag.cxx AliEventTagCuts.cxx AliRunTagCuts.cxx AliLHCTagCuts.cxx AliDetectorTagCuts.cxx AliTagCreator.cxx AliHeader.cxx AliGenEventHeader.cxx AliDetectorEventHeader.cxx AliGenPythiaEventHeader.cxx AliGenCocktailEventHeader.cxx AliGenGeVSimEventHeader.cxx AliGenHijingEventHeader.cxx AliCollisionGeometry.cxx AliGenDPMjetEventHeader.cxx AliGenHerwigEventHeader.cxx AliGenEposEventHeader.cxx AliStack.cxx AliMCEventHandler.cxx AliInputEventHandler.cxx AliTrackReference.cxx AliSysInfo.cxx AliMCEvent.cxx AliMCParticle.cxx AliMCVertex.cxx AliMagF.cxx AliMagWrapCheb.cxx AliCheb3D.cxx AliCheb3DCalc.cxx AliNeutralTrackParam.cxx AliCodeTimer.cxx AliPDG.cxx AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx AliExternalTrackParam.cxx AliQA.cxx AliITSPidParams.cxx AliPIDResponse.cxx AliITSPIDResponse.cxx AliTPCPIDResponse.cxx AliTOFPIDResponse.cxx AliTRDPIDResponse.cxx AliDAQ.cxx AliRefArray.cxx)
 
 string(REPLACE ".cxx" ".h" HDRS  "${SRCS}")
 
index c345e247355c6aeb7d17b2930f17ee99283ab876..0e8a63e7b18d91c7e905de312896299020997ccd 100644 (file)
@@ -84,6 +84,7 @@
 #pragma link C++ class AliQA+;
 
 #pragma link C++ class AliITSPidParams+;
+#pragma link C++ class AliPIDResponse+;
 #pragma link C++ class AliITSPIDResponse+;
 #pragma link C++ class AliTPCPIDResponse+;
 #pragma link C++ class AliTOFPIDResponse+;