3 #include "AliAODTrack.h"
4 #include "AliESDtrack.h"
5 #include "AliAnalysisManager.h"
6 #include "AliInputEventHandler.h"
7 #include "AliMCEventHandler.h"
8 #include "AliAODHandler.h"
13 #include "TObjString.h"
14 #include "AliAODEvent.h"
15 #include "AliESDEvent.h"
16 #include "AliCentrality.h"
17 #include "AliMultSelection.h"
21 #include "AliGenCocktailEventHeader.h"
22 #include "AliGenDPMjetEventHeader.h"
23 #include "AliGenPythiaEventHeader.h"
24 #include "AliGenHijingEventHeader.h"
25 #include "AliTriggerAnalysis.h"
27 #include "AliVCaloCells.h"
28 #include "AliAODMCParticle.h"
29 #include "AliAODMCHeader.h"
30 #include "AliEMCALTriggerPatchInfo.h"
46 AliAnalysisCuts(name, title),
50 fV0ReaderStrangeName(
"V0ReaderStrange"),
54 fUseOnFlyV0Finder(kTRUE),
55 fUseOnFlyV0FinderSameSign(0),
58 fUseCorrectedTPCClsInfo(kFALSE),
59 fPIDTPCnSigmaProtonLow(0),
60 fPIDTPCnSigmaProtonUp(0),
61 fPIDTPCnSigmaPionLow(0),
62 fPIDTPCnSigmaPionUp(0),
63 fPIDTOFnSigmaProtonLow(0),
64 fPIDTOFnSigmaProtonUp(0),
65 fPIDTOFnSigmaPionLow(0),
66 fPIDTOFnSigmaPionUp(0),
68 fHistodEdxCutsProton(NULL),
69 fHistoTPCdEdxProtonBefore(NULL),
70 fHistoTPCdEdxSigmaProtonBefore(NULL),
71 fHistoTPCdEdxProtonAfter(NULL),
72 fHistoTPCdEdxSigmaProtonAfter(NULL),
73 fHistoTOFdEdxProtonBefore(NULL),
74 fHistoTOFdEdxSigmaProtonBefore(NULL),
75 fHistoTOFdEdxProtonAfter(NULL),
76 fHistoTOFdEdxSigmaProtonAfter(NULL),
77 fHistodEdxCutsPion(NULL),
78 fHistoTPCdEdxPionBefore(NULL),
79 fHistoTPCdEdxSigmaPionBefore(NULL),
80 fHistoTPCdEdxPionAfter(NULL),
81 fHistoTPCdEdxSigmaPionAfter(NULL),
82 fHistoTOFdEdxPionBefore(NULL),
83 fHistoTOFdEdxSigmaPionBefore(NULL),
84 fHistoTOFdEdxPionAfter(NULL),
85 fHistoTOFdEdxSigmaPionAfter(NULL)
100 fV0ReaderStrangeName(
"V0ReaderStrange"),
101 fCutString(ref.fCutString),
102 fCutStringRead(ref.fCutStringRead),
103 fPreSelCut(ref.fPreSelCut),
104 fUseOnFlyV0Finder(ref.fUseOnFlyV0Finder),
105 fUseOnFlyV0FinderSameSign(ref.fUseOnFlyV0FinderSameSign),
106 fMinClsTPC(ref.fMinClsTPC),
107 fMinClsTPCToF(ref.fMinClsTPCToF),
108 fUseCorrectedTPCClsInfo(ref.fUseCorrectedTPCClsInfo),
109 fPIDTPCnSigmaProtonLow(ref.fPIDTPCnSigmaProtonLow),
110 fPIDTPCnSigmaProtonUp(ref.fPIDTPCnSigmaProtonUp),
111 fPIDTPCnSigmaPionLow(ref.fPIDTPCnSigmaPionLow),
112 fPIDTPCnSigmaPionUp(ref.fPIDTPCnSigmaPionUp),
113 fPIDTOFnSigmaProtonLow(ref.fPIDTOFnSigmaProtonLow),
114 fPIDTOFnSigmaProtonUp(ref.fPIDTOFnSigmaProtonUp),
115 fPIDTOFnSigmaPionLow(ref.fPIDTOFnSigmaPionLow),
116 fPIDTOFnSigmaPionUp(ref.fPIDTOFnSigmaPionUp),
117 fHistoCutIndex(NULL),
118 fHistodEdxCutsProton(NULL),
119 fHistoTPCdEdxProtonBefore(NULL),
120 fHistoTPCdEdxSigmaProtonBefore(NULL),
121 fHistoTPCdEdxProtonAfter(NULL),
122 fHistoTPCdEdxSigmaProtonAfter(NULL),
123 fHistoTOFdEdxProtonBefore(NULL),
124 fHistoTOFdEdxSigmaProtonBefore(NULL),
125 fHistoTOFdEdxProtonAfter(NULL),
126 fHistoTOFdEdxSigmaProtonAfter(NULL),
127 fHistodEdxCutsPion(NULL),
128 fHistoTPCdEdxPionBefore(NULL),
129 fHistoTPCdEdxSigmaPionBefore(NULL),
130 fHistoTPCdEdxPionAfter(NULL),
131 fHistoTPCdEdxSigmaPionAfter(NULL),
132 fHistoTOFdEdxPionBefore(NULL),
133 fHistoTOFdEdxSigmaPionBefore(NULL),
134 fHistoTOFdEdxPionAfter(NULL),
135 fHistoTOFdEdxSigmaPionAfter(NULL)
160 TH1::AddDirectory(kFALSE);
259 TH1::AddDirectory(kTRUE);
276 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
277 fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
295 }
else return kFALSE;
301 }
else return kFALSE;
307 }
else return kFALSE;
313 }
else return kFALSE;
315 AliError(
"Cut id out of range");
319 AliError(
"Cut id %d not recognized");
330 AliInfo(Form(
"Set V0 Cut Number: %s",analysisCutSelection.Data()));
331 if(analysisCutSelection.Length()!=
kNCuts) {
332 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
335 if(!analysisCutSelection.IsAlnum()){
336 AliError(
"Cut selection is not alphanumeric");
343 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
344 analysisCutSelectionLowerCase.ToLower();
345 const char *cutSelection = analysisCutSelectionLowerCase.Data();
346 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
383 printf(
"\nConversion cutnumber \n");
385 printf(
"%d",
fCuts[ic]);
397 switch (v0FinderType){
399 cout <<
"have chosen onfly V0" << endl;
404 cout <<
"have chosen offline V0" << endl;
409 cout <<
"have chosen onfly V0 same sign pairing" << endl;
414 cout <<
"have chosen onfly V0 unlike sign and same signs pairing" << endl;
419 AliError(Form(
" v0FinderType not defined %d",v0FinderType));
433 if(label > event->GetNumberOfTracks() )
return NULL;
434 AliESDtrack * track = esdEvent->GetTrack(label);
438 if(label == -999999)
return NULL;
439 AliVTrack * track = 0x0;
441 if(event->GetTrack(label)) track = dynamic_cast<AliVTrack*>(event->GetTrack(label));
445 for(
Int_t ii=0; ii<
event->GetNumberOfTracks(); ii++) {
446 if(event->GetTrack(ii)) track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
448 if(track->GetID() == label) {
466 if(label > event->GetNumberOfTracks() )
return NULL;
467 AliESDtrack * track =
event->GetTrack(label);
481 if(!fMCStack)
return kFALSE;
569 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
574 if (AliPIDResponse::kDetPidOk == statusPosTOF && fCurrentTrack->GetP()>0.75) {
621 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
626 if (AliPIDResponse::kDetPidOk == statusPosTOF && fCurrentTrack->GetP()>0.75) {
709 AliError(Form(
"Warning: clsTPCCut not defined %d",clsTPCCut));
731 AliError(Form(
"Warning: ProtonPIDcut not defined %d",pPIDcut));
755 AliError(Form(
"Warning: Pion PIDcut not defined %d",pPIDcut));
TH2F * fHistoTPCdEdxSigmaPionAfter
TH2F * fHistodEdxCutsPion
Double_t fPIDTOFnSigmaProtonLow
AliPIDResponse * fPIDResponse
TH2F * fHistoTPCdEdxSigmaPionBefore
TH2F * fHistoTPCdEdxProtonBefore
Double_t fPIDTPCnSigmaProtonUp
Bool_t SetTPCClusterCut(Int_t clsTPCCut)
Double_t fPIDTPCnSigmaPionUp
Double_t fPIDTPCnSigmaPionLow
TH2F * fHistoTPCdEdxPionAfter
static const char * fgkCutNames[kNCuts]
Bool_t GetPIDproton(AliVTrack *fCurrentTrack)
TH2F * fHistoTOFdEdxProtonAfter
Bool_t GetPIDpion(AliVTrack *fCurrentTrack)
Bool_t PhotonIsSelectedMC(TParticle *particle, AliStack *fMCStack, Bool_t checkForConvertedGamma)
TH2F * fHistoTOFdEdxProtonBefore
AliVTrack * GetTrack(AliVEvent *event, Int_t label)
TH2F * fHistoTOFdEdxSigmaProtonBefore
void InitCutHistograms(TString name="", Bool_t preCut=kTRUE)
Bool_t SetPionPIDCut(Int_t pPIDcut)
Double_t fPIDTOFnSigmaPionUp
TH2F * fHistoTPCdEdxSigmaProtonAfter
ClassImp(AliV0CutsStrange) const char *AliV0CutsStrange
Double_t fPIDTOFnSigmaPionLow
void PrintCutsWithValues()
TH2F * fHistoTPCdEdxSigmaProtonBefore
Double_t fUseCorrectedTPCClsInfo
Bool_t SetProtonPIDCut(Int_t pPIDcut)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH2F * fHistoTPCdEdxProtonAfter
virtual ~AliV0CutsStrange()
TH2F * fHistoTOFdEdxPionAfter
TH2F * fHistodEdxCutsProton
Double_t fPIDTPCnSigmaProtonLow
Double_t fPIDTOFnSigmaProtonUp
TH2F * fHistoTOFdEdxPionBefore
Bool_t SetCut(cutIds cutID, Int_t cut)
Bool_t SetV0Finder(Int_t v0FinderType)
AliV0CutsStrange(const char *name="V0ReaderCutsStrange", const char *title="V0ReaderCutsStrange")
TH2F * fHistoTPCdEdxPionBefore
TH2F * fHistoTOFdEdxSigmaPionAfter
Int_t fUseOnFlyV0FinderSameSign
Bool_t InitializeCutsFromCutString(const TString analysisCutSelection)
TH2F * fHistoTOFdEdxSigmaPionBefore
AliESDtrack * GetESDTrack(AliESDEvent *event, Int_t label)
TH2F * fHistoTOFdEdxSigmaProtonAfter
TString fV0ReaderStrangeName