From 03decc29a5f81569423c6f9506e1fdc20392f16c Mon Sep 17 00:00:00 2001 From: akisiel Date: Mon, 1 Feb 2010 10:24:05 +0000 Subject: [PATCH] Fix Gamma calculation^CliFemtoModelGausLCMSFreezeOutGenerator.cxx --- .../AliFemto/AliAnalysisTaskFemto.cxx | 35 ++++++++++++++++-- .../AliFemto/AliAnalysisTaskFemto.h | 2 ++ .../AliFemto/AliFemtoBasicEventCut.cxx | 3 +- .../AliFemtoCutMonitorParticleYPt.cxx | 16 ++++----- PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx | 36 +++++++++++-------- PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h | 2 ++ .../AliFemto/AliFemtoEventReaderESDChain.cxx | 10 +++++- ...liFemtoModelGausLCMSFreezeOutGenerator.cxx | 2 +- 8 files changed, 77 insertions(+), 29 deletions(-) diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx index 912245662ea..d3e867ddb55 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx @@ -241,6 +241,20 @@ void AliAnalysisTaskFemto::Exec(Option_t *) { fesdck->SetGenEventHeader(hdh); fManager->ProcessEvent(); } + AliFemtoEventReaderStandard* fstd = dynamic_cast (fReader); + if (fstd) + { + // Process the event with Kine information + fstd->SetESDSource(fESD); + if (mctruth) { + fstd->SetStackSource(fStack); + fstd->SetGenEventHeader(hdh); + fstd->SetInputType(AliFemtoEventReaderStandard::kESDKine); + } + else + fstd->SetInputType(AliFemtoEventReaderStandard::kESD); + fManager->ProcessEvent(); + } } // Post the output histogram list @@ -279,6 +293,14 @@ void AliAnalysisTaskFemto::Exec(Option_t *) { faodc->SetAODSource(fAOD); fManager->ProcessEvent(); } + AliFemtoEventReaderStandard* fstd = dynamic_cast (fReader); + + if (fstd) { + // Process the event + fstd->SetAODSource(fAOD); + fstd->SetInputType(AliFemtoEventReaderStandard::kAOD); + fManager->ProcessEvent(); + } } } @@ -304,13 +326,13 @@ void AliAnalysisTaskFemto:: FinishTaskOutput() { //________________________________________________________________________ void AliAnalysisTaskFemto::SetFemtoReaderESD(AliFemtoEventReaderESDChain *aReader) { - printf("Selectring Femto reader for ESD\n"); + printf("Selecting Femto reader for ESD\n"); fReader = aReader; } //________________________________________________________________________ void AliAnalysisTaskFemto::SetFemtoReaderESDKine(AliFemtoEventReaderESDChainKine *aReader) { - printf("Selectring Femto reader for ESD with Kinematics information\n"); + printf("Selecting Femto reader for ESD with Kinematics information\n"); fReader = aReader; } //________________________________________________________________________ @@ -319,6 +341,11 @@ void AliAnalysisTaskFemto::SetFemtoReaderAOD(AliFemtoEventReaderAODChain *aReade printf("Selecting Femto reader for AOD\n"); fReader = aReader; } +void AliAnalysisTaskFemto::SetFemtoReaderStandard(AliFemtoEventReaderStandard *aReader) +{ + printf("Selecting Standard all-purpose Femto reader\n"); + fReader = aReader; +} //________________________________________________________________________ void AliAnalysisTaskFemto::SetFemtoManager(AliFemtoManager *aManager) { @@ -327,13 +354,15 @@ void AliAnalysisTaskFemto::SetFemtoManager(AliFemtoManager *aManager) AliFemtoEventReaderESDChain *tReaderESDChain = dynamic_cast (aManager->EventReader()); AliFemtoEventReaderESDChainKine *tReaderESDChainKine = dynamic_cast (aManager->EventReader()); AliFemtoEventReaderAODChain *tReaderAODChain = dynamic_cast (aManager->EventReader()); + AliFemtoEventReaderStandard *tReaderStandard = dynamic_cast (aManager->EventReader()); - if ((!tReaderESDChain) && (!tReaderESDChainKine) && (!tReaderAODChain)) { + if ((!tReaderESDChain) && (!tReaderESDChainKine) && (!tReaderAODChain) && (!tReaderStandard)) { printf("No AliFemto event reader created. Will not run femto analysis.\n"); return; } if (tReaderESDChain) SetFemtoReaderESD(tReaderESDChain); if (tReaderESDChainKine) SetFemtoReaderESDKine(tReaderESDChainKine); if (tReaderAODChain) SetFemtoReaderAOD(tReaderAODChain); + if (tReaderStandard) SetFemtoReaderStandard(tReaderStandard); } diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h b/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h index 49f771fcfe2..f240bd4503b 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h @@ -24,6 +24,7 @@ #include "AliFemtoEventReaderESDChain.h" #include "AliFemtoEventReaderESDChainKine.h" #include "AliFemtoEventReaderAODChain.h" +#include "AliFemtoEventReaderStandard.h" #include "AliFemtoManager.h" class AliAnalysisTaskFemto : public AliAnalysisTask { @@ -44,6 +45,7 @@ class AliAnalysisTaskFemto : public AliAnalysisTask { void SetFemtoReaderESD(AliFemtoEventReaderESDChain *aReader); void SetFemtoReaderESDKine(AliFemtoEventReaderESDChainKine *aReader); void SetFemtoReaderAOD(AliFemtoEventReaderAODChain *aReader); + void SetFemtoReaderStandard(AliFemtoEventReaderStandard *aReader); void SetFemtoManager(AliFemtoManager *aManager); private: diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx index 362aa4f369a..713521992e3 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx @@ -35,7 +35,8 @@ AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){ bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){ // Pass events if they fall within the multiplicity and z-vertex // position range. Fail otherwise - int mult = event->NumberOfTracks(); + // int mult = event->NumberOfTracks(); + int mult = event->UncorrectedNumberOfPrimaries(); double vertexZPos = event->PrimVertPos().z(); // cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl; // cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl; diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx index e6c01b49b1c..6b5ab7c6ee5 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx @@ -24,13 +24,13 @@ AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(): fMass(0.13957) { // Default constructor - fYPt = new TH2D("YPt", "Rapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0); + fYPt = new TH2D("YPt", "Rapidity vs Pt", 100, -1.0, 1.0, 100, 0.0, 2.0); fYPhi = new TH2D("YPhi", "Rapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); - fPtPhi = new TH2D("PtPhi", "Pt vs Phi", 100, 0.1, 2.0, 100, -TMath::Pi(), TMath::Pi()); + fPtPhi = new TH2D("PtPhi", "Pt vs Phi", 100, 0.0, 2.0, 100, -TMath::Pi(), TMath::Pi()); fEtaPhi = new TH2D("EtaPhi", "Pseudorapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); - fEtaPt = new TH2D("EtaPt", "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0); + fEtaPt = new TH2D("EtaPt", "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.0, 2.0); fEtaPhiW = new TH2D("EtaPhiW", "Pseudorapidity vs Phi chi2/N weighted", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); - fEtaPtW = new TH2D("EtaPtW", "Pseudorapidity vs Pt chi2/N weighted", 100, -1.0, 1.0, 100, 0.1, 2.0); + fEtaPtW = new TH2D("EtaPtW", "Pseudorapidity vs Pt chi2/N weighted", 100, -1.0, 1.0, 100, 0.0, 2.0); fDCARPt = new TH2D("DCARPt", "DCA in XY vs. Pt", 400, -2.0, 2.0, 100,0.0,2.0); fDCAZPt = new TH2D("DCAZPt", "DCA in Z vs. Pt", 400, -2.0, 2.0, 100,0.0,2.0); } @@ -51,19 +51,19 @@ AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const char *aName, // Normal constructor char name[200]; snprintf(name, 200, "YPt%s", aName); - fYPt = new TH2D(name, "Rapdity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0); + fYPt = new TH2D(name, "Rapdity vs Pt", 100, -1.0, 1.0, 100, 0.0, 2.0); snprintf(name, 200, "YPhi%s", aName); fYPhi = new TH2D(name, "Rapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); snprintf(name, 200, "PtPhi%s", aName); - fPtPhi = new TH2D(name, "Pt vs Phi", 100, 0.1, 2.0, 100, -TMath::Pi(), TMath::Pi()); + fPtPhi = new TH2D(name, "Pt vs Phi", 100, 0.0, 2.0, 100, -TMath::Pi(), TMath::Pi()); snprintf(name, 200, "EtaPhi%s", aName); fEtaPhi = new TH2D(name, "Pseudorapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); snprintf(name, 200, "EtaPt%s", aName); - fEtaPt = new TH2D(name, "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0); + fEtaPt = new TH2D(name, "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.0, 2.0); snprintf(name, 200, "EtaPhiW%s", aName); fEtaPhiW = new TH2D(name, "Pseudorapidity vs Phi chi2/N weighted", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi()); snprintf(name, 200, "EtaPtW%s", aName); - fEtaPtW = new TH2D(name, "Pseudorapidity vs Pt chi2/N weighted", 100, -1.0, 1.0, 100, 0.1, 2.0); + fEtaPtW = new TH2D(name, "Pseudorapidity vs Pt chi2/N weighted", 100, -1.0, 1.0, 100, 0.0, 2.0); snprintf(name, 200, "DCARPt%s", aName); fDCARPt = new TH2D(name, "DCA in XY vs. Pt", 400, -2.0, 2.0, 100,0.0,2.0); snprintf(name, 200, "DCAZPt%s", aName); diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx index 004edf006a2..003f5f0fe59 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx @@ -28,6 +28,7 @@ AliFemtoEvent::AliFemtoEvent(): fEventNumber(0), fRunNumber(0), fNumberOfTracks(0), + fNormalizedMult(-1), fMagneticField(0), fIsCollisionCandidate(kTRUE), fPrimVertPos(0,0,0), @@ -67,6 +68,7 @@ AliFemtoEvent::AliFemtoEvent(const AliFemtoEvent& ev, AliFemtoTrackCut* tCut, Al fEventNumber(0), fRunNumber(0), fNumberOfTracks(0), + fNormalizedMult(-1), fMagneticField(0), fIsCollisionCandidate(kTRUE), fPrimVertPos(0,0,0), @@ -98,6 +100,7 @@ AliFemtoEvent::AliFemtoEvent(const AliFemtoEvent& ev, AliFemtoTrackCut* tCut, Al fZDCEMEnergy=ev.fZDCEMEnergy; fZDCParticipants=ev.fZDCParticipants; fNumberOfTracks = ev.fNumberOfTracks; + fNormalizedMult = ev.fNormalizedMult; fMagneticField= ev.fMagneticField; fIsCollisionCandidate = ev.fIsCollisionCandidate; @@ -145,6 +148,7 @@ AliFemtoEvent::AliFemtoEvent(const AliFemtoEvent& ev): fEventNumber(0), fRunNumber(0), fNumberOfTracks(0), + fNormalizedMult(-1), fMagneticField(0), fIsCollisionCandidate(kTRUE), fPrimVertPos(0,0,0), @@ -225,6 +229,7 @@ AliFemtoEvent& AliFemtoEvent::operator=(const AliFemtoEvent& aEvent) fZDCEMEnergy=aEvent.fZDCEMEnergy; fZDCParticipants=aEvent.fZDCParticipants; fNumberOfTracks = aEvent.fNumberOfTracks; + fNormalizedMult = aEvent.fNormalizedMult; fMagneticField= aEvent.fMagneticField; fIsCollisionCandidate = aEvent.fIsCollisionCandidate; @@ -304,11 +309,9 @@ void AliFemtoEvent::SetZDCN2Energy(const float& aZDCN2Energy){fZDCN2Energy=aZDCN void AliFemtoEvent::SetZDCP2Energy(const float& aZDCP2Energy){fZDCP2Energy=aZDCP2Energy;} void AliFemtoEvent::SetZDCEMEnergy(const float& aZDCEMEnergy){fZDCEMEnergy=aZDCEMEnergy;} void AliFemtoEvent::SetZDCParticipants(const unsigned int& aZDCParticipants){fZDCParticipants=aZDCParticipants;} - void AliFemtoEvent::SetNumberOfTracks(const unsigned short& tracks){fNumberOfTracks = tracks;} - - +void AliFemtoEvent::SetNormalizedMult(const int& i){fNormalizedMult = i;} void AliFemtoEvent::SetPrimVertPos(const AliFemtoThreeVector& vp){fPrimVertPos = vp;} void AliFemtoEvent::SetPrimVertCov(const double* v){ @@ -364,19 +367,22 @@ double AliFemtoEvent::UncorrectedNumberOfNegativePrimaries() const double AliFemtoEvent::UncorrectedNumberOfPrimaries() const { - // Count number of normalized charged tracks - Int_t tNormTrackCount = 0; - for (AliFemtoTrackIterator iter=fTrackCollection->begin();iter!=fTrackCollection->end();iter++){ - if (!((*iter)->Flags()&(AliFemtoTrack::kTPCrefit))) continue; - if ((*iter)->TPCncls() < 50) continue; - if ((*iter)->TPCchi2()/(*iter)->TPCncls() > 60.0) continue; - if ((*iter)->ImpactD() > 6.0) continue; - if ((*iter)->ImpactZ() > 6.0) continue; - if (fabs((*iter)->P().pseudoRapidity()) > 0.9) continue; - - tNormTrackCount++; + if (fNormalizedMult < 0) { + // Count number of normalized charged tracks + Int_t tNormTrackCount = 0; + for (AliFemtoTrackIterator iter=fTrackCollection->begin();iter!=fTrackCollection->end();iter++){ + if (!((*iter)->Flags()&(AliFemtoTrack::kTPCrefit))) continue; + if ((*iter)->TPCncls() < 50) continue; + if ((*iter)->TPCchi2()/(*iter)->TPCncls() > 60.0) continue; + if ((*iter)->ImpactD() > 6.0) continue; + if ((*iter)->ImpactZ() > 6.0) continue; + if (fabs((*iter)->P().pseudoRapidity()) > 0.9) continue; + + tNormTrackCount++; + } + return tNormTrackCount; } - return tNormTrackCount; + return fNormalizedMult; // return NumberOfTracks(); } diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h index 1d63559d978..6af4953495e 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h @@ -73,6 +73,7 @@ public: void SetEventNumber(const unsigned short& s); void SetRunNumber(const int& i); void SetNumberOfTracks(const unsigned short& s); + void SetNormalizedMult(const int& i); void SetPrimVertPos(const AliFemtoThreeVector& v); void SetPrimVertCov(const double* v); void SetMagneticField(const double& x); @@ -98,6 +99,7 @@ private: unsigned short fEventNumber; // Event number in file unsigned short fRunNumber; // run number the event belong to unsigned short fNumberOfTracks; // total number of TPC tracks + int fNormalizedMult; // normalized multiplicity double fMagneticField; // magnetic field in Z direction bool fIsCollisionCandidate; // is collision candidate diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx index ca84992482c..d10f616d8b2 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx @@ -316,12 +316,19 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() // } + int tNormMult = 0; for (int i=0;iGetTrack(i);//getting next track // const AliESDfriendTrack *tESDfriendTrack = esdtrack->GetFriendTrack(); + if (esdtrack->GetStatus() & AliESDtrack::kTPCrefit) + if (esdtrack->GetTPCNcls() > 80) + if (esdtrack->GetTPCchi2()/esdtrack->GetTPCNcls() < 6.0) + if (esdtrack->GetConstrainedParam()) + if (esdtrack->GetConstrainedParam()->Eta() < 0.9) + tNormMult++; // If reading ITS-only tracks, reject all with TPC if (fTrackType == kITSOnly) { @@ -508,6 +515,7 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() } hbtEvent->SetNumberOfTracks(realnofTracks);//setting number of track which we read in event + hbtEvent->SetNormalizedMult(tNormMult); fCurEvent++; cout<<"end of reading nt "<