# SHLIBS - Shared Libraries and objects for linking (Executables only) #
#--------------------------------------------------------------------------------#
-set ( SRCS TenderSupplies/AliTOFTenderSupply.cxx TenderSupplies/AliPIDTenderSupply.cxx TenderSupplies/AliTPCTenderSupply.cxx TenderSupplies/AliTRDTenderSupply.cxx TenderSupplies/AliVtxTenderSupply.cxx TenderSupplies/AliVZEROTenderSupply.cxx TenderSupplies/AliEMCALTenderSupply.cxx TenderSupplies/AliPHOSTenderSupply.cxx)
+set ( SRCS
+ TenderSupplies/AliTOFTenderSupply.cxx
+ TenderSupplies/AliPIDTenderSupply.cxx
+ TenderSupplies/AliTPCTenderSupply.cxx
+ TenderSupplies/AliTRDTenderSupply.cxx
+ TenderSupplies/AliVtxTenderSupply.cxx
+ TenderSupplies/AliVZEROTenderSupply.cxx
+ TenderSupplies/AliEMCALTenderSupply.cxx
+ TenderSupplies/AliPHOSTenderSupply.cxx
+ TenderSupplies/AliHMPIDTenderSupply.cxx
+)
string ( REPLACE ".cxx" ".h" HDRS "${SRCS}")
--- /dev/null
+/**************************************************************************\r
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ * *\r
+ * Author: The ALICE Off-line Project. *\r
+ * Contributors are mentioned in the code where appropriate. *\r
+ * *\r
+ * Permission to use, copy, modify and distribute this software and its *\r
+ * documentation strictly for non-commercial purposes is hereby granted *\r
+ * without fee, provided that the above copyright notice appears in all *\r
+ * copies and that both the copyright notice and this permission notice *\r
+ * appear in the supporting documentation. The authors make no claims *\r
+ * about the suitability of this software for any purpose. It is *\r
+ * provided "as is" without express or implied warranty. *\r
+ **************************************************************************/\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// //\r
+// HMPID tender: - recalculate pid bit using tighter cuts\r
+// - this is needed for all 2010 and 11a-c data\r
+// \r
+// \r
+// Contacts: Giacomo.Volpe@ba.infn.it //\r
+// Jens.Wiechula@cern.ch //\r
+///////////////////////////////////////////////////////////////////////////////\r
+#include <TMath.h>\r
+#include <TRandom.h>\r
+#include <AliLog.h>\r
+#include <AliESDEvent.h>\r
+#include <AliESDtrack.h>\r
+#include <AliESDInputHandler.h>\r
+#include <AliAnalysisManager.h>\r
+#include <AliESDpid.h>\r
+#include <AliTender.h>\r
+\r
+#include "AliHMPIDTenderSupply.h"\r
+\r
+ClassImp(AliHMPIDTenderSupply)\r
+\r
+AliHMPIDTenderSupply::AliHMPIDTenderSupply() :\r
+AliTenderSupply()\r
+{\r
+ //\r
+ // default ctor\r
+ //\r
+}\r
+\r
+//_____________________________________________________\r
+AliHMPIDTenderSupply::AliHMPIDTenderSupply(const char *name, const AliTender *tender) :\r
+AliTenderSupply(name,tender)\r
+{\r
+ //\r
+ // named ctor\r
+ //\r
+}\r
+\r
+//_____________________________________________________\r
+void AliHMPIDTenderSupply::Init()\r
+{\r
+ // Initialise HMPID tender\r
+ \r
+}\r
+\r
+//_____________________________________________________\r
+void AliHMPIDTenderSupply::ProcessEvent()\r
+{\r
+ //\r
+ // recalculate HMPIDpid bit\r
+ // \r
+ \r
+\r
+ AliESDEvent *event=fTender->GetEvent();\r
+ if (!event) return;\r
+ \r
+ // re-evaluate the HMPIDpid bit for all tracks\r
+ Int_t ntracks=event->GetNumberOfTracks();\r
+ for(Int_t itrack = 0; itrack < ntracks; itrack++){\r
+ AliESDtrack *track=event->GetTrack(itrack);\r
+ if (!itrack) continue;\r
+ //reset pid bit first\r
+ track->ResetStatus(AliESDtrack::kHMPIDpid);\r
+\r
+ Float_t xPc=0., yPc=0., xMip=0., yMip=0., thetaTrk=0., phiTrk=0.;\r
+ Int_t nPhot=0, qMip=0;\r
+ \r
+ track->GetHMPIDtrk(xPc,yPc,thetaTrk,phiTrk);\r
+ track->GetHMPIDmip(xMip,yMip,qMip,nPhot);\r
+ //\r
+ //make cuts, just an example, THIS NEEDS TO BE CHANGED\r
+ //\r
+ //if ((track->GetStatus()&AliESDtrack::kHMPIDout)!=AliESDtrack::kHMPIDout) continue;\r
+ \r
+ Float_t dist = TMath::Sqrt((xPc-xMip)*(xPc-xMip) + (yPc-yMip)*(yPc-yMip)); \r
+\r
+ if(dist > 0.7 || nPhot> 30 || qMip < 100 ) continue;\r
+\r
+ //set pid bit, track was accepted\r
+ track->SetStatus(AliESDtrack::kHMPIDpid);\r
+ \r
+ }\r
+ \r
+ \r
+}\r
--- /dev/null
+#ifndef ALIHMPIDTENDERSUPPLY_H\r
+#define ALIHMPIDTENDERSUPPLY_H\r
+\r
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice */\r
+\r
+////////////////////////////////////////////////////////////////////////\r
+// //\r
+// HMPID tender, reapply pid on the fly //\r
+// //\r
+////////////////////////////////////////////////////////////////////////\r
+\r
+#include <AliTenderSupply.h>\r
+#include <AliLog.h>\r
+#include <AliESDpid.h>\r
+\r
+class AliESDpid;\r
+\r
+class AliHMPIDTenderSupply: public AliTenderSupply {\r
+\r
+public:\r
+ AliHMPIDTenderSupply();\r
+ AliHMPIDTenderSupply(const char *name, const AliTender *tender=NULL);\r
+\r
+ virtual ~AliHMPIDTenderSupply(){;}\r
+\r
+ virtual void Init();\r
+ virtual void ProcessEvent();\r
+\r
+\r
+private:\r
+\r
+ AliHMPIDTenderSupply(const AliHMPIDTenderSupply&c);\r
+ AliHMPIDTenderSupply& operator= (const AliHMPIDTenderSupply&c);\r
+\r
+ ClassDef(AliHMPIDTenderSupply, 1);\r
+};\r
+\r
+\r
+#endif \r