1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 // HMPID tender: - recalculate pid bit using tighter cuts
20 // - this is needed for all 2010 and 11a-c data
23 // Contacts: Giacomo.Volpe@ba.infn.it //
24 // Jens.Wiechula@cern.ch //
25 ///////////////////////////////////////////////////////////////////////////////
29 #include <AliESDEvent.h>
30 #include <AliESDtrack.h>
31 #include <AliESDInputHandler.h>
32 #include <AliAnalysisManager.h>
33 #include <AliESDpid.h>
34 #include <AliTender.h>
36 #include "AliHMPIDTenderSupply.h"
38 ClassImp(AliHMPIDTenderSupply)
40 AliHMPIDTenderSupply::AliHMPIDTenderSupply() :
48 //_____________________________________________________
49 AliHMPIDTenderSupply::AliHMPIDTenderSupply(const char *name, const AliTender *tender) :
50 AliTenderSupply(name,tender)
57 //_____________________________________________________
58 void AliHMPIDTenderSupply::Init()
60 // Initialise HMPID tender
64 //_____________________________________________________
65 void AliHMPIDTenderSupply::ProcessEvent()
68 // recalculate HMPIDpid bit
72 AliESDEvent *event=fTender->GetEvent();
75 // re-evaluate the HMPIDpid bit for all tracks
76 Int_t ntracks=event->GetNumberOfTracks();
77 for(Int_t itrack = 0; itrack < ntracks; itrack++){
78 AliESDtrack *track=event->GetTrack(itrack);
79 if (!itrack) continue;
81 track->ResetStatus(AliESDtrack::kHMPIDpid);
83 Float_t xPc=0., yPc=0., xMip=0., yMip=0., thetaTrk=0., phiTrk=0.;
84 Int_t nPhot=0, qMip=0;
86 track->GetHMPIDtrk(xPc,yPc,thetaTrk,phiTrk);
87 track->GetHMPIDmip(xMip,yMip,qMip,nPhot);
89 //make cuts, just an example, THIS NEEDS TO BE CHANGED
91 //if ((track->GetStatus()&AliESDtrack::kHMPIDout)!=AliESDtrack::kHMPIDout) continue;
93 Float_t dist = TMath::Sqrt((xPc-xMip)*(xPc-xMip) + (yPc-yMip)*(yPc-yMip));
95 if(dist > 0.7 || nPhot> 30 || qMip < 100 ) continue;
97 //set pid bit, track was accepted
98 track->SetStatus(AliESDtrack::kHMPIDpid);