1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Authors: Svein Lindal, Daniel Lohner *
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 **************************************************************************/
16 ////////////////////////////////////////////////
17 //---------------------------------------------
18 // Class handling all kinds of selection cuts for
19 // Gamma Conversion analysis
20 //---------------------------------------------
21 ////////////////////////////////////////////////
24 #include "AliDalitzElectronCuts.h"
25 #include "AliAODConversionPhoton.h"
26 #include "AliKFVertex.h"
27 #include "AliAODTrack.h"
28 #include "AliESDtrack.h"
29 #include "AliAnalysisManager.h"
30 #include "AliInputEventHandler.h"
31 #include "AliMCEventHandler.h"
32 #include "AliAODHandler.h"
33 #include "AliPIDResponse.h"
37 #include "TObjString.h"
38 #include "AliAODEvent.h"
39 #include "AliESDEvent.h"
45 ClassImp(AliDalitzElectronCuts)
48 const char* AliDalitzElectronCuts::fgkCutNames[AliDalitzElectronCuts::kNCuts] = {
53 "piMinMomdedxSigmaTPCCut",
54 "piMaxMomdedxSigmaTPCCut",
55 "LowPRejectionSigmaCut",
60 "RejectSharedElecGamma",
64 //________________________________________________________________________
65 AliDalitzElectronCuts::AliDalitzElectronCuts(const char *name,const char *title) : AliAnalysisCuts(name,title),
73 fDeltaPhiCutMax(0.12),
74 fMinClsTPC(0), // minimum clusters in the TPC
75 fMinClsTPCToF(0), // minimum clusters to findable clusters
76 fDodEdxSigmaITSCut(kFALSE),
77 fDodEdxSigmaTPCCut(kTRUE),
78 fDoTOFsigmaCut(kFALSE), // RRnewTOF
79 fDoRejectSharedElecGamma(kFALSE),
80 fDoPsiPairCut(kFALSE),
81 fPIDnSigmaAboveElectronLineITS(100),
82 fPIDnSigmaBelowElectronLineITS(-100),
83 fPIDnSigmaAboveElectronLineTPC(100),
84 fPIDnSigmaBelowElectronLineTPC(-100),
85 fPIDnSigmaAbovePionLineTPC(0),
86 fPIDnSigmaAbovePionLineTPCHighPt(-100),
87 fTofPIDnSigmaAboveElectronLine(100), // RRnewTOF
88 fTofPIDnSigmaBelowElectronLine(-100), // RRnewTOF
89 fPIDMinPnSigmaAbovePionLineTPC(0),
90 fPIDMaxPnSigmaAbovePionLineTPC(0),
91 fDoKaonRejectionLowP(kFALSE),
92 fDoProtonRejectionLowP(kFALSE),
93 fDoPionRejectionLowP(kFALSE),
94 fPIDnSigmaAtLowPAroundKaonLine(0),
95 fPIDnSigmaAtLowPAroundProtonLine(0),
96 fPIDnSigmaAtLowPAroundPionLine(0),
97 fPIDMinPKaonRejectionLowP(1.5),
98 fPIDMinPProtonRejectionLowP(2.0),
99 fPIDMinPPionRejectionLowP(0.5),
100 fUseCorrectedTPCClsInfo(kFALSE),
102 fUseTrackMultiplicityForBG(kFALSE),
107 hITSdEdxbefore(NULL),
109 hTPCdEdxbefore(NULL),
115 for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
116 fCutString=new TObjString((GetCutNumber()).Data());
119 fesdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
121 // Using standard function for setting Cuts
122 Bool_t selectPrimaries=kTRUE;
123 fesdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(selectPrimaries);
126 //________________________________________________________________________
127 AliDalitzElectronCuts::~AliDalitzElectronCuts() {
129 //Deleting fHistograms leads to seg fault it it's added to output collection of a task
131 // delete fHistograms;
132 // fHistograms = NULL;
134 if(fCutString != NULL){
142 //________________________________________________________________________
143 void AliDalitzElectronCuts::InitCutHistograms(TString name, Bool_t preCut){
145 // Initialize Cut Histograms for QA (only initialized and filled if function is called)
148 if(fHistograms != NULL){
152 if(fHistograms==NULL){
153 fHistograms=new TList();
154 if(name=="")fHistograms->SetName(Form("ElectronCuts_%s",GetCutNumber().Data()));
155 else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data()));
159 hCutIndex=new TH1F(Form("IsElectronSelected %s",GetCutNumber().Data()),"IsElectronSelected",10,-0.5,9.5);
160 hCutIndex->GetXaxis()->SetBinLabel(kElectronIn+1,"in");
161 hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks");
162 hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts");
163 hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx");
164 hCutIndex->GetXaxis()->SetBinLabel(kElectronOut+1,"out");
165 fHistograms->Add(hCutIndex);
170 hdEdxCuts=new TH1F(Form("dEdxCuts %s",GetCutNumber().Data()),"dEdxCuts",10,-0.5,9.5);
171 hdEdxCuts->GetXaxis()->SetBinLabel(1,"in");
172 hdEdxCuts->GetXaxis()->SetBinLabel(2,"ITSelectron");
173 hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCelectron");
174 hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpion");
175 hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCpionhighp");
176 hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCkaonlowprej");
177 hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCprotonlowprej");
178 hdEdxCuts->GetXaxis()->SetBinLabel(8,"TPCpionlowprej");
179 hdEdxCuts->GetXaxis()->SetBinLabel(9,"TOFelectron");
180 hdEdxCuts->GetXaxis()->SetBinLabel(10,"out");
181 fHistograms->Add(hdEdxCuts);
185 TAxis *AxisBeforeITS = NULL;
186 TAxis *AxisBeforedEdx = NULL;
187 TAxis *AxisBeforeTOF = NULL;
192 hITSdEdxbefore=new TH2F(Form("Electron_ITS_before %s",GetCutNumber().Data()),"ITS dEdx electron before" ,150,0.05,20,400,-10,10);
193 fHistograms->Add(hITSdEdxbefore);
194 AxisBeforeITS = hITSdEdxbefore->GetXaxis();
196 hTPCdEdxbefore=new TH2F(Form("Electron_dEdx_before %s",GetCutNumber().Data()),"dEdx electron before" ,150,0.05,20,400,-10,10);
197 fHistograms->Add(hTPCdEdxbefore);
198 AxisBeforedEdx = hTPCdEdxbefore->GetXaxis();
200 hTOFbefore=new TH2F(Form("Electron_TOF_before %s",GetCutNumber().Data()),"TOF electron before" ,150,0.05,20,400,-6,10);
201 fHistograms->Add(hTOFbefore);
202 AxisBeforeTOF = hTOFbefore->GetXaxis();
207 hITSdEdxafter=new TH2F(Form("Electron_ITS_after %s",GetCutNumber().Data()),"ITS dEdx electron after" ,150,0.05,20,400, -10,10);
208 fHistograms->Add(hITSdEdxafter);
210 hTPCdEdxafter=new TH2F(Form("Electron_dEdx_after %s",GetCutNumber().Data()),"dEdx electron after" ,150,0.05,20,400, -10,10);
211 fHistograms->Add(hTPCdEdxafter);
213 hTOFafter=new TH2F(Form("Electron_TOF_after %s",GetCutNumber().Data()),"TOF electron after" ,150,0.05,20,400,-6,10);
214 fHistograms->Add(hTOFafter);
216 TAxis *AxisAfter = hTPCdEdxafter->GetXaxis();
217 Int_t bins = AxisAfter->GetNbins();
218 Double_t from = AxisAfter->GetXmin();
219 Double_t to = AxisAfter->GetXmax();
220 Double_t *newBins = new Double_t[bins+1];
222 Double_t factor = TMath::Power(to/from, 1./bins);
223 for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
224 AxisAfter->Set(bins, newBins);
225 AxisAfter = hTOFafter->GetXaxis();
226 AxisAfter->Set(bins, newBins);
227 AxisAfter = hITSdEdxafter->GetXaxis();
228 AxisAfter->Set(bins, newBins);
231 AxisBeforeITS->Set(bins, newBins);
232 AxisBeforedEdx->Set(bins, newBins);
233 AxisBeforeTOF->Set(bins, newBins);
238 // Event Cuts and Info
242 //________________________________________________________________________
243 Bool_t AliDalitzElectronCuts::InitPIDResponse(){
245 // Set Pointer to AliPIDResponse
247 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
251 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
252 fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
253 if(fPIDResponse)return kTRUE;
260 ///________________________________________________________________________
261 Bool_t AliDalitzElectronCuts::ElectronIsSelected(AliESDtrack* lTrack)
263 //Selection of Reconstructed electrons
265 if(hCutIndex)hCutIndex->Fill(kElectronIn);
268 if ( ! lTrack->GetConstrainedParam() ){
279 if(hCutIndex)hCutIndex->Fill(kNoTracks);
283 AliVTrack * track = dynamic_cast<AliVTrack*>(lTrack);
287 if( !TrackIsSelected(lTrack) ){
288 if(hCutIndex)hCutIndex->Fill(kTrackCuts);
294 if( ! dEdxCuts( track ) ) {
295 if(hCutIndex)hCutIndex->Fill(kdEdxCuts);
300 //Electron passed the cuts
301 if(hCutIndex)hCutIndex->Fill(kElectronOut);
307 ///________________________________________________________________________
308 Bool_t AliDalitzElectronCuts::TrackIsSelected(AliESDtrack* lTrack) {
309 // Track Selection for Photon Reconstruction
313 if( ! fesdTrackCuts->AcceptTrack(lTrack) ){
318 if( TMath::Abs( lTrack->Eta()) > fEtaCut ) {
323 if( lTrack->GetNcls(1) < fMinClsTPC ) {
333 if (!fUseCorrectedTPCClsInfo ){
334 if(lTrack->GetTPCNclsF()!=0){
336 clsToF = (Double_t)lTrack->GetNcls(1)/(Double_t)lTrack->GetTPCNclsF();
337 }// Ncluster/Nfindablecluster
341 //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));
342 clsToF = lTrack->GetTPCClusterInfo(2,1); //NOTE ask friederike
347 if( clsToF < fMinClsTPCToF){
355 ///________________________________________________________________________
356 Bool_t AliDalitzElectronCuts::dEdxCuts(AliVTrack *fCurrentTrack){
358 // Electron Identification Cuts for Photon reconstruction
360 if(!fPIDResponse){ InitPIDResponse(); }// Try to reinitialize PID Response
361 if(!fPIDResponse){ AliError("No PID Response"); return kFALSE;}// if still missing fatal error
365 //cout<<"dEdxCuts: //////////////////////////////////////////////////////////////////////////"<<endl;
371 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
372 if(hITSdEdxbefore)hITSdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
373 if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
379 if( fDodEdxSigmaITSCut == kTRUE ){
382 if( fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineITS ||
383 fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)> fPIDnSigmaAboveElectronLineITS ){
385 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
391 if(hITSdEdxafter)hITSdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
397 if(fDodEdxSigmaTPCCut == kTRUE){
401 if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineTPC ||
402 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLineTPC){
404 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
410 if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLineTPC && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLineTPC ){
411 if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
412 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC &&
413 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPC){
415 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
422 if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLineTPC ){
423 if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
424 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC&&
425 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPCHighPt){
427 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
438 if( fDoKaonRejectionLowP == kTRUE ){
440 if( fCurrentTrack->P() < fPIDMinPKaonRejectionLowP ){
442 if( TMath::Abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
444 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
452 if( fDoProtonRejectionLowP == kTRUE ){
454 if( fCurrentTrack->P() < fPIDMinPProtonRejectionLowP ){
455 if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
457 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
464 if(fDoPionRejectionLowP == kTRUE){
465 if( fCurrentTrack->P() < fPIDMinPPionRejectionLowP ){
466 if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)) < fPIDnSigmaAtLowPAroundPionLine ){
468 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
476 if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){
477 if(hTOFbefore) hTOFbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
479 if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine ||
480 fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){
481 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
485 if(hTOFafter)hTOFafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
489 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
490 if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
494 ///________________________________________________________________________
497 AliVTrack *AliDalitzElectronCuts::GetTrack(AliVEvent * event, Int_t label){
498 //Returns pointer to the track with given ESD label
499 //(Important for AOD implementation, since Track array in AOD data is different
500 //from ESD array, but ESD tracklabels are stored in AOD Tracks)
502 AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event);
504 if(label > event->GetNumberOfTracks() ) return NULL;
505 AliESDtrack * track = esdEvent->GetTrack(label);
509 for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) {
510 AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
513 if(track->GetID() == label) {
520 cout << "track not found " << label << " " << event->GetNumberOfTracks() << endl;
523 ///________________________________________________________________________
524 Bool_t AliDalitzElectronCuts::RejectSharedElecGamma(TList *photons, Int_t indexEle){
527 for(Int_t i = 0;i<photons->GetEntries();i++){
529 AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i);
531 Int_t posLabel = photonComp->GetTrackLabelPositive();
532 Int_t negLabel = photonComp->GetTrackLabelNegative();
534 if( (photonComp->GetConversionRadius() < fRadiusCut) && (posLabel == indexEle || negLabel == indexEle) ){
542 Double_t AliDalitzElectronCuts::GetPsiPair( const AliESDtrack* trackPos, const AliESDtrack* trackNeg ) const
545 // This angle is a measure for the contribution of the opening in polar
546 // direction Δ0 to the opening angle ξ Pair
548 // Ref. Measurement of photons via conversion pairs with the PHENIX experiment at RHIC
549 // Master Thesis. Thorsten Dahms. 2005
550 // https://twiki.cern.ch/twiki/pub/ALICE/GammaPhysicsPublications/tdahms_thesis.pdf
554 if( trackPos->GetConstrainedPxPyPz(momPos) == 0 ) trackPos->GetPxPyPz( momPos );
555 if( trackNeg->GetConstrainedPxPyPz(momNeg) == 0 ) trackNeg->GetPxPyPz( momNeg );
557 TVector3 posDaughter;
558 TVector3 negDaughter;
560 posDaughter.SetXYZ( momPos[0], momPos[1], momPos[2] );
561 negDaughter.SetXYZ( momNeg[0], momNeg[1], momNeg[2] );
563 Double_t deltaTheta = negDaughter.Theta() - posDaughter.Theta();
564 Double_t openingAngle = posDaughter.Angle( negDaughter ); //TMath::ACos( posDaughter.Dot(negDaughter)/(negDaughter.Mag()*posDaughter.Mag()) );
565 if( openingAngle < 1e-20 ) return 0.;
566 Double_t psiAngle = TMath::ASin( deltaTheta/openingAngle );
571 Bool_t AliDalitzElectronCuts::IsFromGammaConversion( Double_t psiPair, Double_t deltaPhi ) const
574 // Returns true if it is a gamma conversion according to psi pair value
576 return ( (deltaPhi > fDeltaPhiCutMin && deltaPhi < fDeltaPhiCutMax) &&
577 TMath::Abs(psiPair) < ( fPsiPairCut - fPsiPairCut/fDeltaPhiCutMax * deltaPhi ) );
580 ///________________________________________________________________________
581 Bool_t AliDalitzElectronCuts::UpdateCutString(cutIds cutID, Int_t value) {
582 ///Update the cut string (if it has been created yet)
584 if(fCutString && fCutString->GetString().Length() == kNCuts) {
585 cout << "Updating cut id in spot number " << cutID << " to " << value << endl;
586 fCutString->SetString(GetCutNumber());
588 cout << "fCutString not yet initialized, will not be updated" << endl;
591 // cout << fCutString->GetString().Data() << endl;
595 ///________________________________________________________________________
596 Bool_t AliDalitzElectronCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) {
597 // Initialize Cuts from a given Cut string
599 cout<<"Set Cut Number: "<<analysisCutSelection.Data()<<endl;
600 if(analysisCutSelection.Length()!=kNCuts) {
601 AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
604 if(!analysisCutSelection.IsDigit()){
605 AliError("Cut selection contains characters");
609 const char *cutSelection = analysisCutSelection.Data();
610 #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
611 for(Int_t ii=0;ii<kNCuts;ii++){
617 AliError("Analysis Cut Selection does not start with 9");
622 // Set Individual Cuts
623 for(Int_t ii=0;ii<kNCuts;ii++){
624 if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
631 ///________________________________________________________________________
632 Bool_t AliDalitzElectronCuts::SetCut(cutIds cutID, const Int_t value) {
633 ///Set individual cut ID
635 //cout << "Updating cut " << fgkCutNames[cutID] << " (" << cutID << ") to " << value << endl;
639 fCuts[kgoodId] = value;
641 cout << "Error:: First value of cut string is wrong, aborting!!" << endl;
647 case kededxSigmaITSCut:
648 if( SetITSdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
649 fCuts[kededxSigmaITSCut] = value;
650 UpdateCutString(cutID, value);
652 } else return kFALSE;
654 case kededxSigmaTPCCut:
655 if( SetTPCdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
656 fCuts[kededxSigmaTPCCut] = value;
657 UpdateCutString(cutID, value);
659 } else return kFALSE;
661 case kpidedxSigmaTPCCut:
662 if( SetTPCdEdxCutPionLine(value)) { //NOTE SetITSdEdxCutPionLine: To be implemented
663 fCuts[kpidedxSigmaTPCCut] = value;
664 UpdateCutString(cutID, value);
666 } else return kFALSE;
668 case kpiMinMomdedxSigmaTPCCut:
669 if( SetMinMomPiondEdxTPCCut(value)) {
670 fCuts[kpiMinMomdedxSigmaTPCCut] = value;
671 UpdateCutString(cutID, value);
673 } else return kFALSE;
675 case kpiMaxMomdedxSigmaTPCCut:
676 if( SetMaxMomPiondEdxTPCCut(value)) {
677 fCuts[kpiMaxMomdedxSigmaTPCCut] = value;
678 UpdateCutString(cutID, value);
680 } else return kFALSE;
682 case kLowPRejectionSigmaCut:
683 if( SetLowPRejectionCuts(value) ) {
684 fCuts[kLowPRejectionSigmaCut] = value;
685 UpdateCutString(cutID, value);
687 } else return kFALSE;
690 case kTOFelectronPID:
691 if( SetTOFElectronPIDCut(value)) {
692 fCuts[kTOFelectronPID] = value;
693 UpdateCutString(cutID, value);
695 } else return kFALSE;
698 if( SetTPCClusterCut(value)) {
699 fCuts[kclsTPCCut] = value;
700 UpdateCutString(cutID, value);
702 } else return kFALSE;
705 if( SetEtaCut(value)) {
706 fCuts[ketaCut] = value;
707 UpdateCutString(cutID, value);
709 } else return kFALSE;
711 if( SetPsiPairCut(value)) {
712 fCuts[kPsiPair] = value;
713 UpdateCutString(cutID, value);
715 } else return kFALSE;
717 case kRejectSharedElecGamma:
718 if( SetRejectSharedElecGamma(value)) {
719 fCuts[kRejectSharedElecGamma] = value;
720 UpdateCutString(cutID, value);
722 } else return kFALSE;
724 case kBackgroundScheme:
725 if( SetBackgroundScheme(value)) {
726 fCuts[kBackgroundScheme] = value;
727 UpdateCutString(cutID, value);
729 } else return kFALSE;
732 cout << "Error:: Cut id out of range"<< endl;
736 cout << "Error:: Cut id " << cutID << " not recognized "<< endl;
743 ///________________________________________________________________________
745 void AliDalitzElectronCuts::PrintCuts() {
746 // Print out current Cut Selection
747 for(Int_t ic = 0; ic < kNCuts; ic++) {
748 printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
753 ///________________________________________________________________________
754 Bool_t AliDalitzElectronCuts::SetITSdEdxCutElectronLine(Int_t ededxSigmaCut)
757 switch(ededxSigmaCut){
760 fDodEdxSigmaITSCut = kFALSE;
761 fPIDnSigmaBelowElectronLineITS=-100;
762 fPIDnSigmaAboveElectronLineITS= 100;
765 fDodEdxSigmaITSCut = kTRUE;
766 fPIDnSigmaBelowElectronLineITS=-10;
767 fPIDnSigmaAboveElectronLineITS=10;
770 fDodEdxSigmaITSCut = kTRUE;
771 fPIDnSigmaBelowElectronLineITS=-6;
772 fPIDnSigmaAboveElectronLineITS=7;
775 fDodEdxSigmaITSCut = kTRUE;
776 fPIDnSigmaBelowElectronLineITS=-5;
777 fPIDnSigmaAboveElectronLineITS=5;
780 fDodEdxSigmaITSCut = kTRUE;
781 fPIDnSigmaBelowElectronLineITS=-4;
782 fPIDnSigmaAboveElectronLineITS=5;
785 fDodEdxSigmaITSCut = kTRUE;
786 fPIDnSigmaBelowElectronLineITS=-3;
787 fPIDnSigmaAboveElectronLineITS=5;
790 fDodEdxSigmaITSCut = kTRUE;
791 fPIDnSigmaBelowElectronLineITS=-4;
792 fPIDnSigmaAboveElectronLineITS=4;
795 fDodEdxSigmaITSCut = kTRUE;
796 fPIDnSigmaBelowElectronLineITS=-2.5;
797 fPIDnSigmaAboveElectronLineITS=4;
800 fDodEdxSigmaITSCut = kTRUE;
801 fPIDnSigmaBelowElectronLineITS=-2;
802 fPIDnSigmaAboveElectronLineITS=3.5;
805 cout<<"Warning: ITSdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
812 ///________________________________________________________________________
813 Bool_t AliDalitzElectronCuts::SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut)
815 switch(ededxSigmaCut){
817 case 0: fDodEdxSigmaTPCCut = kFALSE;
818 fPIDnSigmaBelowElectronLineTPC=-10;
819 fPIDnSigmaAboveElectronLineTPC=10;
822 fDodEdxSigmaTPCCut = kTRUE;
823 fPIDnSigmaBelowElectronLineTPC=-10;
824 fPIDnSigmaAboveElectronLineTPC=10;
827 fDodEdxSigmaTPCCut = kTRUE;
828 fPIDnSigmaBelowElectronLineTPC=-6;
829 fPIDnSigmaAboveElectronLineTPC=7;
832 fDodEdxSigmaTPCCut = kTRUE;
833 fPIDnSigmaBelowElectronLineTPC=-5;
834 fPIDnSigmaAboveElectronLineTPC=5;
837 fDodEdxSigmaTPCCut = kTRUE;
838 fPIDnSigmaBelowElectronLineTPC=-4;
839 fPIDnSigmaAboveElectronLineTPC=5;
842 fDodEdxSigmaTPCCut = kTRUE;
843 fPIDnSigmaBelowElectronLineTPC=-3;
844 fPIDnSigmaAboveElectronLineTPC=5;
847 fDodEdxSigmaTPCCut = kTRUE;
848 fPIDnSigmaBelowElectronLineTPC=-4;
849 fPIDnSigmaAboveElectronLineTPC=4;
852 fDodEdxSigmaTPCCut = kTRUE;
853 fPIDnSigmaBelowElectronLineTPC=-2.5;
854 fPIDnSigmaAboveElectronLineTPC=4;
857 fDodEdxSigmaTPCCut = kTRUE;
858 fPIDnSigmaBelowElectronLineTPC=-2;
859 fPIDnSigmaAboveElectronLineTPC=3.5;
862 cout<<"Warning: TPCdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
869 ///________________________________________________________________________
870 Bool_t AliDalitzElectronCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
873 switch(pidedxSigmaCut){
875 case 0: fPIDnSigmaAbovePionLineTPC= 0;
876 fPIDnSigmaAbovePionLineTPCHighPt=-100;
879 fPIDnSigmaAbovePionLineTPC=-10;
880 fPIDnSigmaAbovePionLineTPCHighPt=-10;
883 fPIDnSigmaAbovePionLineTPC=-1;
884 fPIDnSigmaAbovePionLineTPCHighPt=-10;
887 fPIDnSigmaAbovePionLineTPC=0;
888 fPIDnSigmaAbovePionLineTPCHighPt=-10;
891 fPIDnSigmaAbovePionLineTPC=1;
892 fPIDnSigmaAbovePionLineTPCHighPt=-10;
895 fPIDnSigmaAbovePionLineTPC=2.;
896 fPIDnSigmaAbovePionLineTPCHighPt=-10;
899 fPIDnSigmaAbovePionLineTPC=2.5;
900 fPIDnSigmaAbovePionLineTPCHighPt=-10;
903 fPIDnSigmaAbovePionLineTPC=3.0; // We need a bit less tight cut on dE/dx
904 fPIDnSigmaAbovePionLineTPCHighPt=-10;
907 fPIDnSigmaAbovePionLineTPC=3.5;
908 fPIDnSigmaAbovePionLineTPCHighPt=-10;
911 fPIDnSigmaAbovePionLineTPC=1.5;
912 fPIDnSigmaAbovePionLineTPCHighPt=-1.0;
915 cout<<"Warning: pidedxSigmaCut not defined "<<pidedxSigmaCut<<endl;
921 ///________________________________________________________________________
922 Bool_t AliDalitzElectronCuts::SetMinMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut)
924 switch(piMomdedxSigmaCut){
926 case 0: fPIDMinPnSigmaAbovePionLineTPC=0.;
929 fPIDMinPnSigmaAbovePionLineTPC=50.;
932 fPIDMinPnSigmaAbovePionLineTPC=20.;
935 fPIDMinPnSigmaAbovePionLineTPC=1.5;
938 fPIDMinPnSigmaAbovePionLineTPC=1.;
941 fPIDMinPnSigmaAbovePionLineTPC=0.5;
944 fPIDMinPnSigmaAbovePionLineTPC=0.4;
947 fPIDMinPnSigmaAbovePionLineTPC=0.3;
950 fPIDMinPnSigmaAbovePionLineTPC=0.25;
953 cout<<"Warning: piMomdedxSigmaCut not defined "<<piMomdedxSigmaCut<<endl;
959 ///________________________________________________________________________
960 Bool_t AliDalitzElectronCuts::SetTPCClusterCut(Int_t clsTPCCut)
975 case 4: // 0% of findable clusters
977 fUseCorrectedTPCClsInfo=0;
979 case 5: // 35% of findable clusters
981 fUseCorrectedTPCClsInfo=0;
983 case 6: // 60% of findable clusters
985 fUseCorrectedTPCClsInfo=0;
987 case 7: // 70% of findable clusters
989 fUseCorrectedTPCClsInfo=0;
992 cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;
998 ///________________________________________________________________________
999 Bool_t AliDalitzElectronCuts::SetEtaCut(Int_t etaCut)
1003 case 0: fEtaCut = 100.;
1021 cout<<"Warning: EtaCut not defined "<<etaCut<<endl;
1027 ///________________________________________________________________________
1028 Bool_t AliDalitzElectronCuts::SetMaxMomPiondEdxTPCCut(Int_t piMaxMomdedxSigmaCut)
1030 switch(piMaxMomdedxSigmaCut){
1032 case 0: fPIDMinPnSigmaAbovePionLineTPC=0.;
1035 fPIDMaxPnSigmaAbovePionLineTPC=100.;
1038 fPIDMaxPnSigmaAbovePionLineTPC=5.;
1041 fPIDMaxPnSigmaAbovePionLineTPC=4.;
1044 fPIDMaxPnSigmaAbovePionLineTPC=3.5;
1047 fPIDMaxPnSigmaAbovePionLineTPC=3.;
1050 cout<<"Warning: piMaxMomdedxSigmaCut not defined "<<piMaxMomdedxSigmaCut<<endl;
1056 ///________________________________________________________________________
1057 Bool_t AliDalitzElectronCuts::SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut)
1059 switch(LowPRejectionSigmaCut){
1061 fDoKaonRejectionLowP=kFALSE;
1062 fDoProtonRejectionLowP=kFALSE;
1063 fDoPionRejectionLowP=kFALSE;
1064 fPIDnSigmaAtLowPAroundKaonLine=0;
1065 fPIDnSigmaAtLowPAroundProtonLine=0;
1066 fPIDnSigmaAtLowPAroundPionLine=0;
1069 fDoKaonRejectionLowP=kTRUE;
1070 fDoProtonRejectionLowP=kTRUE;
1071 fDoPionRejectionLowP=kTRUE;
1072 fPIDnSigmaAtLowPAroundKaonLine=0.5;
1073 fPIDnSigmaAtLowPAroundProtonLine=0.5;
1074 fPIDnSigmaAtLowPAroundPionLine=0.5;
1077 fDoKaonRejectionLowP=kTRUE;
1078 fDoProtonRejectionLowP=kTRUE;
1079 fDoPionRejectionLowP=kTRUE;
1080 fPIDnSigmaAtLowPAroundKaonLine=1;
1081 fPIDnSigmaAtLowPAroundProtonLine=1;
1082 fPIDnSigmaAtLowPAroundPionLine=1;
1085 fDoKaonRejectionLowP=kTRUE;
1086 fDoProtonRejectionLowP=kTRUE;
1087 fDoPionRejectionLowP=kTRUE;
1088 fPIDnSigmaAtLowPAroundKaonLine=1.5;
1089 fPIDnSigmaAtLowPAroundProtonLine=1.5;
1090 fPIDnSigmaAtLowPAroundPionLine=1.5;
1093 fDoKaonRejectionLowP=kTRUE;
1094 fDoProtonRejectionLowP=kTRUE;
1095 fDoPionRejectionLowP=kTRUE;
1096 fPIDnSigmaAtLowPAroundKaonLine=0.;
1097 fPIDnSigmaAtLowPAroundProtonLine=0.;
1098 fPIDnSigmaAtLowPAroundPionLine=1;
1101 fDoKaonRejectionLowP=kTRUE;
1102 fDoProtonRejectionLowP=kTRUE;
1103 fDoPionRejectionLowP=kTRUE;
1104 fPIDnSigmaAtLowPAroundKaonLine=0.;
1105 fPIDnSigmaAtLowPAroundProtonLine=0.;
1106 fPIDnSigmaAtLowPAroundPionLine=1.5;
1109 fDoKaonRejectionLowP=kTRUE;
1110 fDoProtonRejectionLowP=kTRUE;
1111 fDoPionRejectionLowP=kTRUE;
1112 fPIDnSigmaAtLowPAroundKaonLine=0.;
1113 fPIDnSigmaAtLowPAroundProtonLine=0.;
1114 fPIDnSigmaAtLowPAroundPionLine=2.;
1117 cout<<"Warning: LowPRejectionSigmaCut not defined "<<LowPRejectionSigmaCut<<endl;
1123 ///________________________________________________________________________
1124 Bool_t AliDalitzElectronCuts::SetTOFElectronPIDCut(Int_t TOFelectronPID){
1126 switch(TOFelectronPID){ // RRnewTOF start //////////////////////////////////////////////////////////////////////////
1128 fUseTOFpid = kFALSE;
1129 fTofPIDnSigmaBelowElectronLine=-100;
1130 fTofPIDnSigmaAboveElectronLine=100;
1134 fTofPIDnSigmaBelowElectronLine=-7;
1135 fTofPIDnSigmaAboveElectronLine=7;
1139 fTofPIDnSigmaBelowElectronLine=-5;
1140 fTofPIDnSigmaAboveElectronLine=5;
1144 fTofPIDnSigmaBelowElectronLine=-3;
1145 fTofPIDnSigmaAboveElectronLine=5;
1149 fTofPIDnSigmaBelowElectronLine=-2;
1150 fTofPIDnSigmaAboveElectronLine=3;
1153 cout<<"Warning: TOFElectronCut not defined "<<TOFelectronPID<<endl;
1155 } //////////////////////// RRnewTOF end //////////////////////////////////////////////////////////////////////////
1158 ///_______________________________________________________________________________
1160 Bool_t AliDalitzElectronCuts::SetPsiPairCut(Int_t psiCut) {
1165 fDoPsiPairCut = kFALSE;
1166 fPsiPairCut = 10000; //
1167 fDeltaPhiCutMin = -1000.;
1168 fDeltaPhiCutMax = 1000.;
1172 fDoPsiPairCut = kTRUE;
1173 fPsiPairCut = 0.45; // Standard
1174 fDeltaPhiCutMin = 0.;
1175 fDeltaPhiCutMax = 0.12;
1178 cout<<"Warning: PsiPairCut not defined "<<fPsiPairCut<<endl;
1185 ///_______________________________________________________________________________
1186 Bool_t AliDalitzElectronCuts::SetRejectSharedElecGamma(Int_t RCut) {
1191 fDoRejectSharedElecGamma = kFALSE;
1192 fRadiusCut = 10000; //
1195 fDoRejectSharedElecGamma = kTRUE;
1196 fRadiusCut = 2.0; // cm
1199 fDoRejectSharedElecGamma = kTRUE;
1200 fRadiusCut = 3.0; // Standard
1203 fDoRejectSharedElecGamma = kTRUE;
1204 fRadiusCut = 4.0; //
1207 fDoRejectSharedElecGamma = kTRUE;
1208 fRadiusCut = 5.0; //
1211 fDoRejectSharedElecGamma = kTRUE;
1212 fRadiusCut = 10.0; //
1215 fDoRejectSharedElecGamma = kTRUE;
1216 fRadiusCut = 15.0; //
1219 cout<<"Warning: PsiPairCut not defined "<<fDoRejectSharedElecGamma<<endl;
1225 ///__________________________________________________________________________
1226 Bool_t AliDalitzElectronCuts::SetBackgroundScheme(Int_t BackgroundScheme){
1229 switch(BackgroundScheme){
1233 fUseTrackMultiplicityForBG = kFALSE;
1235 case 1: // mixed event with V0 multiplicity
1237 fUseTrackMultiplicityForBG = kFALSE;
1239 case 2: // mixed event with track multiplicity
1240 fUseTrackMultiplicityForBG = kTRUE;
1244 fUseTrackMultiplicityForBG = kFALSE;
1248 fUseTrackMultiplicityForBG = kTRUE;
1253 cout<<"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
1258 ///________________________________________________________________________
1259 TString AliDalitzElectronCuts::GetCutNumber(){
1260 // returns TString with current cut number
1262 for(Int_t ii=0;ii<kNCuts;ii++){
1263 a.Append(Form("%d",fCuts[ii]));
1269 ///________________________________________________________________________
1270 AliDalitzElectronCuts* AliDalitzElectronCuts::GetStandardCuts2010PbPb(){
1271 //Create and return standard 2010 PbPb cuts
1272 AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
1273 if(!cuts->InitializeCutsFromCutString("9069640364102")){
1274 cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
1278 ///________________________________________________________________________
1279 AliDalitzElectronCuts* AliDalitzElectronCuts::GetStandardCuts2010pp(){
1280 //Create and return standard 2010 PbPb cuts
1281 AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010pp","StandardCuts2010pp");
1283 if(!cuts->InitializeCutsFromCutString("9069640364102")){
1284 cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}