virtual AliFemtoString Report() = 0; //! returns reports of all cuts applied and correlation functions being done
virtual TList* ListSettings() = 0; // return list of cut settings for the analysis
+ virtual TList* GetOutputList() = 0; // Return a TList of objects to be written as output
virtual void ProcessEvent(const AliFemtoEvent* aEventToAnalyze) = 0;
virtual void Finish() = 0;
}
*/
}
+//______________________________
+TList* AliFemtoBPLCMS3DCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fNumerator);
+ tOutputList->Add(fDenominator);
+ tOutputList->Add(fQinvHisto);
+
+ return tOutputList;
+}
//_________________________
void AliFemtoBPLCMS3DCorrFctn::Finish(){
float GetNormRangeHi() const;
void WriteOutHistos();
+ virtual TList* GetOutputList();
// void SetCoulombCorrection(AliFemtoCoulomb* Correction);
virtual void EventEnd(const AliFemtoEvent* aEvent) { /* no-op */ }
virtual void Finish() = 0;
+ virtual TList* GetOutputList() = 0;
+
virtual AliFemtoCorrFctn* Clone() { return 0;}
AliFemtoAnalysis* HbtAnalysis(){return fyAnalysis;};
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoCorrFctnNonIdDR - correlation function for non-identical particles //
+// uses k* as a function variable. Stores the correlation function separately //
+// for positive and negative signs of k* projections into out, side and long //
+// directions, enabling the calculations of double ratios //
+// //
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliFemtoCorrFctnNonIdDR.h"
+//#include "AliFemtoHisto.h"
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoCorrFctnNonIdDR)
+#endif
+
+//____________________________
+AliFemtoCorrFctnNonIdDR::AliFemtoCorrFctnNonIdDR(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
+ fNumOutP(0),
+ fNumOutN(0),
+ fNumSideP(0),
+ fNumSideN(0),
+ fNumLongP(0),
+ fNumLongN(0),
+ fDenOutP(0),
+ fDenOutN(0),
+ fDenSideP(0),
+ fDenSideN(0),
+ fDenLongP(0),
+ fDenLongN(0)
+{
+ // Default constructor
+ // set up numerators
+ char bufname[200];
+ snprintf(bufname, 200, "NumOutP%s", title);
+ fNumOutP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "NumOutN%s", title);
+ fNumOutN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "NumSideP%s", title);
+ fNumSideP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "NumSideN%s", title);
+ fNumSideN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "NumLongP%s", title);
+ fNumLongP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "NumLongN%s", title);
+ fNumLongN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+
+ // set up denominators
+ snprintf(bufname, 200, "DenOutP%s", title);
+ fDenOutP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "DenOutN%s", title);
+ fDenOutN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "DenSideP%s", title);
+ fDenSideP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "DenSideN%s", title);
+ fDenSideN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "DenLongP%s", title);
+ fDenLongP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+ snprintf(bufname, 200, "DenLongN%s", title);
+ fDenLongN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
+
+ // to enable error bar calculation...
+ fNumOutP->Sumw2();
+ fNumOutN->Sumw2();
+ fNumSideP->Sumw2();
+ fNumSideN->Sumw2();
+ fNumLongP->Sumw2();
+ fNumLongN->Sumw2();
+ fDenOutP->Sumw2();
+ fDenOutN->Sumw2();
+ fDenSideP->Sumw2();
+ fDenSideN->Sumw2();
+ fDenLongP->Sumw2();
+ fDenLongN->Sumw2();
+}
+
+//____________________________
+AliFemtoCorrFctnNonIdDR::AliFemtoCorrFctnNonIdDR(const AliFemtoCorrFctnNonIdDR& aCorrFctn) :
+ fNumOutP(0),
+ fNumOutN(0),
+ fNumSideP(0),
+ fNumSideN(0),
+ fNumLongP(0),
+ fNumLongN(0),
+ fDenOutP(0),
+ fDenOutN(0),
+ fDenSideP(0),
+ fDenSideN(0),
+ fDenLongP(0),
+ fDenLongN(0)
+{
+ // copy constructor
+ if (aCorrFctn.fNumOutP)
+ fNumOutP = new TH1D(*aCorrFctn.fNumOutP);
+ if (aCorrFctn.fNumOutN)
+ fNumOutN = new TH1D(*aCorrFctn.fNumOutN);
+ if (aCorrFctn.fNumSideP)
+ fNumSideP = new TH1D(*aCorrFctn.fNumSideP);
+ if (aCorrFctn.fNumSideN)
+ fNumSideN = new TH1D(*aCorrFctn.fNumSideN);
+ if (aCorrFctn.fNumLongP)
+ fNumLongP = new TH1D(*aCorrFctn.fNumLongP);
+ if (aCorrFctn.fNumLongN)
+ fNumLongN = new TH1D(*aCorrFctn.fNumLongN);
+
+ if (aCorrFctn.fDenOutP)
+ fDenOutP = new TH1D(*aCorrFctn.fDenOutP);
+ if (aCorrFctn.fDenOutN)
+ fDenOutN = new TH1D(*aCorrFctn.fDenOutN);
+ if (aCorrFctn.fDenSideP)
+ fDenSideP = new TH1D(*aCorrFctn.fDenSideP);
+ if (aCorrFctn.fDenSideN)
+ fDenSideN = new TH1D(*aCorrFctn.fDenSideN);
+ if (aCorrFctn.fDenLongP)
+ fDenLongP = new TH1D(*aCorrFctn.fDenLongP);
+ if (aCorrFctn.fDenLongN)
+ fDenLongN = new TH1D(*aCorrFctn.fDenLongN);
+}
+//____________________________
+AliFemtoCorrFctnNonIdDR::~AliFemtoCorrFctnNonIdDR(){
+ delete fNumOutP;
+ delete fNumOutN;
+ delete fNumSideP;
+ delete fNumSideN;
+ delete fNumLongP;
+ delete fNumLongN;
+ delete fDenOutP;
+ delete fDenOutN;
+ delete fDenSideP;
+ delete fDenSideN;
+ delete fDenLongP;
+ delete fDenLongN;
+}
+//_________________________
+AliFemtoCorrFctnNonIdDR& AliFemtoCorrFctnNonIdDR::operator=(const AliFemtoCorrFctnNonIdDR& aCorrFctn)
+{
+ // assignment operator
+ if (this == &aCorrFctn)
+ return *this;
+
+ if (aCorrFctn.fNumOutP)
+ fNumOutP = new TH1D(*aCorrFctn.fNumOutP);
+ if (aCorrFctn.fNumOutN)
+ fNumOutN = new TH1D(*aCorrFctn.fNumOutN);
+ if (aCorrFctn.fNumSideP)
+ fNumSideP = new TH1D(*aCorrFctn.fNumSideP);
+ if (aCorrFctn.fNumSideN)
+ fNumSideN = new TH1D(*aCorrFctn.fNumSideN);
+ if (aCorrFctn.fNumLongP)
+ fNumLongP = new TH1D(*aCorrFctn.fNumLongP);
+ if (aCorrFctn.fNumLongN)
+ fNumLongN = new TH1D(*aCorrFctn.fNumLongN);
+
+ if (aCorrFctn.fDenOutP)
+ fDenOutP = new TH1D(*aCorrFctn.fDenOutP);
+ if (aCorrFctn.fDenOutN)
+ fDenOutN = new TH1D(*aCorrFctn.fDenOutN);
+ if (aCorrFctn.fDenSideP)
+ fDenSideP = new TH1D(*aCorrFctn.fDenSideP);
+ if (aCorrFctn.fDenSideN)
+ fDenSideN = new TH1D(*aCorrFctn.fDenSideN);
+ if (aCorrFctn.fDenLongP)
+ fDenLongP = new TH1D(*aCorrFctn.fDenLongP);
+ if (aCorrFctn.fDenLongN)
+ fDenLongN = new TH1D(*aCorrFctn.fDenLongN);
+
+ return *this;
+}
+
+//_________________________
+void AliFemtoCorrFctnNonIdDR::Finish(){
+ // here is where we should normalize, fit, etc...
+ // we should NOT Draw() the histos (as I had done it below),
+ // since we want to insulate ourselves from root at this level
+ // of the code. Do it instead at root command line with browser.
+ // fNumerator->Draw();
+ //fDenominator->Draw();
+ //fRatio->Draw();
+ // fRatio->Divide(fNumerator,fDenominator,1.0,1.0);
+
+}
+
+//____________________________
+AliFemtoString AliFemtoCorrFctnNonIdDR::Report(){
+ // construct report
+ string stemp = "Non-identical particles Correlation Function Report:\n";
+ char ctemp[100];
+ sprintf(ctemp,"Number of entries in numerators:\t%E\n",fNumOutP->GetEntries()+fNumOutN->GetEntries());
+ stemp += ctemp;
+ sprintf(ctemp,"Number of entries in denominators:\t%E\n",fDenOutP->GetEntries()+fDenOutN->GetEntries());
+ stemp += ctemp;
+ // stemp += mCoulombWeight->Report();
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+//____________________________
+void AliFemtoCorrFctnNonIdDR::AddRealPair(AliFemtoPair* pair){
+ // add true pair
+ double tKStar = pair->KStar();
+ if (pair->KOut()>0.0)
+ fNumOutP->Fill(tKStar);
+ else
+ fNumOutN->Fill(tKStar);
+
+ if (pair->KSide()>0.0)
+ fNumSideP->Fill(tKStar);
+ else
+ fNumSideN->Fill(tKStar);
+
+ if (pair->KLong()>0.0)
+ fNumLongP->Fill(tKStar);
+ else
+ fNumLongN->Fill(tKStar);
+
+}
+//____________________________
+void AliFemtoCorrFctnNonIdDR::AddMixedPair(AliFemtoPair* pair){
+ // add mixed (background) pair
+ double tKStar = pair->KStar();
+ if (pair->KOut()>0.0)
+ fDenOutP->Fill(tKStar);
+ else
+ fDenOutN->Fill(tKStar);
+
+ if (pair->KSide()>0.0)
+ fDenSideP->Fill(tKStar);
+ else
+ fDenSideN->Fill(tKStar);
+
+ if (pair->KLong()>0.0)
+ fDenLongP->Fill(tKStar);
+ else
+ fDenLongN->Fill(tKStar);
+}
+//____________________________
+void AliFemtoCorrFctnNonIdDR::Write(){
+ fNumOutP->Write();
+ fNumOutN->Write();
+ fNumSideP->Write();
+ fNumSideN->Write();
+ fNumLongP->Write();
+ fNumLongN->Write();
+ fDenOutP->Write();
+ fDenOutN->Write();
+ fDenSideP->Write();
+ fDenSideN->Write();
+ fDenLongP->Write();
+ fDenLongN->Write();
+}
+
+TList* AliFemtoCorrFctnNonIdDR::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fNumOutP);
+ tOutputList->Add(fNumOutN);
+ tOutputList->Add(fNumSideP);
+ tOutputList->Add(fNumSideN);
+ tOutputList->Add(fNumLongP);
+ tOutputList->Add(fNumLongN);
+ tOutputList->Add(fDenOutP);
+ tOutputList->Add(fDenOutN);
+ tOutputList->Add(fDenSideP);
+ tOutputList->Add(fDenSideN);
+ tOutputList->Add(fDenLongP);
+ tOutputList->Add(fDenLongN);
+
+ return tOutputList;
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoCorrFctnNonIdDR - correlation function for non-identical particles //
+// uses k* as a function variable. Stores the correlation function separately //
+// for positive and negative signs of k* projections into out, side and long //
+// directions, enabling the calculations of double ratios //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#ifndef ALIFEMTOCORRFCTNNONIDDR_H
+#define ALIFEMTOCORRFCTNNONIDDR_H
+
+#include "TH1D.h"
+#include "AliFemtoCorrFctn.h"
+
+class AliFemtoCorrFctnNonIdDR : public AliFemtoCorrFctn {
+public:
+ AliFemtoCorrFctnNonIdDR(char* title, const int& nbins, const float& QinvLo, const float& QinvHi);
+ AliFemtoCorrFctnNonIdDR(const AliFemtoCorrFctnNonIdDR& aCorrFctn);
+ virtual ~AliFemtoCorrFctnNonIdDR();
+
+ AliFemtoCorrFctnNonIdDR& operator=(const AliFemtoCorrFctnNonIdDR& aCorrFctn);
+
+ virtual AliFemtoString Report();
+ virtual void AddRealPair(AliFemtoPair* aPair);
+ virtual void AddMixedPair(AliFemtoPair* aPair);
+
+ virtual void Finish();
+
+ virtual TList* GetOutputList();
+ void Write();
+
+private:
+ TH1D *fNumOutP; // Numerator for pair with positive k*out
+ TH1D *fNumOutN; // Numerator for pair with negative k*out
+ TH1D *fNumSideP; // Numerator for pair with positive k*side
+ TH1D *fNumSideN; // Numerator for pair with negative k*side
+ TH1D *fNumLongP; // Numerator for pair with positive k*long
+ TH1D *fNumLongN; // Numerator for pair with negative k*long
+
+ TH1D *fDenOutP; // Denominator for pair with positive k*out
+ TH1D *fDenOutN; // Denominator for pair with negative k*out
+ TH1D *fDenSideP; // Denominator for pair with positive k*side
+ TH1D *fDenSideN; // Denominator for pair with negative k*side
+ TH1D *fDenLongP; // Denominator for pair with positive k*long
+ TH1D *fDenLongN; // Denominator for pair with negative k*long
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoCorrFctnNonIdDR, 1)
+#endif
+};
+
+
+#endif
+
class AliFemtoPair; // Gael 12/04/02
#include "AliFemtoString.h"
#include "AliFemtoParticleCollection.h" // Gael 19/06/02
+#include <TList.h>
class AliFemtoCutMonitor{
}
virtual void EventBegin(const AliFemtoEvent* aEvent) { /* no-op */ }
virtual void EventEnd(const AliFemtoEvent* aEvent) { /* no-op */ }
+ virtual TList *GetOutputList() { TList *tOutputList = new TList(); return tOutputList; };
virtual void Fill(const AliFemtoEvent* aEvent) {
+
#ifdef STHBTDEBUG
cout << " *** no user defined Fill(const AliFemtoEvent*), take from base class" << endl;
#endif
// //
///////////////////////////////////////////////////////////////////////////
+#include <TList.h>
#include "AliFemtoCutMonitorHandler.h"
#include "AliFemtoTypes.h"
iter++;
return *iter;
}
+//_____________________________________________________________________________
+TList *AliFemtoCutMonitorHandler::GetOutputList()
+{
+ TList *tOutputList = new TList();
+
+ for (int ipass=0; ipass<fPassColl->size(); ipass++) {
+ TList *tLp = PassMonitor(ipass)->GetOutputList();
+
+ TIter nextLp(tLp);
+ while (TObject *obj = nextLp()) {
+ tOutputList->Add(obj);
+ }
+
+ delete tLp;
+ }
+ for (int ipass=0; ipass<fFailColl->size(); ipass++) {
+ TList *tLf = FailMonitor(ipass)->GetOutputList();
+
+ TIter nextLf(tLf);
+ while (TObject *obj = nextLf()) {
+ tOutputList->Add(obj);
+ }
+
+ delete tLf;
+ }
+
+ return tOutputList;
+}
void FillCutMonitor(const AliFemtoParticleCollection* partColl);// Gael 19/06/02
void FillCutMonitor(const AliFemtoEvent* event, const AliFemtoParticleCollection* partColl);// Gael 19/06/02
void Finish();
+
+ virtual TList *GetOutputList();
private:
bool fCollectionsEmpty; // Are the collections empty?
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoCutMonitorParticleYPt - the cut monitor for particles to study //
+// the difference between reconstructed and true momentum //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoCutMonitorParticleYPt.h"
+#include "AliFemtoModelHiddenInfo.h"
+#include <TH1D.h>
+#include <TH2D.h>
+#include <TList.h>
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt():
+ fYPt(0),
+ fMass(0.13957)
+{
+ // Default constructor
+ fYPt = new TH2D("YPt", "Rapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
+}
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const char *aName, float aMass):
+ fYPt(0),
+ fMass(aMass)
+{
+ // 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);
+}
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut):
+ fYPt(0),
+ fMass(0.13957)
+{
+ // copy constructor
+ if (fYPt) delete fYPt;
+ fYPt = new TH2D(*aCut.fYPt);
+ fMass = aCut.fMass;
+}
+
+AliFemtoCutMonitorParticleYPt::~AliFemtoCutMonitorParticleYPt()
+{
+ // Destructor
+ delete fYPt;
+}
+
+AliFemtoCutMonitorParticleYPt& AliFemtoCutMonitorParticleYPt::operator=(const AliFemtoCutMonitorParticleYPt& aCut)
+{
+ // assignment operator
+ if (this == &aCut)
+ return *this;
+
+ if (fYPt) delete fYPt;
+ fYPt = new TH2D(*aCut.fYPt);
+
+ return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorParticleYPt::Report(){
+ // Prepare report from the execution
+ string stemp = "*** AliFemtoCutMonitorParticleYPt report";
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+
+void AliFemtoCutMonitorParticleYPt::Fill(const AliFemtoTrack* aTrack)
+{
+ // Fill in the monitor histograms with the values from the current track
+ float tEnergy = ::sqrt(aTrack->P().mag2()+fMass*fMass);
+ float tRapidity = 0.5*::log((tEnergy+aTrack->P().z())/(tEnergy-aTrack->P().z()));
+ float tPt = ::sqrt((aTrack->P().x())*(aTrack->P().x())+(aTrack->P().y())*(aTrack->P().y()));
+ fYPt->Fill(tRapidity, tPt);
+}
+
+void AliFemtoCutMonitorParticleYPt::Write()
+{
+ // Write out the relevant histograms
+ fYPt->Write();
+}
+
+TList *AliFemtoCutMonitorParticleYPt::GetOutputList()
+{
+ TList *tOutputList = new TList();
+ tOutputList->Add(fYPt);
+
+ return tOutputList;
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoCutMonitorParticleYPt - the cut monitor for particles to study ///
+/// the difference between reconstructed and true momentum ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorParticleYPt_hh
+#define AliFemtoCutMonitorParticleYPt_hh
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; // Gael 12/04/02
+class TH1D;
+class TH2D;
+class TList;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorParticleYPt : public AliFemtoCutMonitor{
+
+public:
+ AliFemtoCutMonitorParticleYPt();
+ AliFemtoCutMonitorParticleYPt(const char *aName, float aMass);
+ AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut);
+ virtual ~AliFemtoCutMonitorParticleYPt();
+
+ AliFemtoCutMonitorParticleYPt& operator=(const AliFemtoCutMonitorParticleYPt& aCut);
+
+ virtual AliFemtoString Report();
+ virtual void Fill(const AliFemtoTrack* aTrack);
+ void Write();
+
+ virtual TList *GetOutputList();
+
+private:
+ TH2D *fYPt; // Rapidity vs. Pt monitor
+ float fMass; // Mass hypothesis
+};
+
+#endif
+///////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoDummyPairCut: a summy pair cut. Accepts all pairs //
+// //
+///////////////////////////////////////////////////////////////////////////
/***************************************************************************
*
* $Id$
/* no-op */
}
//__________________
-//AliFemtoDummyPairCut::~AliFemtoDummyPairCut(){
-// /* no-op */
-//}
+AliFemtoDummyPairCut::~AliFemtoDummyPairCut(){
+ /* no-op */
+}
//__________________
bool AliFemtoDummyPairCut::Pass(const AliFemtoPair* pair){
// Pass all pairs
+///////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoDummyPairCut: a summy pair cut. Accepts all pairs //
+// //
+///////////////////////////////////////////////////////////////////////////
/***************************************************************************
*
* $Id$
public:
AliFemtoDummyPairCut();
AliFemtoDummyPairCut(const AliFemtoDummyPairCut&);
- //~AliFemtoDummyPairCut();
+ virtual ~AliFemtoDummyPairCut();
virtual bool Pass(const AliFemtoPair*);
virtual AliFemtoString Report();
trackCopy->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
+ double pvrt[3];
+ fEvent->GetPrimaryVertex()->GetXYZ(pvrt);
+
+ double xtpc[3];
+ esdtrack->GetInnerXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCEntrancePoint(xtpc);
+
+ esdtrack->GetOuterXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCExitPoint(xtpc);
+
int indexes[3];
for (int ik=0; ik<3; ik++) {
indexes[ik] = esdtrack->GetKinkIndex(ik);
tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() == 0) {
+ if (v.mag() < 0.0001) {
// cout << "Found 0 momentum ???? " <<endl;
delete trackCopy;
continue;
trackCopy->SetTPCnclsF(esdtrack->GetTPCNclsF());
trackCopy->SetTPCsignalN((short)esdtrack->GetTPCsignalN()); //due to bug in aliesdtrack class
trackCopy->SetTPCsignalS(esdtrack->GetTPCsignalSigma());
-
-// // Fill cluster per padrow information
-// Int_t tTrackIndices[AliESDfriendTrack::kMaxTPCcluster];
-// Int_t tNClusters = esdtrack->GetTPCclusters(tTrackIndices);
-// for (int tNcl=0; tNcl<AliESDfriendTrack::kMaxTPCcluster; tNcl++) {
-// if (tTrackIndices[tNcl] > 0)
-// trackCopy->SetTPCcluster(tNcl, 1);
-// else
-// trackCopy->SetTPCcluster(tNcl, 0);
-// }
-
-// // Fill shared cluster information
-// list<Int_t>::iterator tClustIter;
-
-// for (int tNcl=0; tNcl<AliESDfriendTrack::kMaxTPCcluster; tNcl++) {
-// if (tTrackIndices[tNcl] > 0) {
-// tClustIter = find(fSharedList[tNcl]->begin(), fSharedList[tNcl]->end(), tTrackIndices[tNcl]);
-// if (tClustIter != fSharedList[tNcl]->end()) {
-// trackCopy->SetTPCshared(tNcl, 1);
-// cout << "Event next" << endl;
-// cout << "Track: " << i << endl;
-// cout << "Shared cluster: " << tNcl << " " << tTrackIndices[tNcl] << endl;
-// }
-// else {
-// trackCopy->SetTPCshared(tNcl, 0);
-// }
-// }
-// }
+ trackCopy->SetSigmaToVertex(GetSigmaToVertex(esdtrack));
trackCopy->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
+ double pvrt[3];
+ fEvent->GetPrimaryVertex()->GetXYZ(pvrt);
+
+ double xtpc[3];
+ esdtrack->GetInnerXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCEntrancePoint(xtpc);
+
+ esdtrack->GetOuterXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCExitPoint(xtpc);
+
+ int indexes[3];
+ for (int ik=0; ik<3; ik++) {
+ indexes[ik] = esdtrack->GetKinkIndex(ik);
+ }
+ trackCopy->SetKinkIndexes(indexes);
+ //decision if we want this track
+ //if we using diffrent labels we want that this label was use for first time
+ //if we use hidden info we want to have match between sim data and ESD
if (tGoodMomentum==true)
{
hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis
// fEventFriend = aFriend;
// }
+//____________________________________________________________________
+Float_t AliFemtoEventReaderESDChain::GetSigmaToVertex(const AliESDtrack* esdTrack)
+{
+ // Calculates the number of sigma to the vertex.
+
+ Float_t b[2];
+ Float_t bRes[2];
+ Float_t bCov[3];
+ esdTrack->GetImpactParameters(b,bCov);
+// if (bCov[0]<=0 || bCov[2]<=0) {
+// AliDebug(1, "Estimated b resolution lower or equal zero!");
+// bCov[0]=0; bCov[2]=0;
+// }
+ bRes[0] = TMath::Sqrt(bCov[0]);
+ bRes[1] = TMath::Sqrt(bCov[2]);
+
+ // -----------------------------------
+ // How to get to a n-sigma cut?
+ //
+ // The accumulated statistics from 0 to d is
+ //
+ // -> Erf(d/Sqrt(2)) for a 1-dim gauss (d = n_sigma)
+ // -> 1 - Exp(-d**2) for a 2-dim gauss (d*d = dx*dx + dy*dy != n_sigma)
+ //
+ // It means that for a 2-dim gauss: n_sigma(d) = Sqrt(2)*ErfInv(1 - Exp((-x**2)/2)
+ // Can this be expressed in a different way?
+
+ if (bRes[0] == 0 || bRes[1] ==0)
+ return -1;
+
+ Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
+
+ // stupid rounding problem screws up everything:
+ // if d is too big, TMath::Exp(...) gets 0, and TMath::ErfInverse(1) that should be infinite, gets 0 :(
+ if (TMath::Exp(-d * d / 2) < 1e-10)
+ return 1000;
+
+ d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
+ return d;
+}
/* list<Int_t> **fSharedList; //! Table (one list per padrow) of clusters which are shared */
/* list<Int_t> **fClusterPerPadrow; //! Table (one list per padrow) of clusters in each padrow */
+ Float_t GetSigmaToVertex(const AliESDtrack* esdTrack);
+
#ifdef __ROOT__
ClassDef(AliFemtoEventReaderESDChain, 1)
#endif
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoEventReaderESDChainKine - the reader class for the Alice ESD and //
+// the model Kinematics information tailored for the Task framework and the //
+// Reads in AliESDfriend to create shared hit/quality information //
+// Authors: Adam Kisiel kisiel@mps.ohio-state.edu //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoEventReaderESDChainKine.h"
+
+#include "TFile.h"
+#include "TTree.h"
+#include "AliESDEvent.h"
+#include "AliESDtrack.h"
+#include "AliESDVertex.h"
+
+#include "AliFmPhysicalHelixD.h"
+#include "AliFmThreeVectorF.h"
+
+#include "SystemOfUnits.h"
+
+#include "AliFemtoEvent.h"
+
+#include "AliAODParticle.h"
+#include "TParticle.h"
+#include "AliFemtoModelHiddenInfo.h"
+
+ClassImp(AliFemtoEventReaderESDChainKine)
+
+#if !(ST_NO_NAMESPACES)
+ using namespace units;
+#endif
+
+using namespace std;
+//____________________________
+AliFemtoEventReaderESDChainKine::AliFemtoEventReaderESDChainKine():
+ fFileName(" "),
+ fConstrained(true),
+ fNumberofEvent(0),
+ fCurEvent(0),
+ fCurFile(0),
+ fEvent(0x0),
+ fStack(0x0)
+{
+ //constructor with 0 parameters , look at default settings
+}
+
+//__________________
+AliFemtoEventReaderESDChainKine::AliFemtoEventReaderESDChainKine(const AliFemtoEventReaderESDChainKine& aReader):
+ fFileName(" "),
+ fConstrained(true),
+ fNumberofEvent(0),
+ fCurEvent(0),
+ fCurFile(0),
+ fEvent(0x0),
+ fStack(0x0)
+{
+ // Copy constructor
+ fConstrained = aReader.fConstrained;
+ fNumberofEvent = aReader.fNumberofEvent;
+ fCurEvent = aReader.fCurEvent;
+ fCurFile = aReader.fCurFile;
+ fEvent = new AliESDEvent();
+ fStack = aReader.fStack;
+}
+//__________________
+AliFemtoEventReaderESDChainKine::~AliFemtoEventReaderESDChainKine()
+{
+ //Destructor
+ delete fEvent;
+}
+
+//__________________
+AliFemtoEventReaderESDChainKine& AliFemtoEventReaderESDChainKine::operator=(const AliFemtoEventReaderESDChainKine& aReader)
+{
+ // Assignment operator
+ if (this == &aReader)
+ return *this;
+
+ fConstrained = aReader.fConstrained;
+ fNumberofEvent = aReader.fNumberofEvent;
+ fCurEvent = aReader.fCurEvent;
+ fCurFile = aReader.fCurFile;
+ if (fEvent) delete fEvent;
+ fEvent = new AliESDEvent();
+ fStack = aReader.fStack;
+
+ return *this;
+}
+//__________________
+// Simple report
+AliFemtoString AliFemtoEventReaderESDChainKine::Report()
+{
+ AliFemtoString temp = "\n This is the AliFemtoEventReaderESDChainKine\n";
+ return temp;
+}
+
+//__________________
+void AliFemtoEventReaderESDChainKine::SetConstrained(const bool constrained)
+{
+ // Select whether to read constrained or not constrained momentum
+ fConstrained=constrained;
+}
+//__________________
+bool AliFemtoEventReaderESDChainKine::GetConstrained() const
+{
+ // Check whether we read constrained or not constrained momentum
+ return fConstrained;
+}
+//__________________
+AliFemtoEvent* AliFemtoEventReaderESDChainKine::ReturnHbtEvent()
+{
+ // Get the event, read all the relevant information
+ // and fill the AliFemtoEvent class
+ // Returns a valid AliFemtoEvent
+ AliFemtoEvent *hbtEvent = 0;
+ string tFriendFileName;
+
+ // Get the friend information
+ cout<<"starting to read event "<<fCurEvent<<endl;
+ // fEvent->SetESDfriend(fEventFriend);
+
+ hbtEvent = new AliFemtoEvent;
+ //setting basic things
+ // hbtEvent->SetEventNumber(fEvent->GetEventNumber());
+ hbtEvent->SetRunNumber(fEvent->GetRunNumber());
+ //hbtEvent->SetNumberOfTracks(fEvent->GetNumberOfTracks());
+ hbtEvent->SetMagneticField(fEvent->GetMagneticField()*kilogauss);//to check if here is ok
+ hbtEvent->SetZDCN1Energy(fEvent->GetZDCN1Energy());
+ hbtEvent->SetZDCP1Energy(fEvent->GetZDCP1Energy());
+ hbtEvent->SetZDCN2Energy(fEvent->GetZDCN2Energy());
+ hbtEvent->SetZDCP2Energy(fEvent->GetZDCP2Energy());
+ hbtEvent->SetZDCEMEnergy(fEvent->GetZDCEMEnergy());
+ hbtEvent->SetZDCParticipants(fEvent->GetZDCParticipants());
+ hbtEvent->SetTriggerMask(fEvent->GetTriggerMask());
+ hbtEvent->SetTriggerCluster(fEvent->GetTriggerCluster());
+
+ //Vertex
+ double fV1[3];
+ fEvent->GetVertex()->GetXYZ(fV1);
+
+ AliFmThreeVectorF vertex(fV1[0],fV1[1],fV1[2]);
+ hbtEvent->SetPrimVertPos(vertex);
+
+ //starting to reading tracks
+ int nofTracks=0; //number of reconstructed tracks in event
+ nofTracks=fEvent->GetNumberOfTracks();
+ int realnofTracks=0;//number of track which we use ina analysis
+
+ for (int i=0;i<nofTracks;i++)
+ {
+ bool tGoodMomentum=true; //flaga to chcek if we can read momentum of this track
+
+ AliFemtoTrack* trackCopy = new AliFemtoTrack();
+ const AliESDtrack *esdtrack=fEvent->GetTrack(i);//getting next track
+ // const AliESDfriendTrack *tESDfriendTrack = esdtrack->GetFriendTrack();
+
+ trackCopy->SetCharge((short)esdtrack->GetSign());
+
+ //in aliroot we have AliPID
+ //0-electron 1-muon 2-pion 3-kaon 4-proton 5-photon 6-pi0 7-neutron 8-kaon0 9-eleCon
+ //we use only 5 first
+ double esdpid[5];
+ esdtrack->GetESDpid(esdpid);
+ trackCopy->SetPidProbElectron(esdpid[0]);
+ trackCopy->SetPidProbMuon(esdpid[1]);
+ trackCopy->SetPidProbPion(esdpid[2]);
+ trackCopy->SetPidProbKaon(esdpid[3]);
+ trackCopy->SetPidProbProton(esdpid[4]);
+
+ double pxyz[3];
+ if (fConstrained==true)
+ tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
+ else
+ tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum
+
+ AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
+ if (v.mag() < 0.0001) {
+ // cout << "Found 0 momentum ???? " <<endl;
+ delete trackCopy;
+ continue;
+ }
+ trackCopy->SetP(v);//setting momentum
+ trackCopy->SetPt(sqrt(pxyz[0]*pxyz[0]+pxyz[1]*pxyz[1]));
+ const AliFmThreeVectorD kP(pxyz[0],pxyz[1],pxyz[2]);
+ const AliFmThreeVectorD kOrigin(fV1[0],fV1[1],fV1[2]);
+ //setting helix I do not if it is ok
+ AliFmPhysicalHelixD helix(kP,kOrigin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge()));
+ trackCopy->SetHelix(helix);
+
+ trackCopy->SetTrackId(esdtrack->GetID());
+ trackCopy->SetFlags(esdtrack->GetStatus());
+ trackCopy->SetLabel(esdtrack->GetLabel());
+
+ //some stuff which could be useful
+ float impact[2];
+ float covimpact[3];
+ esdtrack->GetImpactParameters(impact,covimpact);
+ trackCopy->SetImpactD(impact[0]);
+ trackCopy->SetImpactZ(impact[1]);
+ trackCopy->SetCdd(covimpact[0]);
+ trackCopy->SetCdz(covimpact[1]);
+ trackCopy->SetCzz(covimpact[2]);
+ trackCopy->SetITSchi2(esdtrack->GetITSchi2());
+ trackCopy->SetITSncls(esdtrack->GetNcls(0));
+ trackCopy->SetTPCchi2(esdtrack->GetTPCchi2());
+ trackCopy->SetTPCncls(esdtrack->GetTPCNcls());
+ trackCopy->SetTPCnclsF(esdtrack->GetTPCNclsF());
+ trackCopy->SetTPCsignalN((short)esdtrack->GetTPCsignalN()); //due to bug in aliesdtrack class
+ trackCopy->SetTPCsignalS(esdtrack->GetTPCsignalSigma());
+
+
+ trackCopy->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
+ trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
+
+ double pvrt[3];
+ fEvent->GetPrimaryVertex()->GetXYZ(pvrt);
+
+ double xtpc[3];
+ esdtrack->GetInnerXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCEntrancePoint(xtpc);
+
+ esdtrack->GetOuterXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCExitPoint(xtpc);
+
+ int indexes[3];
+ for (int ik=0; ik<3; ik++) {
+ indexes[ik] = esdtrack->GetKinkIndex(ik);
+ }
+ trackCopy->SetKinkIndexes(indexes);
+
+ // Fill the hidden information with the simulated data
+ TParticle *tPart = fStack->Particle(TMath::Abs(esdtrack->GetLabel()));
+ AliAODParticle* tParticle= new AliAODParticle(*tPart,i);
+ AliFemtoModelHiddenInfo *tInfo = new AliFemtoModelHiddenInfo();
+ tInfo->SetPDGPid(tParticle->GetMostProbable());
+ tInfo->SetTrueMomentum(tParticle->Px(), tParticle->Py(), tParticle->Pz());
+ Double_t mass2 = (tParticle->E()*tParticle->E() -
+ tParticle->Px()*tParticle->Px() -
+ tParticle->Py()*tParticle->Py() -
+ tParticle->Pz()*tParticle->Pz());
+
+
+ if (mass2>0.0)
+ tInfo->SetMass(TMath::Sqrt(mass2));
+ else
+ tInfo->SetMass(0.0);
+ tInfo->SetEmissionPoint(tParticle->Vx(), tParticle->Vy(), tParticle->Vz(), tParticle->T());
+ trackCopy->SetHiddenInfo(tInfo);
+
+ //decision if we want this track
+ //if we using diffrent labels we want that this label was use for first time
+ //if we use hidden info we want to have match between sim data and ESD
+ if (tGoodMomentum==true)
+ {
+ hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis
+ realnofTracks++;//real number of tracks
+ // delete trackCopy;
+ }
+ else
+ {
+ delete trackCopy;
+ }
+
+ }
+
+ hbtEvent->SetNumberOfTracks(realnofTracks);//setting number of track which we read in event
+ fCurEvent++;
+ cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
+ return hbtEvent;
+}
+//___________________
+void AliFemtoEventReaderESDChainKine::SetESDSource(AliESDEvent *aESD)
+{
+ // The chain loads the ESD for us
+ // You must provide the address where it can be found
+ fEvent = aESD;
+}
+//___________________
+void AliFemtoEventReaderESDChainKine::SetStackSource(AliStack *aStack)
+{
+ // The chain loads the stack for us
+ // You must provide the address where it can be found
+ fStack = aStack;
+}
+
+
+
+
+
+
+
+
+
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoEventReaderESDChainKine - the reader class for the Alice ESD and //
+// the model Kinematics information tailored for the Task framework and the //
+// Reads in AliESDfriend to create shared hit/quality information //
+// Authors: Adam Kisiel kisiel@mps.ohio-state.edu //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#ifndef ALIFEMTOEVENTREADERESDCHAINKINE_H
+#define ALIFEMTOEVENTREADERESDCHAINKINE_H
+
+#include "AliFemtoEventReader.h"
+#include "AliFemtoEnumeration.h"
+
+#include <string>
+#include <vector>
+#include <TTree.h>
+#include <AliESDEvent.h>
+#include <AliESDfriend.h>
+#include <AliStack.h>
+#include <list>
+
+class AliFemtoEvent;
+
+class AliFemtoEventReaderESDChainKine : public AliFemtoEventReader
+{
+ public:
+ AliFemtoEventReaderESDChainKine();
+ AliFemtoEventReaderESDChainKine(const AliFemtoEventReaderESDChainKine& aReader);
+ ~AliFemtoEventReaderESDChainKine();
+
+ AliFemtoEventReaderESDChainKine& operator=(const AliFemtoEventReaderESDChainKine& aReader);
+
+ AliFemtoEvent* ReturnHbtEvent();
+ AliFemtoString Report();
+ void SetConstrained(const bool constrained);
+ bool GetConstrained() const;
+
+ void SetESDSource(AliESDEvent *aESD);
+ void SetStackSource(AliStack *aStack);
+
+ protected:
+
+ private:
+ string fFileName; // name of current ESD file
+ bool fConstrained; // flag to set which momentum from ESD file will be use
+ int fNumberofEvent; // number of Events in ESD file
+ int fCurEvent; // number of current event
+ unsigned int fCurFile; // number of current file
+ AliESDEvent* fEvent; // ESD event
+ AliStack *fStack; // Kinematics stack pointer
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoEventReaderESDChainKine, 1)
+#endif
+
+ };
+
+#endif
+
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoKTPairCut - a pair cut which selects pairs based on their //
+// transverse momentum kT //
+// //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoKTPairCut.cxx,v 1.1.2.2 2007/11/09 11:20:35 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+#include "AliFemtoKTPairCut.h"
+#include <string>
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoKTPairCut)
+#endif
+
+//__________________
+AliFemtoKTPairCut::AliFemtoKTPairCut():
+ AliFemtoPairCut(),
+ fKTMin(0),
+ fKTMax(1.0e6)
+{
+ fKTMin = 0;
+ fKTMax = 1.0e6;
+}
+//__________________
+AliFemtoKTPairCut::AliFemtoKTPairCut(double lo, double hi) :
+ AliFemtoPairCut(),
+ fKTMin(lo),
+ fKTMax(hi)
+{
+}
+//__________________
+AliFemtoKTPairCut::AliFemtoKTPairCut(const AliFemtoKTPairCut& c) :
+ AliFemtoPairCut(c),
+ fKTMin(0),
+ fKTMax(1.0e6)
+{
+ fKTMin = c.fKTMin;
+ fKTMax = c.fKTMax;
+}
+
+//__________________
+AliFemtoKTPairCut::~AliFemtoKTPairCut(){
+ /* no-op */
+}
+//__________________
+bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair){
+ bool temp = true;
+
+ if (pair->KT() < fKTMin)
+ temp = false;
+
+ if (pair->KT() > fKTMax)
+ temp = false;
+
+ return temp;
+}
+//__________________
+AliFemtoString AliFemtoKTPairCut::Report(){
+ // Prepare a report from the execution
+ string stemp = "AliFemtoKT Pair Cut \n"; char ctemp[100];
+ sprintf(ctemp,"Accept pair with kT in range %lf , %lf",fKTMin,fKTMax);
+ stemp += ctemp;
+ AliFemtoString returnThis = stemp;
+ return returnThis;}
+//__________________
+
+TList *AliFemtoKTPairCut::ListSettings()
+{
+ // return a list of settings in a writable form
+ TList *tListSetttings = new TList();
+ char buf[200];
+ snprintf(buf, 200, "AliFemtoKTPairCut.ktmax=%lf", fKTMax);
+ tListSetttings->AddLast(new TObjString(buf));
+ snprintf(buf, 200, "AliFemtoKTPairCut.ktmin=%lf", fKTMin);
+ tListSetttings->AddLast(new TObjString(buf));
+
+ return tListSetttings;
+}
+
+void AliFemtoKTPairCut::SetKTRange(double ktmin, double ktmax)
+{
+ fKTMin = ktmin;
+ fKTMax = ktmax;
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoKTPairCut - a pair cut which selects pairs based on their //
+// transverse momentum kT //
+// //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoKTPairCut.h,v 1.1.2.1 2007/10/19 13:28:14 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State University, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+
+#ifndef ALIFEMTOKTPAIRCUT_H
+#define ALIFEMTOKTPAIRCUT_H
+
+// do I need these lines ?
+//#ifndef StMaker_H
+//#include "StMaker.h"
+//#endif
+
+#include "AliFemtoPairCut.h"
+
+class AliFemtoKTPairCut : public AliFemtoPairCut{
+public:
+ AliFemtoKTPairCut();
+ AliFemtoKTPairCut(double lo, double hi);
+ AliFemtoKTPairCut(const AliFemtoKTPairCut& c);
+ virtual ~AliFemtoKTPairCut();
+
+ virtual bool Pass(const AliFemtoPair* pair);
+ virtual AliFemtoString Report();
+ virtual TList *ListSettings();
+ AliFemtoPairCut* Clone();
+ void SetKTRange(double ktmin, double ktmax);
+
+ protected:
+ Double_t fKTMin; // Minimum allowed pair transverse momentum
+ Double_t fKTMax; // Maximum allowed pair transverse momentum
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoKTPairCut, 0)
+#endif
+};
+
+inline AliFemtoPairCut* AliFemtoKTPairCut::Clone() { AliFemtoKTPairCut* c = new AliFemtoKTPairCut(*this); return c;}
+
+#endif
+///////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoKink: main class holding all the necessary information //
+// about a kink (before the identification) that is required during //
+// femtoscopic analysis. This class is filled with information from the //
+// input stream by the reader. A particle has a link back to the Kink //
+// it was created from, so we do not copy the information. //
+// //
+///////////////////////////////////////////////////////////////////////////
/***********************************************************************
*
* $Id$
fHitDistanceParentVertex(0),
fDecayAngle(0), fDecayAngleCM(0),
fDaughter(),
- mParent(),
- mPosition(0,0,0)
+ fParent(),
+ fPosition(0,0,0)
{/* no-op */}
// -----------------------------------------------------------------------
AliFemtoKink::AliFemtoKink(const AliFemtoKink& k):
fHitDistanceParentVertex(0),
fDecayAngle(0), fDecayAngleCM(0),
fDaughter(),
- mParent(),
- mPosition(0,0,0)
+ fParent(),
+ fPosition(0,0,0)
{ // copy constructor
fDcaParentDaughter = k.fDcaParentDaughter;
fDecayAngle = k.fDecayAngle;
fDecayAngleCM = k.fDecayAngleCM;
fDaughter = k.fDaughter;
- mParent = k.mParent;
- mPosition = k.mPosition;
+ fParent = k.fParent;
+ fPosition = k.fPosition;
}
// -----------------------------------------------------------------------
// Parent
StTrk = SKV.parent();
HbtTrk = new AliFemtoTrack(StTrk,PrimaryVertex); // generate NEW HbtTrack from StTrack
- mParent = *HbtTrk; // invoke copy ctr of AliFemtoTrack
+ fParent = *HbtTrk; // invoke copy ctr of AliFemtoTrack
delete HbtTrk; // get rid of the NEW HbtTrack - we are done with that
// finally, the kink position
- mPosition.setX(SKV.position().x());
- mPosition.setY(SKV.position().y());
- mPosition.setZ(SKV.position().z());
+ fPosition.setX(SKV.position().x());
+ fPosition.setY(SKV.position().y());
+ fPosition.setZ(SKV.position().z());
}
+///////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoKink: main class holding all the necessary information //
+// about a kink (before the identification) that is required during //
+// femtoscopic analysis. This class is filled with information from the //
+// input stream by the reader. A particle has a link back to the Kink //
+// it was created from, so we do not copy the information. //
+// //
+///////////////////////////////////////////////////////////////////////////
/***********************************************************************
*
* $Id$
*
*
***********************************************************************/
-#ifndef AliFemtoKink_hh
-#define AliFemtoKink_hh
+#ifndef ALIFEMTOKINK_H
+#define ALIFEMTOKINK_H
class StKinkVertex;
//#include "StEvent/StKinkVertex.h" // from StEvent
class AliFemtoKink {
public:
AliFemtoKink();
- AliFemtoKink( const AliFemtoKink&); // copy constructor
+ AliFemtoKink( const AliFemtoKink& k); // copy constructor
#ifndef __NO_STAR_DEPENDENCE_ALLOWED__
#ifdef __ROOT__
AliFemtoKink( const StKinkVertex&, AliFemtoThreeVector PrimaryVertex); // create a AliFemtoKink from a StKinkVertex
float fDecayAngle; // from StKinkVertex class directly
float fDecayAngleCM; // from StKinkVertex class directly
AliFemtoTrack fDaughter; // from StKinkVertex class directly
- AliFemtoTrack mParent; // from StVertex class (which StKinkVertex inherits from)
- AliFemtoThreeVector mPosition; // from StMeasuredPoint class (which StVertex inherits from)
+ AliFemtoTrack fParent; // from StVertex class (which StKinkVertex inherits from)
+ AliFemtoThreeVector fPosition; // from StMeasuredPoint class (which StVertex inherits from)
};
inline float AliFemtoKink::DecayAngle() const {return fDecayAngle;}
inline float AliFemtoKink::DecayAngleCM() const {return fDecayAngleCM;}
inline AliFemtoTrack AliFemtoKink::Daughter() const {return fDaughter;}
-inline AliFemtoTrack AliFemtoKink::Parent() const {return mParent;}
-inline AliFemtoThreeVector AliFemtoKink::Position() const {return mPosition;}
+inline AliFemtoTrack AliFemtoKink::Parent() const {return fParent;}
+inline AliFemtoThreeVector AliFemtoKink::Position() const {return fPosition;}
virtual void AddLikeSignNegativePair(const AliFemtoPair* aPair) = 0;
virtual AliFemtoLikeSignCorrFctn* Clone() { return 0;}
+ virtual TList* GetOutputList() = 0;
// the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
};
AliFemtoEventReader* EventReader();
void SetEventReader(AliFemtoEventReader* r);
-
int Init();
int ProcessEvent(); // a "0" return value means success - otherwise quit
void Finish();
return tCopy;
}
+//_________________________
+TList* AliFemtoModelCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fNumeratorTrue);
+ tOutputList->Add(fNumeratorFake);
+ tOutputList->Add(fDenominator);
+ return tOutputList;
+}
virtual void EventEnd(const AliFemtoEvent* aEvent);
virtual void Finish();
+ virtual TList* GetOutputList();
virtual void Write();
virtual AliFemtoModelCorrFctn* Clone();
void SetAnalysis(AliFemtoAnalysis* aAnalysis);
protected:
- AliFemtoModelManager *fManager; // Link back to the managet to get the weights
+ AliFemtoModelManager *fManager; // Link back to the manager to get the weights
TH1D *fNumeratorTrue; // Numerator made with pairs from the same event
TH1D *fNumeratorFake; // Numerator made with pairs from different events (mixed pairs)
void AliFemtoModelHiddenInfo::SetEmissionPoint(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT)
{
// set position from components
- fEmissionPoint->setX(aRx);
- fEmissionPoint->setY(aRy);
- fEmissionPoint->setZ(aRz);
- fEmissionPoint->setT(aT);
+ if (fEmissionPoint) {
+ fEmissionPoint->setX(aRx);
+ fEmissionPoint->setY(aRy);
+ fEmissionPoint->setZ(aRz);
+ fEmissionPoint->setT(aT);
+ }
+ else {
+ fEmissionPoint = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
+ }
}
//_____________________________________________
AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::GetParticleHiddenInfo() const
#include "AliFemtoModelWeightGenerator.h"
#include "AliFemtoModelHiddenInfo.h"
+const Int_t AliFemtoModelWeightGenerator::fgkPairTypeNone = 0;
const Int_t AliFemtoModelWeightGenerator::fgkPionPlusPionPlus = 1;
const Int_t AliFemtoModelWeightGenerator::fgkPionPlusPionMinus = 2;
const Int_t AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus = 3;
//_____________________________________________
void AliFemtoModelWeightGenerator::SetPairTypeFromPair(AliFemtoPair *aPair)
+{
+ fPairType = GetPairTypeFromPair(aPair);
+}
+//_____________________________________________
+Int_t AliFemtoModelWeightGenerator::GetPairTypeFromPair(AliFemtoPair *aPair)
{
// Get the type of pair from PID of particles in the pair
AliFemtoModelHiddenInfo *inf1 = ( AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo();
AliFemtoModelHiddenInfo *inf2 = ( AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo();
+ Int_t tPairType = fgkPairTypeNone;
+
const Int_t ktPid1 = inf1->GetPDGPid();
const Int_t ktPid2 = inf2->GetPDGPid();
if (((ktPid1 == 211) && (ktPid2 == 211)) ||
((ktPid1 == -211) && (ktPid2 == -211)))
- fPairType = fgkPionPlusPionPlus;
+ tPairType = fgkPionPlusPionPlus;
else if (((ktPid1 == -211) && (ktPid2 == 211)) ||
((ktPid1 == 211) && (ktPid2 == -211)))
- fPairType = fgkPionPlusPionMinus;
+ tPairType = fgkPionPlusPionMinus;
else if (((ktPid1 == 321) && (ktPid2 == 321)) ||
((ktPid1 == -321) && (ktPid2 == -321)))
- fPairType = fgkKaonPlusKaonPlus;
+ tPairType = fgkKaonPlusKaonPlus;
else if (((ktPid1 == -321) && (ktPid2 == 321)) ||
((ktPid1 == 321) && (ktPid2 == -321)))
- fPairType = fgkKaonPlusKaonMinus;
+ tPairType = fgkKaonPlusKaonMinus;
else if (((ktPid1 == 2212) && (ktPid2 == 2212)) ||
((ktPid1 == -2212) && (ktPid2 == -2212)))
- fPairType = fgkProtonProton;
+ tPairType = fgkProtonProton;
else if (((ktPid1 == -2212) && (ktPid2 == 2212)) ||
((ktPid1 == 2212) && (ktPid2 == -2212)))
- fPairType = fgkProtonAntiproton;
+ tPairType = fgkProtonAntiproton;
else if (((ktPid1 == 211) && (ktPid2 == 321)) ||
((ktPid1 == -211) && (ktPid2 == -321)))
- fPairType = fgkPionPlusKaonPlus;
+ tPairType = fgkPionPlusKaonPlus;
else if (((ktPid1 == -211) && (ktPid2 == 321)) ||
((ktPid1 == 211) && (ktPid2 == -321)))
- fPairType = fgkPionPlusKaonMinus;
+ tPairType = fgkPionPlusKaonMinus;
else if (((ktPid1 == 211) && (ktPid2 == 2212)) ||
((ktPid1 == -211) && (ktPid2 == -2212)))
- fPairType = fgkPionPlusProton;
+ tPairType = fgkPionPlusProton;
else if (((ktPid1 == -211) && (ktPid2 == 2212)) ||
((ktPid1 == 211) && (ktPid2 == -2212)))
- fPairType = fgkPionPlusAntiproton;
+ tPairType = fgkPionPlusAntiproton;
else if (((ktPid1 == 321) && (ktPid2 == 2212)) ||
((ktPid1 == -321) && (ktPid2 == -2212)))
- fPairType = fgkKaonPlusProton;
+ tPairType = fgkKaonPlusProton;
else if (((ktPid1 == -321) && (ktPid2 == 2212)) ||
((ktPid1 == 321) && (ktPid2 == -2212)))
- fPairType = fgkKaonPlusAntiproton;
+ tPairType = fgkKaonPlusAntiproton;
+
+ return tPairType;
}
//_____________________________________________
virtual void SetPairType(Int_t aPairType);
virtual void SetPairTypeFromPair(AliFemtoPair *aPair);
virtual Int_t GetPairType() const;
+ virtual Int_t GetPairTypeFromPair(AliFemtoPair *aPair);
virtual Double_t GetKStar() const;
virtual Double_t GetKStarOut() const;
static Int_t PionPlusAntiproton();
static Int_t KaonPlusProton();
static Int_t KaonPlusAntiproton();
+ static Int_t PairTypeNone();
protected:
+ static const Int_t fgkPairTypeNone; // no pair type set - read from model
static const Int_t fgkPionPlusPionPlus; // identical pion pair
static const Int_t fgkPionPlusPionMinus; // non-identical pion pair
static const Int_t fgkKaonPlusKaonPlus; // identical kaon pair
inline Double_t AliFemtoModelWeightGenerator::GetRStarSide() const { return fRStarSide; }
inline Double_t AliFemtoModelWeightGenerator::GetRStarLong() const { return fRStarLong; }
+inline Int_t AliFemtoModelWeightGenerator::PairTypeNone() { return fgkPairTypeNone; }
inline Int_t AliFemtoModelWeightGenerator::PionPlusPionPlus() { return fgkPionPlusPionPlus; }
inline Int_t AliFemtoModelWeightGenerator::PionPlusPionMinus() { return fgkPionPlusPionMinus; }
inline Int_t AliFemtoModelWeightGenerator::KaonPlusKaonPlus() { return fgkKaonPlusKaonPlus; }
fKStar = ::sqrt(fKStarOut*fKStarOut + fKStarSide*fKStarSide + fKStarLong*fKStarLong);
// Double_t tRSt = fRStar/0.197327;
- if ((fPairType == AliFemtoModelWeightGenerator::fgkPionPlusPionPlus) || (fPairType == AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus))
- return 1.0 + cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
- else if (fPairType == AliFemtoModelWeightGenerator::fgkProtonProton)
- return 1.0 - 0.5 * cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
- else
- return 1.0;
+ if (fPairType != fgkPairTypeNone) {
+ if ((fPairType == PionPlusPionPlus()) || (fPairType == KaonPlusKaonPlus()))
+ return 1.0 + cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
+ else if (fPairType == ProtonProton())
+ return 1.0 - 0.5 * cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
+ else
+ return 1.0;
+ }
+ else {
+ Int_t tPairType = GetPairTypeFromPair(aPair);
+ if ((tPairType == PionPlusPionPlus()) || (tPairType == KaonPlusKaonPlus()))
+ return 1.0 + cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
+ else if (tPairType == ProtonProton())
+ return 1.0 - 0.5 * cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
+ else
+ return 1.0;
+
+ }
}
//________________________
double AliFemtoPair::NominalTpcExitSeparation() const {
// separation at exit from STAR TPC
- AliFemtoThreeVector diff = fTrack1->NominalTpcExitPoint() - fTrack2->NominalTpcExitPoint();
+ AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->Track()->NominalTpcExitPoint();
return (diff.mag());
}
double AliFemtoPair::NominalTpcEntranceSeparation() const {
// separation at entrance to STAR TPC
- AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->NominalTpcEntrancePoint();
+ AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->Track()->NominalTpcEntrancePoint();
return (diff.mag());
}
-double AliFemtoPair::NominalTpcAverageSeparation() const {
- // average separation in STAR TPC
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt = 0;
- if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
- while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
- ipt<11
- ){
- // for (int ipt=0; ipt<11; ipt++){
- diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1.);
- return (tAveSep);}
- else return -1;
-}
+// double AliFemtoPair::NominalTpcAverageSeparation() const {
+// // average separation in STAR TPC
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt = 0;
+// if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
+// while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
+// ipt<11
+// ){
+// // for (int ipt=0; ipt<11; ipt++){
+// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1.);
+// return (tAveSep);}
+// else return -1;
+// }
double AliFemtoPair::OpeningAngle() const {
// opening angle
-double AliFemtoPair::DcaInsideTpc() const{
- // dcs inside the STAR TPC
- double tMinDist=NominalTpcEntranceSeparation();
- double tExit = NominalTpcExitSeparation();
- tMinDist = (tExit>tMinDist) ? tMinDist : tExit;
- double tInsideDist;
- //tMinDist = 999.;
-
- double rMin = 60.;
- double rMax = 190.;
- const AliFmPhysicalHelixD& tHelix1 = fTrack1->Helix();
- const AliFmPhysicalHelixD& tHelix2 = fTrack2->Helix();
- // --- One is a line and other one a helix
- //if (tHelix1.mSingularity != tHelix2.mSingularity) return -999.;
- // --- 2 lines : don't care right now
- //if (tHelix1.mSingularity) return -999.;
- // --- 2 helix
- double dx = tHelix2.XCenter() - tHelix1.XCenter();
- double dy = tHelix2.YCenter() - tHelix1.YCenter();
- double dd = ::sqrt(dx*dx + dy*dy);
- double r1 = 1/tHelix1.Curvature();
- double r2 = 1/tHelix2.Curvature();
- double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd);
+// double AliFemtoPair::DcaInsideTpc() const{
+// // dcs inside the STAR TPC
+// double tMinDist=NominalTpcEntranceSeparation();
+// double tExit = NominalTpcExitSeparation();
+// tMinDist = (tExit>tMinDist) ? tMinDist : tExit;
+// double tInsideDist;
+// //tMinDist = 999.;
+
+// double rMin = 60.;
+// double rMax = 190.;
+// const AliFmPhysicalHelixD& tHelix1 = fTrack1->Helix();
+// const AliFmPhysicalHelixD& tHelix2 = fTrack2->Helix();
+// // --- One is a line and other one a helix
+// //if (tHelix1.mSingularity != tHelix2.mSingularity) return -999.;
+// // --- 2 lines : don't care right now
+// //if (tHelix1.mSingularity) return -999.;
+// // --- 2 helix
+// double dx = tHelix2.XCenter() - tHelix1.XCenter();
+// double dy = tHelix2.YCenter() - tHelix1.YCenter();
+// double dd = ::sqrt(dx*dx + dy*dy);
+// double r1 = 1/tHelix1.Curvature();
+// double r2 = 1/tHelix2.Curvature();
+// double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd);
- double x, y, r;
- double s;
- if (fabs(cosAlpha) < 1) { // two solutions
- double sinAlpha = sin(acos(cosAlpha));
- x = tHelix1.XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd;
- y = tHelix1.YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd;
- r = ::sqrt(x*x+y*y);
- if( r > rMin && r < rMax &&
- fabs(atan2(y,x)-fTrack1->NominalTpcEntrancePoint().phi())< 0.5
- ){ // first solution inside
- s = tHelix1.PathLength(x, y);
- tInsideDist=tHelix2.Distance(tHelix1.At(s));
- if(tInsideDist<tMinDist) tMinDist = tInsideDist;
- }
- else{
- x = tHelix1.XCenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd;
- y = tHelix1.YCenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd;
- r = ::sqrt(x*x+y*y);
- if( r > rMin && r < rMax &&
- fabs(atan2(y,x)-fTrack1->NominalTpcEntrancePoint().phi())< 0.5
- ) { // second solution inside
- s = tHelix1.PathLength(x, y);
- tInsideDist=tHelix2.Distance(tHelix1.At(s));
- if(tInsideDist<tMinDist) tMinDist = tInsideDist;
- }
- }
- }
- return tMinDist;
-}
-
-void AliFemtoPair::CalcMergingPar() const{
- // Calculate merging factor for the pair in STAR TPC
- fMergingParNotCalculated=0;
-
- double tDu, tDz;
- int tN = 0;
- fFracOfMergedRow = 0.;
- fWeightedAvSep =0.;
- double tDist;
- double tDistMax = 200.;
- for(int ti=0 ; ti<45 ; ti++){
- if(fTrack1->fSect[ti]==fTrack2->fSect[ti] && fTrack1->fSect[ti]!=-1){
- tDu = fabs(fTrack1->fU[ti]-fTrack2->fU[ti]);
- tDz = fabs(fTrack1->fZ[ti]-fTrack2->fZ[ti]);
- tN++;
- if(ti<13){
- fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
- tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
- tDz*tDz/fgMaxDzInner/fgMaxDzInner);
- //fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
- }
- else{
- fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
- tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
- tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
- //fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
- }
- if(tDist<tDistMax){
- fClosestRowAtDCA = ti+1;
- tDistMax = tDist;
- }
- fWeightedAvSep += tDist;
- }
- }
- if(tN>0){
- fWeightedAvSep /= tN;
- fFracOfMergedRow /= tN;
- }
- else{
- fClosestRowAtDCA = -1;
- fFracOfMergedRow = -1.;
- fWeightedAvSep = -1.;
- }
-}
-double AliFemtoPair::TpcExitSeparationTrackV0Pos() const {
-//________________V0 daughters exit/entrance/average separation calc.
-//_______1st part is a track 2nd is a V0 considering Pos daughter
+// double x, y, r;
+// double s;
+// if (fabs(cosAlpha) < 1) { // two solutions
+// double sinAlpha = sin(acos(cosAlpha));
+// x = tHelix1.XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd;
+// y = tHelix1.YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd;
+// r = ::sqrt(x*x+y*y);
+// if( r > rMin && r < rMax &&
+// fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
+// ){ // first solution inside
+// s = tHelix1.PathLength(x, y);
+// tInsideDist=tHelix2.Distance(tHelix1.At(s));
+// if(tInsideDist<tMinDist) tMinDist = tInsideDist;
+// }
+// else{
+// x = tHelix1.XCenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd;
+// y = tHelix1.YCenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd;
+// r = ::sqrt(x*x+y*y);
+// if( r > rMin && r < rMax &&
+// fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
+// ) { // second solution inside
+// s = tHelix1.PathLength(x, y);
+// tInsideDist=tHelix2.Distance(tHelix1.At(s));
+// if(tInsideDist<tMinDist) tMinDist = tInsideDist;
+// }
+// }
+// }
+// return tMinDist;
+// }
+
+// void AliFemtoPair::CalcMergingPar() const{
+// // Calculate merging factor for the pair in STAR TPC
+// fMergingParNotCalculated=0;
+
+// double tDu, tDz;
+// int tN = 0;
+// fFracOfMergedRow = 0.;
+// fWeightedAvSep =0.;
+// double tDist;
+// double tDistMax = 200.;
+// for(int ti=0 ; ti<45 ; ti++){
+// if(fTrack1->fSect[ti]==fTrack2->fSect[ti] && fTrack1->fSect[ti]!=-1){
+// tDu = fabs(fTrack1->fU[ti]-fTrack2->fU[ti]);
+// tDz = fabs(fTrack1->fZ[ti]-fTrack2->fZ[ti]);
+// tN++;
+// if(ti<13){
+// fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
+// tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
+// tDz*tDz/fgMaxDzInner/fgMaxDzInner);
+// //fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
+// }
+// else{
+// fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
+// tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
+// tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
+// //fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
+// }
+// if(tDist<tDistMax){
+// fClosestRowAtDCA = ti+1;
+// tDistMax = tDist;
+// }
+// fWeightedAvSep += tDist;
+// }
+// }
+// if(tN>0){
+// fWeightedAvSep /= tN;
+// fFracOfMergedRow /= tN;
+// }
+// else{
+// fClosestRowAtDCA = -1;
+// fFracOfMergedRow = -1.;
+// fWeightedAvSep = -1.;
+// }
+// }
+// double AliFemtoPair::TpcExitSeparationTrackV0Pos() const {
+// //________________V0 daughters exit/entrance/average separation calc.
+// //_______1st part is a track 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff = fTrack1->NominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const {
-//________________V0 daughters exit/entrance/average separation calc.
-//_______1st part is a track 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const {
-//________________V0 daughters exit/entrance/average separation calc.
-//_______1st part is a track 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt = 0;
- if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
- while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
- (ipt<11)
- ){
- diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1.);
- return (tAveSep);}
- else return -1;
-}
-double AliFemtoPair::TpcExitSeparationTrackV0Neg() const {
-//_______1st part is a track 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const {
-//_______1st part is a track 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const {
-//_______1st part is a track 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt = 0;
- if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
- while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
- (ipt<11)
- ){
- diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1.);
- return (tAveSep);}
- else return -1;
-}
-
-double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
- return (diff.mag());
-}
-double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt=0;
- if (fTrack1->fNominalPosSample && (fTrack2->fNominalPosSample)){
- while ((fabs(fTrack1->fNominalPosSample[ipt].x())<9999.) &&
- (fabs(fTrack1->fNominalPosSample[ipt].y())<9999.) &&
- (fabs(fTrack1->fNominalPosSample[ipt].z())<9999.) &&
- (fabs(fTrack2->fNominalPosSample[ipt].x())<9999.) &&
- (fabs(fTrack2->fNominalPosSample[ipt].y())<9999.) &&
- (fabs(fTrack2->fNominalPosSample[ipt].z())<9999.) &&
- (ipt<11)
- ){
- diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1);
- return (tAveSep);}
- else return -1;
-}
-
-double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
- return (diff.mag());
-}
-double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const {
-//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt = 0;
- if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
- while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
- (ipt<11)
- ){
- diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1.);
- return (tAveSep);}
- else return -1;
-}
-double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
-// this is to check the upper case
- AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
-// this is to check the upper case
- AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
- return (diff.mag());
-}
-double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
-// this is to check the upper case
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt = 0;
- if ( fTrack1->fTpcV0NegPosSample && fTrack2->fNominalPosSample){
- while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
- (ipt<11)
- ){
- diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1);
- return (tAveSep);}
- else return -1;
-}
-double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint();
- return (diff.mag());
-}
-
-double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
- return (diff.mag());
-}
-double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const {
-//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
- AliFemtoThreeVector diff;
- double tAveSep = 0.0;
- int ipt=0;
- if (fTrack1->fTpcV0NegPosSample && fTrack2->fTpcV0NegPosSample){
- while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
- fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
- fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
- fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
- (ipt<11)
- ){
- diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
- ipt++;
- tAveSep += diff.mag();
- }
- tAveSep = tAveSep/(ipt+1);
- return (tAveSep);}
- else return -1;
-}
-
-void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn,
- float* tmpZ1,float* tmpU1,
- float* tmpZ2,float* tmpU2,
- int *tmpSect1,int *tmpSect2,
- double* tmpFracOfMergedRow,
- double* tmpClosestRowAtDCA
- ) const{
-// calculate heper variables for merging
- tmpMergingParNotCalculatedFctn=0;
- double tDu, tDz;
- int tN = 0;
- *tmpFracOfMergedRow = 0.;
- *tmpClosestRowAtDCA = 0.;
- double tDist;
- double tDistMax = 100000000.;
- for(int ti=0 ; ti<45 ; ti++){
- if(tmpSect1[ti]==tmpSect2[ti] && tmpSect1[ti]!=-1){
- tDu = fabs(tmpU1[ti]-tmpU2[ti]);
- tDz = fabs(tmpZ1[ti]-tmpZ2[ti]);
- tN++;
- if(ti<13){
- *tmpFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
- tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
- tDz*tDz/fgMaxDzInner/fgMaxDzInner);
- }
- else{
- *tmpFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
- tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
- tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
- }
- if(tDist<tDistMax){
- fClosestRowAtDCA = ti+1;
- tDistMax = tDist;
- }
- //fWeightedAvSep += tDist; // now, wrong but not used
- }
- }
- if(tN>0){
- //fWeightedAvSep /= tN;
- *tmpFracOfMergedRow /= tN;
- }
- else{
- *tmpClosestRowAtDCA = -1;
- *tmpFracOfMergedRow = -1.;
- //fWeightedAvSep = -1.;
- }
-}
+// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const {
+// //________________V0 daughters exit/entrance/average separation calc.
+// //_______1st part is a track 2nd is a V0 considering Pos daughter
+// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const {
+// //________________V0 daughters exit/entrance/average separation calc.
+// //_______1st part is a track 2nd is a V0 considering Pos daughter
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt = 0;
+// if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
+// while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1.);
+// return (tAveSep);}
+// else return -1;
+// }
+// double AliFemtoPair::TpcExitSeparationTrackV0Neg() const {
+// //_______1st part is a track 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const {
+// //_______1st part is a track 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const {
+// //_______1st part is a track 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt = 0;
+// if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
+// while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1.);
+// return (tAveSep);}
+// else return -1;
+// }
+
+// double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
+// return (diff.mag());
+// }
+// double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt=0;
+// if (fTrack1->fNominalPosSample && (fTrack2->fNominalPosSample)){
+// while ((fabs(fTrack1->fNominalPosSample[ipt].x())<9999.) &&
+// (fabs(fTrack1->fNominalPosSample[ipt].y())<9999.) &&
+// (fabs(fTrack1->fNominalPosSample[ipt].z())<9999.) &&
+// (fabs(fTrack2->fNominalPosSample[ipt].x())<9999.) &&
+// (fabs(fTrack2->fNominalPosSample[ipt].y())<9999.) &&
+// (fabs(fTrack2->fNominalPosSample[ipt].z())<9999.) &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1);
+// return (tAveSep);}
+// else return -1;
+// }
+
+// double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
+// return (diff.mag());
+// }
+// double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const {
+// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt = 0;
+// if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
+// while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1.);
+// return (tAveSep);}
+// else return -1;
+// }
+// double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
+// // this is to check the upper case
+// AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
+// // this is to check the upper case
+// AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
+// return (diff.mag());
+// }
+// double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
+// // this is to check the upper case
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt = 0;
+// if ( fTrack1->fTpcV0NegPosSample && fTrack2->fNominalPosSample){
+// while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1);
+// return (tAveSep);}
+// else return -1;
+// }
+// double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint();
+// return (diff.mag());
+// }
+
+// double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
+// return (diff.mag());
+// }
+// double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const {
+// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
+// AliFemtoThreeVector diff;
+// double tAveSep = 0.0;
+// int ipt=0;
+// if (fTrack1->fTpcV0NegPosSample && fTrack2->fTpcV0NegPosSample){
+// while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
+// fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
+// fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
+// fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
+// (ipt<11)
+// ){
+// diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
+// ipt++;
+// tAveSep += diff.mag();
+// }
+// tAveSep = tAveSep/(ipt+1);
+// return (tAveSep);}
+// else return -1;
+// }
+
+// void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn,
+// float* tmpZ1,float* tmpU1,
+// float* tmpZ2,float* tmpU2,
+// int *tmpSect1,int *tmpSect2,
+// double* tmpFracOfMergedRow,
+// double* tmpClosestRowAtDCA
+// ) const{
+// // calculate heper variables for merging
+// tmpMergingParNotCalculatedFctn=0;
+// double tDu, tDz;
+// int tN = 0;
+// *tmpFracOfMergedRow = 0.;
+// *tmpClosestRowAtDCA = 0.;
+// double tDist;
+// double tDistMax = 100000000.;
+// for(int ti=0 ; ti<45 ; ti++){
+// if(tmpSect1[ti]==tmpSect2[ti] && tmpSect1[ti]!=-1){
+// tDu = fabs(tmpU1[ti]-tmpU2[ti]);
+// tDz = fabs(tmpZ1[ti]-tmpZ2[ti]);
+// tN++;
+// if(ti<13){
+// *tmpFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
+// tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
+// tDz*tDz/fgMaxDzInner/fgMaxDzInner);
+// }
+// else{
+// *tmpFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
+// tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
+// tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
+// }
+// if(tDist<tDistMax){
+// fClosestRowAtDCA = ti+1;
+// tDistMax = tDist;
+// }
+// //fWeightedAvSep += tDist; // now, wrong but not used
+// }
+// }
+// if(tN>0){
+// //fWeightedAvSep /= tN;
+// *tmpFracOfMergedRow /= tN;
+// }
+// else{
+// *tmpClosestRowAtDCA = -1;
+// *tmpFracOfMergedRow = -1.;
+// //fWeightedAvSep = -1.;
+// }
+// }
// assumption is important for the Event Mixing-- it is not a mistake. - MALisa
double NominalTpcExitSeparation() const;
double NominalTpcEntranceSeparation() const;
- double NominalTpcAverageSeparation() const;
+ // double NominalTpcAverageSeparation() const;
// adapted calculation of Entrance/Exit/Average Tpc separation to V0 daughters
- double TpcExitSeparationTrackV0Pos() const;
- double TpcEntranceSeparationTrackV0Pos() const;
- double TpcAverageSeparationTrackV0Pos() const;
+/* double TpcExitSeparationTrackV0Pos() const; */
+/* double TpcEntranceSeparationTrackV0Pos() const; */
+/* double TpcAverageSeparationTrackV0Pos() const; */
- double TpcExitSeparationTrackV0Neg() const;
- double TpcEntranceSeparationTrackV0Neg() const;
- double TpcAverageSeparationTrackV0Neg() const;
+/* double TpcExitSeparationTrackV0Neg() const; */
+/* double TpcEntranceSeparationTrackV0Neg() const; */
+/* double TpcAverageSeparationTrackV0Neg() const; */
- double TpcExitSeparationV0PosV0Pos() const;
- double TpcEntranceSeparationV0PosV0Pos() const;
- double TpcAverageSeparationV0PosV0Pos() const;
+/* double TpcExitSeparationV0PosV0Pos() const; */
+/* double TpcEntranceSeparationV0PosV0Pos() const; */
+/* double TpcAverageSeparationV0PosV0Pos() const; */
- double TpcExitSeparationV0PosV0Neg() const;
- double TpcEntranceSeparationV0PosV0Neg() const;
- double TpcAverageSeparationV0PosV0Neg() const;
+/* double TpcExitSeparationV0PosV0Neg() const; */
+/* double TpcEntranceSeparationV0PosV0Neg() const; */
+/* double TpcAverageSeparationV0PosV0Neg() const; */
- double TpcExitSeparationV0NegV0Pos() const;
- double TpcEntranceSeparationV0NegV0Pos() const;
- double TpcAverageSeparationV0NegV0Pos() const;
+/* double TpcExitSeparationV0NegV0Pos() const; */
+/* double TpcEntranceSeparationV0NegV0Pos() const; */
+/* double TpcAverageSeparationV0NegV0Pos() const; */
- double TpcExitSeparationV0NegV0Neg() const;
- double TpcEntranceSeparationV0NegV0Neg() const;
- double TpcAverageSeparationV0NegV0Neg() const;
+/* double TpcExitSeparationV0NegV0Neg() const; */
+/* double TpcEntranceSeparationV0NegV0Neg() const; */
+/* double TpcAverageSeparationV0NegV0Neg() const; */
double PInv() const;
double KStar() const;
double GetClosestRowAtDCA() const;
double GetWeightedAvSep() const;
// >>>
- double GetFracOfMergedRowTrkV0Pos() const;
- double GetClosestRowAtDCATrkV0Pos() const;
+/* double GetFracOfMergedRowTrkV0Pos() const; */
+/* double GetClosestRowAtDCATrkV0Pos() const; */
- double GetFracOfMergedRowTrkV0Neg() const;
- double GetClosestRowAtDCATrkV0Neg() const;
+/* double GetFracOfMergedRowTrkV0Neg() const; */
+/* double GetClosestRowAtDCATrkV0Neg() const; */
- double GetFracOfMergedRowV0PosV0Neg() const;
- double GetFracOfMergedRowV0NegV0Pos() const;
- double GetFracOfMergedRowV0PosV0Pos() const;
- double GetFracOfMergedRowV0NegV0Neg() const;
+/* double GetFracOfMergedRowV0PosV0Neg() const; */
+/* double GetFracOfMergedRowV0NegV0Pos() const; */
+/* double GetFracOfMergedRowV0PosV0Pos() const; */
+/* double GetFracOfMergedRowV0NegV0Neg() const; */
private:
AliFemtoParticle* fTrack1; // Link to the first track in the pair
}
-inline double AliFemtoPair::GetFracOfMergedRowTrkV0Pos() const{
- if(fMergingParNotCalculatedTrkV0Pos)
- CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fZ[0]),&(fTrack2->fU[0]),
- &(fTrack1->fSect[0]),&(fTrack2->fSect[0]),
- &(fFracOfMergedRowTrkV0Pos),&(fClosestRowAtDCATrkV0Pos)
- );
- return fFracOfMergedRowTrkV0Pos;
-}
-inline double AliFemtoPair::GetClosestRowAtDCATrkV0Pos() const{
- if(fMergingParNotCalculatedTrkV0Pos)
- CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fZ[0]),&(fTrack2->fU[0]),
- &(fTrack1->fSect[0]),&(fTrack2->fSect[0]),
- &fFracOfMergedRowTrkV0Pos,&fClosestRowAtDCATrkV0Pos
- );
- return fClosestRowAtDCATrkV0Pos;
-}
-inline double AliFemtoPair::GetFracOfMergedRowTrkV0Neg() const{
- if(fMergingParNotCalculatedTrkV0Neg)
- CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]),
- &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]),
- &(fFracOfMergedRowTrkV0Neg),&(fClosestRowAtDCATrkV0Neg)
- );
- return fFracOfMergedRowTrkV0Neg;
-}
-inline double AliFemtoPair::GetClosestRowAtDCATrkV0Neg() const{
- if(fMergingParNotCalculatedTrkV0Neg)
- CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]),
- &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]),
- &fFracOfMergedRowTrkV0Neg,&fClosestRowAtDCATrkV0Neg
- );
- return fClosestRowAtDCATrkV0Neg;
-}
-inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Neg() const{
- if(fMergingParNotCalculatedV0PosV0Neg)
- CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Neg,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]),
- &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]),
- &(fFracOfMergedRowV0PosV0Neg),
- &(fClosestRowAtDCAV0PosV0Neg)
- );
- return fFracOfMergedRowV0PosV0Neg;
-}
-inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Pos() const{
- if(fMergingParNotCalculatedV0NegV0Pos)
- CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Pos,
- &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]),
- &(fTrack2->fZ[0]),&(fTrack2->fU[0]),
- &(fTrack1->fV0NegSect[0]),
- &(fTrack2->fSect[0]),
- &(fFracOfMergedRowV0NegV0Pos),
- &(fClosestRowAtDCAV0NegV0Pos)
- );
- return fFracOfMergedRowV0NegV0Pos;
-}
-inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Pos() const{
- if(fMergingParNotCalculatedV0PosV0Pos)
- CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Pos,
- &(fTrack1->fZ[0]),&(fTrack1->fU[0]),
- &(fTrack2->fZ[0]),&(fTrack2->fU[0]),
- &(fTrack1->fSect[0]),
- &(fTrack2->fSect[0]),
- &(fFracOfMergedRowV0PosV0Pos),
- &(fClosestRowAtDCAV0PosV0Pos)
- );
- return fFracOfMergedRowV0PosV0Pos;
-}
-inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Neg() const{
- if(fMergingParNotCalculatedV0NegV0Neg)
- CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Neg,
- &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]),
- &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]),
- &(fTrack1->fV0NegSect[0]),
- &(fTrack2->fV0NegSect[0]),
- &(fFracOfMergedRowV0NegV0Neg),
- &(fClosestRowAtDCAV0NegV0Neg)
- );
- return fFracOfMergedRowV0NegV0Neg;
-}
+/* inline double AliFemtoPair::GetFracOfMergedRowTrkV0Pos() const{ */
+/* if(fMergingParNotCalculatedTrkV0Pos) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fZ[0]),&(fTrack2->fU[0]), */
+/* &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), */
+/* &(fFracOfMergedRowTrkV0Pos),&(fClosestRowAtDCATrkV0Pos) */
+/* ); */
+/* return fFracOfMergedRowTrkV0Pos; */
+/* } */
+/* inline double AliFemtoPair::GetClosestRowAtDCATrkV0Pos() const{ */
+/* if(fMergingParNotCalculatedTrkV0Pos) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fZ[0]),&(fTrack2->fU[0]), */
+/* &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), */
+/* &fFracOfMergedRowTrkV0Pos,&fClosestRowAtDCATrkV0Pos */
+/* ); */
+/* return fClosestRowAtDCATrkV0Pos; */
+/* } */
+/* inline double AliFemtoPair::GetFracOfMergedRowTrkV0Neg() const{ */
+/* if(fMergingParNotCalculatedTrkV0Neg) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), */
+/* &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), */
+/* &(fFracOfMergedRowTrkV0Neg),&(fClosestRowAtDCATrkV0Neg) */
+/* ); */
+/* return fFracOfMergedRowTrkV0Neg; */
+/* } */
+/* inline double AliFemtoPair::GetClosestRowAtDCATrkV0Neg() const{ */
+/* if(fMergingParNotCalculatedTrkV0Neg) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), */
+/* &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), */
+/* &fFracOfMergedRowTrkV0Neg,&fClosestRowAtDCATrkV0Neg */
+/* ); */
+/* return fClosestRowAtDCATrkV0Neg; */
+/* } */
+/* inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Neg() const{ */
+/* if(fMergingParNotCalculatedV0PosV0Neg) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Neg, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), */
+/* &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), */
+/* &(fFracOfMergedRowV0PosV0Neg), */
+/* &(fClosestRowAtDCAV0PosV0Neg) */
+/* ); */
+/* return fFracOfMergedRowV0PosV0Neg; */
+/* } */
+/* inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Pos() const{ */
+/* if(fMergingParNotCalculatedV0NegV0Pos) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Pos, */
+/* &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), */
+/* &(fTrack2->fZ[0]),&(fTrack2->fU[0]), */
+/* &(fTrack1->fV0NegSect[0]), */
+/* &(fTrack2->fSect[0]), */
+/* &(fFracOfMergedRowV0NegV0Pos), */
+/* &(fClosestRowAtDCAV0NegV0Pos) */
+/* ); */
+/* return fFracOfMergedRowV0NegV0Pos; */
+/* } */
+/* inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Pos() const{ */
+/* if(fMergingParNotCalculatedV0PosV0Pos) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Pos, */
+/* &(fTrack1->fZ[0]),&(fTrack1->fU[0]), */
+/* &(fTrack2->fZ[0]),&(fTrack2->fU[0]), */
+/* &(fTrack1->fSect[0]), */
+/* &(fTrack2->fSect[0]), */
+/* &(fFracOfMergedRowV0PosV0Pos), */
+/* &(fClosestRowAtDCAV0PosV0Pos) */
+/* ); */
+/* return fFracOfMergedRowV0PosV0Pos; */
+/* } */
+/* inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Neg() const{ */
+/* if(fMergingParNotCalculatedV0NegV0Neg) */
+/* CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Neg, */
+/* &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), */
+/* &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), */
+/* &(fTrack1->fV0NegSect[0]), */
+/* &(fTrack2->fV0NegSect[0]), */
+/* &(fFracOfMergedRowV0NegV0Neg), */
+/* &(fClosestRowAtDCAV0NegV0Neg) */
+/* ); */
+/* return fFracOfMergedRowV0NegV0Neg; */
+/* } */
#endif
//_____________________
AliFemtoParticle::AliFemtoParticle() :
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
}
//_____________________
AliFemtoParticle::AliFemtoParticle(const AliFemtoParticle& aParticle):
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
fFourMomentum = aParticle.fFourMomentum;
fHelix = aParticle.fHelix;
- for (int iter=0; iter<11; iter++)
- fNominalPosSample[iter] = aParticle.fNominalPosSample[iter];
-
- if (aParticle.fTpcV0NegPosSample) {
- fTpcV0NegPosSample = (AliFemtoThreeVector *) malloc(sizeof(AliFemtoThreeVector) * 11);
- for (int iter=0; iter<11; iter++)
- fTpcV0NegPosSample[iter] = aParticle.fTpcV0NegPosSample[iter];
- }
-
- if (aParticle.fV0NegZ) {
- fV0NegZ = (float *) malloc(sizeof(float) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegZ[iter] = aParticle.fV0NegZ[iter];
- }
- if (aParticle.fV0NegU) {
- fV0NegU = (float *) malloc(sizeof(float) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegU[iter] = aParticle.fV0NegU[iter];
- }
- if (aParticle.fV0NegSect) {
- fV0NegSect = (int *) malloc(sizeof(int) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegSect[iter] = aParticle.fV0NegSect[iter];
- }
+// for (int iter=0; iter<11; iter++)
+// fNominalPosSample[iter] = aParticle.fNominalPosSample[iter];
+
+// if (aParticle.fTpcV0NegPosSample) {
+// fTpcV0NegPosSample = (AliFemtoThreeVector *) malloc(sizeof(AliFemtoThreeVector) * 11);
+// for (int iter=0; iter<11; iter++)
+// fTpcV0NegPosSample[iter] = aParticle.fTpcV0NegPosSample[iter];
+// }
+
+// if (aParticle.fV0NegZ) {
+// fV0NegZ = (float *) malloc(sizeof(float) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegZ[iter] = aParticle.fV0NegZ[iter];
+// }
+// if (aParticle.fV0NegU) {
+// fV0NegU = (float *) malloc(sizeof(float) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegU[iter] = aParticle.fV0NegU[iter];
+// }
+// if (aParticle.fV0NegSect) {
+// fV0NegSect = (int *) malloc(sizeof(int) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegSect[iter] = aParticle.fV0NegSect[iter];
+// }
fPrimaryVertex = aParticle.fPrimaryVertex;
fSecondaryVertex = aParticle.fSecondaryVertex;
fHiddenInfo= aParticle.HiddenInfo()->Clone();
}
- fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint;
- fNominalTpcExitPoint = aParticle.fNominalTpcExitPoint;
+// fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint;
+// fNominalTpcExitPoint = aParticle.fNominalTpcExitPoint;
for (int iter=0; iter<6; iter++)
fPurity[iter] = aParticle.fPurity[iter];
if (fTrack) delete fTrack;
if (fV0) {
- delete[] fTpcV0NegPosSample;
- delete[] fV0NegZ;
- delete[] fV0NegU;
- delete[] fV0NegSect;
+// delete[] fTpcV0NegPosSample;
+// delete[] fV0NegZ;
+// delete[] fV0NegU;
+// delete[] fV0NegSect;
delete fV0;
}
if (fKink) delete fKink;
}
//_____________________
AliFemtoParticle::AliFemtoParticle(const AliFemtoTrack* const hbtTrack,const double& mass) :
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
}
//_____________________
AliFemtoParticle::AliFemtoParticle(const AliFemtoV0* const hbtV0,const double& mass) :
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
fSecondaryVertex = hbtV0->DecayVertexV0();
fHelixV0Pos = hbtV0->HelixPos();
- fTpcV0NegPosSample = new AliFemtoThreeVector[45];//for V0Neg
- fV0NegZ = new float[45];//for V0Neg
- fV0NegU = new float[45];//for V0Neg
- fV0NegSect = new int[45];//for V0Neg
- CalculateTpcExitAndEntrancePoints(&fHelixV0Pos,&fPrimaryVertex,
- &fSecondaryVertex,
- &fTpcV0PosEntrancePoint,
- &fTpcV0PosExitPoint,
- &fNominalPosSample[0],
- &fZ[0],
- &fU[0],&fSect[0]);
+// fTpcV0NegPosSample = new AliFemtoThreeVector[45];//for V0Neg
+// fV0NegZ = new float[45];//for V0Neg
+// fV0NegU = new float[45];//for V0Neg
+// fV0NegSect = new int[45];//for V0Neg
+// CalculateTpcExitAndEntrancePoints(&fHelixV0Pos,&fPrimaryVertex,
+// &fSecondaryVertex,
+// &fTpcV0PosEntrancePoint,
+// &fTpcV0PosExitPoint,
+// &fNominalPosSample[0],
+// &fZ[0],
+// &fU[0],&fSect[0]);
fHelixV0Neg = hbtV0->HelixNeg();
- CalculateTpcExitAndEntrancePoints(&fHelixV0Neg,
- &fPrimaryVertex,
- &fSecondaryVertex,
- &fTpcV0NegEntrancePoint,
- &fTpcV0NegExitPoint,
- &fTpcV0NegPosSample[0],
- &fV0NegZ[0],
- &fV0NegU[0],&fV0NegSect[0]);
+// CalculateTpcExitAndEntrancePoints(&fHelixV0Neg,
+// &fPrimaryVertex,
+// &fSecondaryVertex,
+// &fTpcV0NegEntrancePoint,
+// &fTpcV0NegExitPoint,
+// &fTpcV0NegPosSample[0],
+// &fV0NegZ[0],
+// &fV0NegU[0],&fV0NegSect[0]);
// ***
fHiddenInfo= 0;
}
//_____________________
AliFemtoParticle::AliFemtoParticle(const AliFemtoKink* const hbtKink,const double& mass) :
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
//_____________________
AliFemtoParticle::AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& mass) :
- fTpcV0NegPosSample(0),
- fV0NegZ(0),
- fV0NegU(0),
- fV0NegSect(0),
+// fTpcV0NegPosSample(0),
+// fV0NegZ(0),
+// fV0NegU(0),
+// fV0NegSect(0),
fTrack(0), fV0(0), fKink(0), fXi(0),
fFourMomentum(0),
fHelix(),
- fNominalTpcExitPoint(0),
- fNominalTpcEntrancePoint(0),
+// fNominalTpcExitPoint(0),
+// fNominalTpcEntrancePoint(0),
fHiddenInfo(0),
fPrimaryVertex(0),
fSecondaryVertex(0),
fFourMomentum = aParticle.fFourMomentum;
fHelix = aParticle.fHelix;
- for (int iter=0; iter<11; iter++)
- fNominalPosSample[iter] = aParticle.fNominalPosSample[iter];
-
- if (fTpcV0NegPosSample) delete fTpcV0NegPosSample;
- if (aParticle.fTpcV0NegPosSample) {
- fTpcV0NegPosSample = (AliFemtoThreeVector *) malloc(sizeof(AliFemtoThreeVector) * 11);
- for (int iter=0; iter<11; iter++)
- fTpcV0NegPosSample[iter] = aParticle.fTpcV0NegPosSample[iter];
- }
-
- if (fV0NegZ) delete fV0NegZ;
- if (aParticle.fV0NegZ) {
- fV0NegZ = (float *) malloc(sizeof(float) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegZ[iter] = aParticle.fV0NegZ[iter];
- }
- if (fV0NegU) delete fV0NegU;
- if (aParticle.fV0NegU) {
- fV0NegU = (float *) malloc(sizeof(float) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegU[iter] = aParticle.fV0NegU[iter];
- }
- if (fV0NegSect) delete fV0NegSect;
- if (aParticle.fV0NegSect) {
- fV0NegSect = (int *) malloc(sizeof(int) * 45);
- for (int iter=0; iter<11; iter++)
- fV0NegSect[iter] = aParticle.fV0NegSect[iter];
- }
+// for (int iter=0; iter<11; iter++)
+// fNominalPosSample[iter] = aParticle.fNominalPosSample[iter];
+
+// if (fTpcV0NegPosSample) delete fTpcV0NegPosSample;
+// if (aParticle.fTpcV0NegPosSample) {
+// fTpcV0NegPosSample = (AliFemtoThreeVector *) malloc(sizeof(AliFemtoThreeVector) * 11);
+// for (int iter=0; iter<11; iter++)
+// fTpcV0NegPosSample[iter] = aParticle.fTpcV0NegPosSample[iter];
+// }
+
+// if (fV0NegZ) delete fV0NegZ;
+// if (aParticle.fV0NegZ) {
+// fV0NegZ = (float *) malloc(sizeof(float) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegZ[iter] = aParticle.fV0NegZ[iter];
+// }
+// if (fV0NegU) delete fV0NegU;
+// if (aParticle.fV0NegU) {
+// fV0NegU = (float *) malloc(sizeof(float) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegU[iter] = aParticle.fV0NegU[iter];
+// }
+// if (fV0NegSect) delete fV0NegSect;
+// if (aParticle.fV0NegSect) {
+// fV0NegSect = (int *) malloc(sizeof(int) * 45);
+// for (int iter=0; iter<11; iter++)
+// fV0NegSect[iter] = aParticle.fV0NegSect[iter];
+// }
fPrimaryVertex = aParticle.fPrimaryVertex;
fSecondaryVertex = aParticle.fSecondaryVertex;
fHiddenInfo= aParticle.fHiddenInfo->Clone();
}
- fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint;
- fNominalTpcExitPoint = aParticle.fNominalTpcExitPoint;
-
+// fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint;
+// fNominalTpcExitPoint = aParticle.fNominalTpcExitPoint;
+
if (fHiddenInfo) delete fHiddenInfo;
if (aParticle.fHiddenInfo)
fHiddenInfo = aParticle.HiddenInfo()->Clone();
return *this;
}
-//_____________________
-const AliFemtoThreeVector& AliFemtoParticle::NominalTpcExitPoint() const{
- // in future, may want to calculate this "on demand" only, sot this routine may get more sophisticated
- // for now, we calculate Exit and Entrance points upon instantiation
- return fNominalTpcExitPoint;
-}
-//_____________________
-const AliFemtoThreeVector& AliFemtoParticle::NominalTpcEntrancePoint() const{
- // in future, may want to calculate this "on demand" only, sot this routine may get more sophisticated
- // for now, we calculate Exit and Entrance points upon instantiation
- return fNominalTpcEntrancePoint;
-}
+// //_____________________
+// const AliFemtoThreeVector& AliFemtoParticle::NominalTpcExitPoint() const{
+// // in future, may want to calculate this "on demand" only, sot this routine may get more sophisticated
+// // for now, we calculate Exit and Entrance points upon instantiation
+// return fNominalTpcExitPoint;
+// }
+// //_____________________
+// const AliFemtoThreeVector& AliFemtoParticle::NominalTpcEntrancePoint() const{
+// // in future, may want to calculate this "on demand" only, sot this routine may get more sophisticated
+// // for now, we calculate Exit and Entrance points upon instantiation
+// return fNominalTpcEntrancePoint;
+// }
//_____________________
void AliFemtoParticle::CalculatePurity(){
// Calculate additional parameterized purity
return fPurity[4];
}
-void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tHelix,
- AliFemtoThreeVector* PrimVert,
- AliFemtoThreeVector* SecVert,
- AliFemtoThreeVector* tmpTpcEntrancePoint,
- AliFemtoThreeVector* tmpTpcExitPoint,
- AliFemtoThreeVector* tmpPosSample,
- float* tmpZ,
- float* tmpU,
- int* tmpSect){
- // this calculates the exit point of a secondary track,
- // either through the endcap or through the Outer Field Cage
- // We assume the track to start at tHelix.origin-PrimaryVertex
- // it also calculates the entrance point of the secondary track,
- // which is the point at which it crosses the
- // inner field cage
- // static AliFemtoThreeVector ZeroVec(0.,0.,0.);
- AliFemtoThreeVector tZeroVec(0.,0.,0.);
-// tZeroVec.setX(tHelix->origin().x()-PrimVert->x());
-// tZeroVec.setY(tHelix->origin().y()-PrimVert->y());
-// tZeroVec.setZ(tHelix->origin().z()-PrimVert->z());
- tZeroVec.setX(SecVert->x()-PrimVert->x());
- tZeroVec.setY(SecVert->y()-PrimVert->y());
- tZeroVec.setZ(SecVert->z()-PrimVert->z());
- double dip, curv, phase;
- int h;
- curv = tHelix->Curvature();
- dip = tHelix->DipAngle();
- phase= tHelix->Phase();
- h = tHelix->H();
+// void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tHelix,
+// AliFemtoThreeVector* PrimVert,
+// AliFemtoThreeVector* SecVert,
+// AliFemtoThreeVector* tmpTpcEntrancePoint,
+// AliFemtoThreeVector* tmpTpcExitPoint,
+// AliFemtoThreeVector* tmpPosSample,
+// float* tmpZ,
+// float* tmpU,
+// int* tmpSect){
+// // this calculates the exit point of a secondary track,
+// // either through the endcap or through the Outer Field Cage
+// // We assume the track to start at tHelix.origin-PrimaryVertex
+// // it also calculates the entrance point of the secondary track,
+// // which is the point at which it crosses the
+// // inner field cage
+// // static AliFemtoThreeVector ZeroVec(0.,0.,0.);
+// AliFemtoThreeVector tZeroVec(0.,0.,0.);
+// // tZeroVec.setX(tHelix->origin().x()-PrimVert->x());
+// // tZeroVec.setY(tHelix->origin().y()-PrimVert->y());
+// // tZeroVec.setZ(tHelix->origin().z()-PrimVert->z());
+// tZeroVec.setX(SecVert->x()-PrimVert->x());
+// tZeroVec.setY(SecVert->y()-PrimVert->y());
+// tZeroVec.setZ(SecVert->z()-PrimVert->z());
+// double dip, curv, phase;
+// int h;
+// curv = tHelix->Curvature();
+// dip = tHelix->DipAngle();
+// phase= tHelix->Phase();
+// h = tHelix->H();
- AliFmHelixD hel(curv,dip,phase,tZeroVec,h);
-
- pairD candidates;
- double sideLength; // this is how much length to go to leave through sides of TPC
- double endLength; // this is how much length to go to leave through endcap of TPC
- // figure out how far to go to leave through side...
- candidates = hel.PathLength(200.0); // bugfix MAL jul00 - 200cm NOT 2cm
- sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
-
- static AliFemtoThreeVector tWestEnd(0.,0.,200.); // bugfix MAL jul00 - 200cm NOT 2cm
- static AliFemtoThreeVector tEastEnd(0.,0.,-200.); // bugfix MAL jul00 - 200cm NOT 2cm
- static AliFemtoThreeVector tEndCapNormal(0.,0.,1.0);
-
- endLength = hel.PathLength(tWestEnd,tEndCapNormal);
- if (endLength < 0.0) endLength = hel.PathLength(tEastEnd,tEndCapNormal);
-
- if (endLength < 0.0) cout <<
- "AliFemtoParticle::CalculateTpcExitAndEntrancePoints(): "
- << "Hey -- I cannot find an exit point out endcaps" << endl;
- // OK, firstExitLength will be the shortest way out of the detector...
- double firstExitLength = (endLength < sideLength) ? endLength : sideLength;
- // now then, let's return the POSITION at which particle leaves TPC...
- *tmpTpcExitPoint = hel.At(firstExitLength);
- // Finally, calculate the position at which the track crosses the inner field cage
- candidates = hel.PathLength(50.0); // bugfix MAL jul00 - 200cm NOT 2cm
-
- sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
- // cout << "sideLength 2 ="<<sideLength << endl;
- *tmpTpcEntrancePoint = hel.At(sideLength);
- // This is the secure way !
- if (IsNaN(tmpTpcEntrancePoint->x()) ||
- IsNaN(tmpTpcEntrancePoint->y()) ||
- IsNaN(tmpTpcEntrancePoint->z()) ){
- cout << "tmpTpcEntrancePoint NAN"<< endl;
- cout << "tmpNominalTpcEntrancePoint = " <<tmpTpcEntrancePoint<< endl;
- tmpTpcEntrancePoint->setX(-9999.);
- tmpTpcEntrancePoint->setY(-9999.);
- tmpTpcEntrancePoint->setZ(-9999.);
- }
+// AliFmHelixD hel(curv,dip,phase,tZeroVec,h);
+
+// pairD candidates;
+// double sideLength; // this is how much length to go to leave through sides of TPC
+// double endLength; // this is how much length to go to leave through endcap of TPC
+// // figure out how far to go to leave through side...
+// candidates = hel.PathLength(200.0); // bugfix MAL jul00 - 200cm NOT 2cm
+// sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
+
+// static AliFemtoThreeVector tWestEnd(0.,0.,200.); // bugfix MAL jul00 - 200cm NOT 2cm
+// static AliFemtoThreeVector tEastEnd(0.,0.,-200.); // bugfix MAL jul00 - 200cm NOT 2cm
+// static AliFemtoThreeVector tEndCapNormal(0.,0.,1.0);
+
+// endLength = hel.PathLength(tWestEnd,tEndCapNormal);
+// if (endLength < 0.0) endLength = hel.PathLength(tEastEnd,tEndCapNormal);
+
+// if (endLength < 0.0) cout <<
+// "AliFemtoParticle::CalculateTpcExitAndEntrancePoints(): "
+// << "Hey -- I cannot find an exit point out endcaps" << endl;
+// // OK, firstExitLength will be the shortest way out of the detector...
+// double firstExitLength = (endLength < sideLength) ? endLength : sideLength;
+// // now then, let's return the POSITION at which particle leaves TPC...
+// *tmpTpcExitPoint = hel.At(firstExitLength);
+// // Finally, calculate the position at which the track crosses the inner field cage
+// candidates = hel.PathLength(50.0); // bugfix MAL jul00 - 200cm NOT 2cm
+
+// sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// // cout << "sideLength 2 ="<<sideLength << endl;
+// *tmpTpcEntrancePoint = hel.At(sideLength);
+// // This is the secure way !
+// if (IsNaN(tmpTpcEntrancePoint->x()) ||
+// IsNaN(tmpTpcEntrancePoint->y()) ||
+// IsNaN(tmpTpcEntrancePoint->z()) ){
+// cout << "tmpTpcEntrancePoint NAN"<< endl;
+// cout << "tmpNominalTpcEntrancePoint = " <<tmpTpcEntrancePoint<< endl;
+// tmpTpcEntrancePoint->setX(-9999.);
+// tmpTpcEntrancePoint->setY(-9999.);
+// tmpTpcEntrancePoint->setZ(-9999.);
+// }
- if (IsNaN(tmpTpcExitPoint->x()) ||
- IsNaN(tmpTpcExitPoint->y()) ||
- IsNaN(tmpTpcExitPoint->z()) ) {
-// cout << "tmpTpcExitPoint NAN set at (-9999,-9999,-9999)"<< endl;
-// cout << "tmpTpcExitPoint X= " <<tmpTpcExitPoint->x()<< endl;
-// cout << "tmpTpcExitPoint Y= " <<tmpTpcExitPoint->y()<< endl;
-// cout << "tmpTpcExitPoint Z= " <<tmpTpcExitPoint->z()<< endl;
- tmpTpcExitPoint->setX(-9999.);
- tmpTpcExitPoint->setY(-9999.);
- tmpTpcExitPoint->setZ(-9999.);
- }
-
-
-// if (IsNaN(tmpTpcExitPoint->x())) *tmpTpcExitPoint = AliFemtoThreeVector(-9999.,-9999.,-9999);
-// if (IsNaN(tmpTpcEntrancetPoint->x())) *tmpTpcEntrancePoint = AliFemtoThreeVector(-9999.,-9999.,-9999);
- // cout << "tmpTpcEntrancePoint"<<*tmpTpcEntrancePoint << endl;
-
- // 03Oct00 - mal. OK, let's try something a little more
- // along the lines of NA49 and E895 strategy.
- // calculate the "nominal" position at N radii (say N=11)
- // within the TPC, and for a pair cut
- // use the average separation of these N
- int irad = 0;
- candidates = hel.PathLength(50.0);
- sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
- while (irad<11 && !IsNaN(sideLength)){
- float radius = 50.0 + irad*15.0;
- candidates = hel.PathLength(radius);
- sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
- tmpPosSample[irad] = hel.At(sideLength);
- if(IsNaN(tmpPosSample[irad].x()) ||
- IsNaN(tmpPosSample[irad].y()) ||
- IsNaN(tmpPosSample[irad].z())
- ){
- cout << "tmpPosSample for radius=" << radius << " NAN"<< endl;
- cout << "tmpPosSample=(" <<tmpPosSample[irad]<<")"<< endl;
- tmpPosSample[irad] = AliFemtoThreeVector(-9999.,-9999.,-9999);
- }
- irad++;
- if (irad<11){
- float radius = 50.0 + irad*15.0;
- candidates = hel.PathLength(radius);
- sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
- }
- }
- for (int i = irad; i<11; i++)
- {
- tmpPosSample[i] = AliFemtoThreeVector(-9999.,-9999.,-9999);
- }
-
- static float tRowRadius[45] = {60,64.8,69.6,74.4,79.2,84,88.8,93.6,98.8,
- 104,109.2,114.4,119.6,127.195,129.195,131.195,
- 133.195,135.195,137.195,139.195,141.195,
- 143.195,145.195,147.195,149.195,151.195,
- 153.195,155.195,157.195,159.195,161.195,
- 163.195,165.195,167.195,169.195,171.195,
- 173.195,175.195,177.195,179.195,181.195,
- 183.195,185.195,187.195,189.195};
- int tRow,tSect,tOutOfBound;
- double tLength,tPhi;
- float tU;
- AliFemtoThreeVector tPoint;
- AliFmThreeVectorD tn(0,0,0);
- AliFmThreeVectorD tr(0,0,0);
- int ti =0;
- // test to enter the loop
- candidates = hel.PathLength(tRowRadius[ti]);
- tLength = (candidates.first > 0) ? candidates.first : candidates.second;
- if (IsNaN(tLength)){
- cout <<"tLength Init tmp NAN" << endl;
- cout <<"padrow number= "<<ti << "not reached" << endl;
- cout << "*** DO NOT ENTER THE LOOP***" << endl;
- tmpSect[ti]=-1;//sector
- }
- // end test
- while(ti<45 && !IsNaN(tLength)){
- candidates = hel.PathLength(tRowRadius[ti]);
- tLength = (candidates.first > 0) ? candidates.first : candidates.second;
- if (IsNaN(tLength)){
- cout <<"tLength loop 1st NAN" << endl;
- cout <<"padrow number= " << ti << " not reached" << endl;
- cout << "*** THIS IS AN ERROR SHOULDN'T LOOP ***" << endl;
- tmpSect[ti]=-1;//sector
- }
- tPoint = hel.At(tLength);
- // Find which sector it is on
- TpcLocalTransform(tPoint,tmpSect[ti],tRow,tU,tPhi);
- if (IsNaN(tmpSect[ti])){
- cout <<"***ERROR tmpSect"<< endl;
- }
- if (IsNaN(tRow)){
- cout <<"***ERROR tRow"<< endl;
- }
- if (IsNaN(tU)){
- cout <<"***ERROR tU"<< endl;
- }
- if (IsNaN(tPhi)){
- cout <<"***ERROR tPhi"<< endl;
- }
- // calculate crossing plane
- tn.setX(cos(tPhi));
- tn.setY(sin(tPhi));
- tr.setX(tRowRadius[ti]*cos(tPhi));
- tr.setY(tRowRadius[ti]*sin(tPhi));
- // find crossing point
- tLength = hel.PathLength(tr,tn);
- if (IsNaN(tLength)){
- cout <<"tLength loop 2nd NAN" << endl;
- cout <<"padrow number= " << ti << " not reached" << endl;
- tmpSect[ti]=-2;//sector
- }
- tPoint = hel.At(tLength);
- tmpZ[ti] = tPoint.z();
- tOutOfBound = TpcLocalTransform(tPoint,tSect,tRow,tmpU[ti],tPhi);
- if (IsNaN(tSect)){
- cout <<"***ERROR tSect 2"<< endl;
- }
- if (IsNaN(tRow)){
- cout <<"***ERROR tRow 2"<< endl;
- }
- if (IsNaN(tmpU[ti])){
- cout <<"***ERROR tmpU[ti] 2"<< endl;
- }
- if (IsNaN(tPhi)){
- cout <<"***ERROR tPhi 2 "<< endl;
- }
- if(tOutOfBound || (tmpSect[ti] == tSect && tRow!=(ti+1))){
- tmpSect[ti]=-2;
- // cout << "missed once"<< endl;
- }
- else{
- if(tmpSect[ti] != tSect){
- // Try again on the other sector
- tn.setX(cos(tPhi));
- tn.setY(sin(tPhi));
- tr.setX(tRowRadius[ti]*cos(tPhi));
- tr.setY(tRowRadius[ti]*sin(tPhi));
- // find crossing point
- tLength = hel.PathLength(tr,tn);
- tPoint = hel.At(tLength);
- if (IsNaN(tLength)){
- cout <<"tLength loop 3rd NAN" << endl;
- cout <<"padrow number= "<< ti << " not reached" << endl;
- tmpSect[ti]=-1;//sector
- }
- tmpZ[ti] = tPoint.z();
- tmpSect[ti] = tSect;
- tOutOfBound = TpcLocalTransform(tPoint,tSect,tRow,tmpU[ti],tPhi);
- if (IsNaN(tSect)){
- cout <<"***ERROR tSect 3"<< endl;
- }
- if (IsNaN(tRow)){
- cout <<"***ERROR tRow 3"<< endl;
- }
- if (IsNaN(tmpU[ti])){
- cout <<"***ERROR tmpU[ti] 3"<< endl;
- }
- if (IsNaN(tPhi)){
- cout <<"***ERROR tPhi 3 "<< endl;
- }
- if(tOutOfBound || tSect!= tmpSect[ti] || tRow!=(ti+1)){
- tmpSect[ti]=-1;
- }
- }
- }
- if (IsNaN(tmpSect[ti])){
- cout << "*******************ERROR***************************" << endl;
- cout <<"AliFemtoParticle--Fctn tmpSect=" << tmpSect[ti] << endl;
- cout << "*******************ERROR***************************" << endl;
- }
- if (IsNaN(tmpU[ti])){
- cout << "*******************ERROR***************************" << endl;
- cout <<"AliFemtoParticle--Fctn tmpU=" << tmpU[ti] << endl;
- cout << "*******************ERROR***************************" << endl;
- }
- if (IsNaN(tmpZ[ti])){
- cout << "*******************ERROR***************************" << endl;
- cout <<"AliFemtoParticle--Fctn tmpZ=" << tmpZ[ti] << endl;
- cout << "*******************ERROR***************************" << endl;
- }
- // If padrow ti not reached all other beyond are not reached
- // in this case set sector to -1
- if (tmpSect[ti]==-1){
- for (int tj=ti; tj<45;tj++){
- tmpSect[tj] = -1;
- ti=45;
- }
- }
- ti++;
- if (ti<45){
- candidates = hel.PathLength(tRowRadius[ti]);
- tLength = (candidates.first > 0) ? candidates.first : candidates.second;}
- }
-}
+// if (IsNaN(tmpTpcExitPoint->x()) ||
+// IsNaN(tmpTpcExitPoint->y()) ||
+// IsNaN(tmpTpcExitPoint->z()) ) {
+// // cout << "tmpTpcExitPoint NAN set at (-9999,-9999,-9999)"<< endl;
+// // cout << "tmpTpcExitPoint X= " <<tmpTpcExitPoint->x()<< endl;
+// // cout << "tmpTpcExitPoint Y= " <<tmpTpcExitPoint->y()<< endl;
+// // cout << "tmpTpcExitPoint Z= " <<tmpTpcExitPoint->z()<< endl;
+// tmpTpcExitPoint->setX(-9999.);
+// tmpTpcExitPoint->setY(-9999.);
+// tmpTpcExitPoint->setZ(-9999.);
+// }
+
+
+// // if (IsNaN(tmpTpcExitPoint->x())) *tmpTpcExitPoint = AliFemtoThreeVector(-9999.,-9999.,-9999);
+// // if (IsNaN(tmpTpcEntrancetPoint->x())) *tmpTpcEntrancePoint = AliFemtoThreeVector(-9999.,-9999.,-9999);
+// // cout << "tmpTpcEntrancePoint"<<*tmpTpcEntrancePoint << endl;
+
+// // 03Oct00 - mal. OK, let's try something a little more
+// // along the lines of NA49 and E895 strategy.
+// // calculate the "nominal" position at N radii (say N=11)
+// // within the TPC, and for a pair cut
+// // use the average separation of these N
+// int irad = 0;
+// candidates = hel.PathLength(50.0);
+// sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// while (irad<11 && !IsNaN(sideLength)){
+// float radius = 50.0 + irad*15.0;
+// candidates = hel.PathLength(radius);
+// sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// tmpPosSample[irad] = hel.At(sideLength);
+// if(IsNaN(tmpPosSample[irad].x()) ||
+// IsNaN(tmpPosSample[irad].y()) ||
+// IsNaN(tmpPosSample[irad].z())
+// ){
+// cout << "tmpPosSample for radius=" << radius << " NAN"<< endl;
+// cout << "tmpPosSample=(" <<tmpPosSample[irad]<<")"<< endl;
+// tmpPosSample[irad] = AliFemtoThreeVector(-9999.,-9999.,-9999);
+// }
+// irad++;
+// if (irad<11){
+// float radius = 50.0 + irad*15.0;
+// candidates = hel.PathLength(radius);
+// sideLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// }
+// }
+// for (int i = irad; i<11; i++)
+// {
+// tmpPosSample[i] = AliFemtoThreeVector(-9999.,-9999.,-9999);
+// }
+
+// static float tRowRadius[45] = {60,64.8,69.6,74.4,79.2,84,88.8,93.6,98.8,
+// 104,109.2,114.4,119.6,127.195,129.195,131.195,
+// 133.195,135.195,137.195,139.195,141.195,
+// 143.195,145.195,147.195,149.195,151.195,
+// 153.195,155.195,157.195,159.195,161.195,
+// 163.195,165.195,167.195,169.195,171.195,
+// 173.195,175.195,177.195,179.195,181.195,
+// 183.195,185.195,187.195,189.195};
+// int tRow,tSect,tOutOfBound;
+// double tLength,tPhi;
+// float tU;
+// AliFemtoThreeVector tPoint;
+// AliFmThreeVectorD tn(0,0,0);
+// AliFmThreeVectorD tr(0,0,0);
+// int ti =0;
+// // test to enter the loop
+// candidates = hel.PathLength(tRowRadius[ti]);
+// tLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// if (IsNaN(tLength)){
+// cout <<"tLength Init tmp NAN" << endl;
+// cout <<"padrow number= "<<ti << "not reached" << endl;
+// cout << "*** DO NOT ENTER THE LOOP***" << endl;
+// tmpSect[ti]=-1;//sector
+// }
+// // end test
+// while(ti<45 && !IsNaN(tLength)){
+// candidates = hel.PathLength(tRowRadius[ti]);
+// tLength = (candidates.first > 0) ? candidates.first : candidates.second;
+// if (IsNaN(tLength)){
+// cout <<"tLength loop 1st NAN" << endl;
+// cout <<"padrow number= " << ti << " not reached" << endl;
+// cout << "*** THIS IS AN ERROR SHOULDN'T LOOP ***" << endl;
+// tmpSect[ti]=-1;//sector
+// }
+// tPoint = hel.At(tLength);
+// // Find which sector it is on
+// TpcLocalTransform(tPoint,tmpSect[ti],tRow,tU,tPhi);
+// if (IsNaN(tmpSect[ti])){
+// cout <<"***ERROR tmpSect"<< endl;
+// }
+// if (IsNaN(tRow)){
+// cout <<"***ERROR tRow"<< endl;
+// }
+// if (IsNaN(tU)){
+// cout <<"***ERROR tU"<< endl;
+// }
+// if (IsNaN(tPhi)){
+// cout <<"***ERROR tPhi"<< endl;
+// }
+// // calculate crossing plane
+// tn.setX(cos(tPhi));
+// tn.setY(sin(tPhi));
+// tr.setX(tRowRadius[ti]*cos(tPhi));
+// tr.setY(tRowRadius[ti]*sin(tPhi));
+// // find crossing point
+// tLength = hel.PathLength(tr,tn);
+// if (IsNaN(tLength)){
+// cout <<"tLength loop 2nd NAN" << endl;
+// cout <<"padrow number= " << ti << " not reached" << endl;
+// tmpSect[ti]=-2;//sector
+// }
+// tPoint = hel.At(tLength);
+// tmpZ[ti] = tPoint.z();
+// tOutOfBound = TpcLocalTransform(tPoint,tSect,tRow,tmpU[ti],tPhi);
+// if (IsNaN(tSect)){
+// cout <<"***ERROR tSect 2"<< endl;
+// }
+// if (IsNaN(tRow)){
+// cout <<"***ERROR tRow 2"<< endl;
+// }
+// if (IsNaN(tmpU[ti])){
+// cout <<"***ERROR tmpU[ti] 2"<< endl;
+// }
+// if (IsNaN(tPhi)){
+// cout <<"***ERROR tPhi 2 "<< endl;
+// }
+// if(tOutOfBound || (tmpSect[ti] == tSect && tRow!=(ti+1))){
+// tmpSect[ti]=-2;
+// // cout << "missed once"<< endl;
+// }
+// else{
+// if(tmpSect[ti] != tSect){
+// // Try again on the other sector
+// tn.setX(cos(tPhi));
+// tn.setY(sin(tPhi));
+// tr.setX(tRowRadius[ti]*cos(tPhi));
+// tr.setY(tRowRadius[ti]*sin(tPhi));
+// // find crossing point
+// tLength = hel.PathLength(tr,tn);
+// tPoint = hel.At(tLength);
+// if (IsNaN(tLength)){
+// cout <<"tLength loop 3rd NAN" << endl;
+// cout <<"padrow number= "<< ti << " not reached" << endl;
+// tmpSect[ti]=-1;//sector
+// }
+// tmpZ[ti] = tPoint.z();
+// tmpSect[ti] = tSect;
+// tOutOfBound = TpcLocalTransform(tPoint,tSect,tRow,tmpU[ti],tPhi);
+// if (IsNaN(tSect)){
+// cout <<"***ERROR tSect 3"<< endl;
+// }
+// if (IsNaN(tRow)){
+// cout <<"***ERROR tRow 3"<< endl;
+// }
+// if (IsNaN(tmpU[ti])){
+// cout <<"***ERROR tmpU[ti] 3"<< endl;
+// }
+// if (IsNaN(tPhi)){
+// cout <<"***ERROR tPhi 3 "<< endl;
+// }
+// if(tOutOfBound || tSect!= tmpSect[ti] || tRow!=(ti+1)){
+// tmpSect[ti]=-1;
+// }
+// }
+// }
+// if (IsNaN(tmpSect[ti])){
+// cout << "*******************ERROR***************************" << endl;
+// cout <<"AliFemtoParticle--Fctn tmpSect=" << tmpSect[ti] << endl;
+// cout << "*******************ERROR***************************" << endl;
+// }
+// if (IsNaN(tmpU[ti])){
+// cout << "*******************ERROR***************************" << endl;
+// cout <<"AliFemtoParticle--Fctn tmpU=" << tmpU[ti] << endl;
+// cout << "*******************ERROR***************************" << endl;
+// }
+// if (IsNaN(tmpZ[ti])){
+// cout << "*******************ERROR***************************" << endl;
+// cout <<"AliFemtoParticle--Fctn tmpZ=" << tmpZ[ti] << endl;
+// cout << "*******************ERROR***************************" << endl;
+// }
+// // If padrow ti not reached all other beyond are not reached
+// // in this case set sector to -1
+// if (tmpSect[ti]==-1){
+// for (int tj=ti; tj<45;tj++){
+// tmpSect[tj] = -1;
+// ti=45;
+// }
+// }
+// ti++;
+// if (ti<45){
+// candidates = hel.PathLength(tRowRadius[ti]);
+// tLength = (candidates.first > 0) ? candidates.first : candidates.second;}
+// }
+// }
//_____________________
const AliFemtoThreeVector& AliFemtoParticle::TpcV0PosExitPoint() const{
return fTpcV0PosExitPoint;
AliFemtoV0* V0() const;
AliFemtoKink* Kink() const;
- const AliFemtoThreeVector& NominalTpcExitPoint() const; // position track exits TPC assuming start at (0,0,0)
- const AliFemtoThreeVector& NominalTpcEntrancePoint() const; // position track crosses IFC assuming start at (0,0,0)
+/* const AliFemtoThreeVector& NominalTpcExitPoint() const; // position track exits TPC assuming start at (0,0,0) */
+/* const AliFemtoThreeVector& NominalTpcEntrancePoint() const; // position track crosses IFC assuming start at (0,0,0) */
const AliFemtoThreeVector& TpcV0PosExitPoint() const;
const AliFemtoThreeVector& TpcV0PosEntrancePoint() const;
const AliFemtoThreeVector& TpcV0NegExitPoint() const;
// NOTE - this requires the fHelix, so be sure this is filled
- AliFemtoThreeVector fNominalPosSample[11]; // I make this public for convenience and speed of AliFemtoPair()
- float fZ[45]; // Z position of cluster on padrow
- float fU[45]; // U position of cluster on padrow
- int fSect[45]; // Sector number of cluster on padrow
+/* AliFemtoThreeVector fNominalPosSample[11]; // I make this public for convenience and speed of AliFemtoPair() */
+/* float fZ[45]; // Z position of cluster on padrow */
+/* float fU[45]; // U position of cluster on padrow */
+/* int fSect[45]; // Sector number of cluster on padrow */
void ResetFourMomentum(const AliFemtoLorentzVector& fourMomentum);
double GetPionPurity();
double GetKaonPurity();
double GetProtonPurity();
- void CalculateTpcExitAndEntrancePoints( AliFmPhysicalHelixD* tHelix,
- AliFemtoThreeVector* PrimVert,
- AliFemtoThreeVector* SecVert,
- AliFemtoThreeVector* tmpTpcEntrancePoint,
- AliFemtoThreeVector* tmpTpcExitPoint,
- AliFemtoThreeVector* tmpPosSample,
- float* tmpZ,float* tmpU,int* tmpSect);
+/* void CalculateTpcExitAndEntrancePoints( AliFmPhysicalHelixD* tHelix, */
+/* AliFemtoThreeVector* PrimVert, */
+/* AliFemtoThreeVector* SecVert, */
+/* AliFemtoThreeVector* tmpTpcEntrancePoint, */
+/* AliFemtoThreeVector* tmpTpcExitPoint, */
+/* AliFemtoThreeVector* tmpPosSample, */
+/* float* tmpZ,float* tmpU,int* tmpSect); */
// For V0 Neg Daugthers TpcEntrance/ExitPoints
- AliFemtoThreeVector* fTpcV0NegPosSample; // Sample of TPC V0 neg
- float* fV0NegZ; // Array of Neg Z cluster positions
- float* fV0NegU; // Array of Neg U cluster positions
- int* fV0NegSect; // Array of Neg cluster sectors
+/* AliFemtoThreeVector* fTpcV0NegPosSample; // Sample of TPC V0 neg */
+/* float* fV0NegZ; // Array of Neg Z cluster positions */
+/* float* fV0NegU; // Array of Neg U cluster positions */
+/* int* fV0NegSect; // Array of Neg cluster sectors */
private:
AliFemtoTrack* fTrack; // copy of the track the particle was formed of, else Null
AliFmPhysicalHelixD fHelix; // Particle trajectory helix
//unsigned long fMap[2];
//int fNhits;
- AliFemtoThreeVector fNominalTpcExitPoint; // Point where particle exits TPC
- AliFemtoThreeVector fNominalTpcEntrancePoint; // Point where particle enters TPC
+/* AliFemtoThreeVector fNominalTpcExitPoint; // Point where particle exits TPC */
+/* AliFemtoThreeVector fNominalTpcEntrancePoint; // Point where particle enters TPC */
AliFemtoHiddenInfo* fHiddenInfo; // Fab private
double fPurity[6]; // Purity variables
double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
fDenominator->Fill(tQinv,weight);
}
+//____________________________
+void AliFemtoQinvCorrFctn::Write(){
+ // Write out neccessary objects
+ fNumerator->Write();
+ fDenominator->Write();
+}
+//______________________________
+TList* AliFemtoQinvCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fNumerator);
+ tOutputList->Add(fDenominator);
+
+ return tOutputList;
+}
TH1D* Denominator();
TH1D* Ratio();
+ virtual TList* GetOutputList();
+ void Write();
+
private:
TH1D* fNumerator; // numerator - real pairs
TH1D* fDenominator; // denominator - mixed pairs
//_________________________
TList* AliFemtoSimpleAnalysis::ListSettings()
{
+ // Collect settings list
TList *tListSettings = new TList();
TList *p1Cut = fFirstParticleCut->ListSettings();
return tListSettings;
}
+
+//_________________________
+TList* AliFemtoSimpleAnalysis::GetOutputList()
+{
+ // Collect the list of output objects
+ // to be written
+ TList *tOutputList = new TList();
+
+ TList *p1Cut = fFirstParticleCut->GetOutputList();
+
+ TListIter nextp1(p1Cut);
+ while (TObject *obj = nextp1.Next()) {
+ tOutputList->Add(obj);
+ }
+
+ if (fSecondParticleCut != fFirstParticleCut) {
+ TList *p2Cut = fSecondParticleCut->GetOutputList();
+
+ TIter nextp2(p2Cut);
+ while (TObject *obj = nextp2()) {
+ tOutputList->Add(obj);
+ }
+ }
+
+ TList *pairCut = fPairCut->GetOutputList();
+
+ TIter nextpair(pairCut);
+ while (TObject *obj = nextpair()) {
+ tOutputList->Add(obj);
+ }
+
+ AliFemtoCorrFctnIterator iter;
+ for (iter=fCorrFctnCollection->begin(); iter!=fCorrFctnCollection->end();iter++){
+ TList *tListCf = (*iter)->GetOutputList();
+
+ TIter nextListCf(tListCf);
+ while (TObject *obj = nextListCf()) {
+ tOutputList->Add(obj);
+ }
+ }
+
+ return tOutputList;
+
+}
bool AnalyzeIdenticalParticles() const;
virtual AliFemtoString Report(); //! returns reports of all cuts applied and correlation functions being done
virtual TList* ListSettings(); // return list of cut settings for the analysis
-
+ virtual TList* GetOutputList(); // Return a TList of objects to be written as output
+
virtual void EventBegin(const AliFemtoEvent* TheEventToBegin); // startup for EbyE
virtual void ProcessEvent(const AliFemtoEvent* EventToProcess);
virtual void EventEnd(const AliFemtoEvent* TheEventToWrapUp); // cleanup for EbyE
fTPCnclsF(0),
fTPCsignalN(0),
fTPCsignalS(0),
+ fSigmaToVertex(0),
fClusters(159),
fShared(159),
+ fNominalTpcEntrancePoint(0,0,0),
+ fNominalTpcExitPoint(0,0,0),
fHiddenInfo(0)
{
// Default constructor
fTPCnclsF(0),
fTPCsignalN(0),
fTPCsignalS(0),
+ fSigmaToVertex(0),
fClusters(159),
fShared(159),
+ fNominalTpcEntrancePoint(0,0,0),
+ fNominalTpcExitPoint(0,0,0),
fHiddenInfo(0)
{
// copy constructor
fTPCnclsF=t.fTPCnclsF;
fTPCsignalN=t.fTPCsignalN;
fTPCsignalS=t.fTPCsignalS;
+ fSigmaToVertex=t.fSigmaToVertex;
fClusters=t.fClusters;
fShared=t.fShared;
+ fNominalTpcEntrancePoint=t.fNominalTpcEntrancePoint;
+ fNominalTpcExitPoint=t.fNominalTpcExitPoint;
if (t.ValidHiddenInfo())
fHiddenInfo = t.GetHiddenInfo()->Clone();
else
fTPCsignalS=aTrack.fTPCsignalS;
fClusters=aTrack.fClusters;
fShared=aTrack.fShared;
+ fNominalTpcEntrancePoint=aTrack.fNominalTpcEntrancePoint;
+ fNominalTpcExitPoint=aTrack.fNominalTpcExitPoint;
fKinkIndexes[0] = aTrack.fKinkIndexes[0];
fKinkIndexes[1] = aTrack.fKinkIndexes[1];
fKinkIndexes[2] = aTrack.fKinkIndexes[2];
void AliFemtoTrack::SetTPCnclsF(const short& TPCnclsF){fTPCnclsF=TPCnclsF;}
void AliFemtoTrack::SetTPCsignalN(const short& TPCsignalN){fTPCsignalN=TPCsignalN;}
void AliFemtoTrack::SetTPCsignalS(const float& TPCsignalS){fTPCsignalS=TPCsignalS;}
+void AliFemtoTrack::SetSigmaToVertex(const float& Sigma){fSigmaToVertex=Sigma;}
short AliFemtoTrack::Charge() const {return fCharge;}
short AliFemtoTrack::TPCnclsF() const{return fTPCnclsF;}
short AliFemtoTrack::TPCsignalN() const{return fTPCsignalN;}
float AliFemtoTrack::TPCsignalS() const{return fTPCsignalS;}
+float AliFemtoTrack::SigmaToVertex() const{return fSigmaToVertex;}
void AliFemtoTrack::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) {fHiddenInfo=aHiddenInfo;}
bool AliFemtoTrack::ValidHiddenInfo() const { if (fHiddenInfo) return true; else return false; }
AliFemtoTrack::~AliFemtoTrack()
{
+ // destructor
if (fHiddenInfo)
delete fHiddenInfo;
// cout << "Deleted track " << this << endl;
void AliFemtoTrack::SetKinkIndexes(int points[3])
{
+ // Transfer the Kink indices
fKinkIndexes[0] = points[0];
fKinkIndexes[1] = points[1];
fKinkIndexes[2] = points[2];
int AliFemtoTrack::KinkIndex(int aIndex) const
{
+ // Return Kink index
if ((aIndex <3) && (aIndex>=0))
return fKinkIndexes[aIndex];
else
return 0;
}
+
+// void AliFemtoTrack::SetXTPC(const AliFemtoThreeVector& aXTPC)
+// {
+// fXTPC = aXTPC;
+// }
+
+// void AliFemtoTrack::SetXTPC(double *aXTPC)
+// {
+// fXTPC.setX(aXTPC[0]);
+// fXTPC.setY(aXTPC[1]);
+// fXTPC.setZ(aXTPC[2]);
+// }
+
+// AliFemtoThreeVector AliFemtoTrack::XTPC() const
+// {
+// return fXTPC;
+// }
+
+const AliFemtoThreeVector& AliFemtoTrack::NominalTpcExitPoint() const
+{
+ return fNominalTpcExitPoint;
+}
+const AliFemtoThreeVector& AliFemtoTrack::NominalTpcEntrancePoint() const
+{
+ return fNominalTpcEntrancePoint;
+}
+
+void AliFemtoTrack::SetNominalTPCEntrancePoint(const AliFemtoThreeVector& aXTPC)
+{
+ fNominalTpcEntrancePoint = aXTPC;
+}
+void AliFemtoTrack::SetNominalTPCEntrancePoint(double *aXTPC)
+{
+ // Store the nominal TPC entrance point
+ fNominalTpcEntrancePoint.setX(aXTPC[0]);
+ fNominalTpcEntrancePoint.setY(aXTPC[1]);
+ fNominalTpcEntrancePoint.setZ(aXTPC[2]);
+}
+
+void AliFemtoTrack::SetNominalTPCExitPoint(const AliFemtoThreeVector& aXTPC)
+{
+ fNominalTpcExitPoint = aXTPC;
+}
+void AliFemtoTrack::SetNominalTPCExitPoint(double *aXTPC)
+{
+ // Store the nominal TPC exit point
+ fNominalTpcExitPoint.setX(aXTPC[0]);
+ fNominalTpcExitPoint.setY(aXTPC[1]);
+ fNominalTpcExitPoint.setZ(aXTPC[2]);
+}
void SetPidProbProton(const float& x);
void SetPidProbMuon(const float& x);
- void SetP(const AliFemtoThreeVector&);
+ void SetP(const AliFemtoThreeVector& p);
void SetPt(const float& x);
- void SetHelix(const AliFmPhysicalHelixD&);
+ void SetHelix(const AliFmPhysicalHelixD& h);
void SetTrackId(const short& s);
void SetFlags(const long int& i);
void SetLabel(const int& i);
AliFemtoHiddenInfo* GetHiddenInfo() const;
/***/
+ const AliFemtoThreeVector& NominalTpcExitPoint() const;
+ const AliFemtoThreeVector& NominalTpcEntrancePoint() const;
+
+ void SetNominalTPCEntrancePoint(const AliFemtoThreeVector& aXTPC);
+ void SetNominalTPCEntrancePoint(double *aXTPC);
+
+ void SetNominalTPCExitPoint(const AliFemtoThreeVector& aXTPC);
+ void SetNominalTPCExitPoint(double *aXTPC);
+ void SetSigmaToVertex(const float& Sigma);
+ float SigmaToVertex() const;
+
//Alice stuff
enum {
kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
AliFemtoThreeVector fP; // track momentum
float fPt; // transverse momenta
AliFmPhysicalHelixD fHelix; // track helix
-
//alice stuff
long int fFlags; //Reconsruction status flags
int fLabel; //Track label
short fTPCnclsF; // number of findable clusters in the TPC
short fTPCsignalN; // number of points used for dEdx
float fTPCsignalS; // RMS of dEdx measurement
+ float fSigmaToVertex; // Distance from track to vertex in sigmas
TBits fClusters; // Cluster per padrow map
TBits fShared; // Sharing per padrow map
+ AliFemtoThreeVector fNominalTpcEntrancePoint; // Nominal track entrance point into TPC
+ AliFemtoThreeVector fNominalTpcExitPoint; // Nominal track exit point from TPC
int fKinkIndexes[3]; // Kink Index list
/* Th stuff */
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoChi2CorrFctn - A correlation function that saves the correlation ///
+/// function as a function of single track quality (chi2/ndof) for its and ///
+/// tpc ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliFemtoChi2CorrFctn.h"
+//#include "AliFemtoHisto.hh"
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoChi2CorrFctn)
+#endif
+
+//____________________________
+AliFemtoChi2CorrFctn::AliFemtoChi2CorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
+ fChi2ITSSUMNumerator(0),
+ fChi2ITSSUMDenominator(0),
+ fChi2TPCSUMNumerator(0),
+ fChi2TPCSUMDenominator(0),
+ fChi2ITSONENumerator(0),
+ fChi2ITSONEDenominator(0),
+ fChi2TPCONENumerator(0),
+ fChi2TPCONEDenominator(0),
+ fSigmaToVertexNumerator(0),
+ fSigmaToVertexDenominator(0)
+{
+ // set up numerator
+ char tTitNum[100] = "NumChi2ITSSUM";
+ strcat(tTitNum,title);
+ fChi2ITSSUMNumerator = new TH2D(tTitNum,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+ // set up denominator
+ char tTitDen[100] = "DenChi2ITSSUM";
+ strcat(tTitDen,title);
+ fChi2ITSSUMDenominator = new TH2D(tTitDen,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+
+ // set up numerator
+ char tTit2Num[100] = "NumChi2TPCSUM";
+ strcat(tTit2Num,title);
+ fChi2TPCSUMNumerator = new TH2D(tTit2Num,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+ // set up denominator
+ char tTit2Den[100] = "DenChi2TPCSUM";
+ strcat(tTit2Den,title);
+ fChi2TPCSUMDenominator = new TH2D(tTit2Den,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+
+ // to enable error bar calculation...
+ fChi2ITSSUMNumerator->Sumw2();
+ fChi2ITSSUMDenominator->Sumw2();
+
+ fChi2TPCSUMNumerator->Sumw2();
+ fChi2TPCSUMDenominator->Sumw2();
+ // set up numerator
+ sprintf(tTitNum,"%s%s","NumChi2ITSONE",title);
+ fChi2ITSONENumerator = new TH2D(tTitNum,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+ // set up denominator
+ sprintf(tTitDen,"%s%s", "DenChi2ITSONE", title);
+ fChi2ITSONEDenominator = new TH2D(tTitDen,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+
+ // set up numerator
+ sprintf(tTit2Num,"%s%s","NumChi2TPCONE",title);
+ fChi2TPCONENumerator = new TH2D(tTit2Num,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+ // set up denominator
+ sprintf(tTit2Den,"%s%s", "DenChi2TPCONE", title);
+ fChi2TPCONEDenominator = new TH2D(tTit2Den,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+
+ // set up numerator
+ sprintf(tTit2Num,"%s%s","NumSigmaToVertex",title);
+ fSigmaToVertexNumerator = new TH2D(tTit2Num,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+ // set up denominator
+ sprintf(tTit2Den,"%s%s", "DenSigmaToVertex", title);
+ fSigmaToVertexDenominator = new TH2D(tTit2Den,title,nbins,QinvLo,QinvHi,200,0.0,6.0);
+
+ // to enable error bar calculation...
+ fChi2ITSONENumerator->Sumw2();
+ fChi2ITSONEDenominator->Sumw2();
+
+ fChi2TPCONENumerator->Sumw2();
+ fChi2TPCONEDenominator->Sumw2();
+}
+
+//____________________________
+AliFemtoChi2CorrFctn::AliFemtoChi2CorrFctn(const AliFemtoChi2CorrFctn& aCorrFctn) :
+ fChi2ITSSUMNumerator(0),
+ fChi2ITSSUMDenominator(0),
+ fChi2TPCSUMNumerator(0),
+ fChi2TPCSUMDenominator(0),
+ fChi2ITSONENumerator(0),
+ fChi2ITSONEDenominator(0),
+ fChi2TPCONENumerator(0),
+ fChi2TPCONEDenominator(0),
+ fSigmaToVertexNumerator(0),
+ fSigmaToVertexDenominator(0)
+{
+ // copy constructor
+ if (aCorrFctn.fChi2ITSSUMNumerator)
+ fChi2ITSSUMNumerator = new TH2D(*aCorrFctn.fChi2ITSSUMNumerator);
+ if (aCorrFctn.fChi2ITSSUMDenominator)
+ fChi2ITSSUMDenominator = new TH2D(*aCorrFctn.fChi2ITSSUMDenominator);
+ if (aCorrFctn.fChi2TPCSUMNumerator)
+ fChi2TPCSUMNumerator = new TH2D(*aCorrFctn.fChi2TPCSUMNumerator);
+ if (aCorrFctn.fChi2TPCSUMDenominator)
+ fChi2TPCSUMDenominator = new TH2D(*aCorrFctn.fChi2TPCSUMDenominator);
+ if (aCorrFctn.fChi2ITSONENumerator)
+ fChi2ITSONENumerator = new TH2D(*aCorrFctn.fChi2ITSONENumerator);
+ if (aCorrFctn.fChi2ITSONEDenominator)
+ fChi2ITSONEDenominator = new TH2D(*aCorrFctn.fChi2ITSONEDenominator);
+ if (aCorrFctn.fChi2TPCONENumerator)
+ fChi2TPCONENumerator = new TH2D(*aCorrFctn.fChi2TPCONENumerator);
+ if (aCorrFctn.fChi2TPCONEDenominator)
+ fChi2TPCONEDenominator = new TH2D(*aCorrFctn.fChi2TPCONEDenominator);
+ if (aCorrFctn.fSigmaToVertexNumerator)
+ fSigmaToVertexNumerator = new TH2D(*aCorrFctn.fSigmaToVertexNumerator);
+ if (aCorrFctn.fSigmaToVertexDenominator)
+ fSigmaToVertexDenominator = new TH2D(*aCorrFctn.fSigmaToVertexDenominator);
+}
+//____________________________
+AliFemtoChi2CorrFctn::~AliFemtoChi2CorrFctn(){
+ // destructor
+ delete fChi2ITSSUMNumerator;
+ delete fChi2ITSSUMDenominator;
+ delete fChi2TPCSUMNumerator;
+ delete fChi2TPCSUMDenominator;
+ delete fChi2ITSONENumerator;
+ delete fChi2ITSONEDenominator;
+ delete fChi2TPCONENumerator;
+ delete fChi2TPCONEDenominator;
+ delete fSigmaToVertexNumerator;
+ delete fSigmaToVertexDenominator;
+}
+//_________________________
+AliFemtoChi2CorrFctn& AliFemtoChi2CorrFctn::operator=(const AliFemtoChi2CorrFctn& aCorrFctn)
+{
+ // assignment operator
+ if (this == &aCorrFctn)
+ return *this;
+
+ if (aCorrFctn.fChi2ITSSUMNumerator)
+ fChi2ITSSUMNumerator = new TH2D(*aCorrFctn.fChi2ITSSUMNumerator);
+ else
+ fChi2ITSSUMNumerator = 0;
+ if (aCorrFctn.fChi2ITSSUMDenominator)
+ fChi2ITSSUMDenominator = new TH2D(*aCorrFctn.fChi2ITSSUMDenominator);
+ else
+ fChi2ITSSUMDenominator = 0;
+ if (aCorrFctn.fChi2TPCSUMNumerator)
+ fChi2TPCSUMNumerator = new TH2D(*aCorrFctn.fChi2TPCSUMNumerator);
+ else
+ fChi2TPCSUMNumerator = 0;
+ if (aCorrFctn.fChi2TPCSUMDenominator)
+ fChi2TPCSUMDenominator = new TH2D(*aCorrFctn.fChi2TPCSUMDenominator);
+ else
+ fChi2TPCSUMDenominator = 0;
+ if (aCorrFctn.fChi2ITSONENumerator)
+ fChi2ITSONENumerator = new TH2D(*aCorrFctn.fChi2ITSONENumerator);
+ else
+ fChi2ITSONENumerator = 0;
+ if (aCorrFctn.fChi2ITSONEDenominator)
+ fChi2ITSONEDenominator = new TH2D(*aCorrFctn.fChi2ITSONEDenominator);
+ else
+ fChi2ITSONEDenominator = 0;
+ if (aCorrFctn.fChi2TPCONENumerator)
+ fChi2TPCONENumerator = new TH2D(*aCorrFctn.fChi2TPCONENumerator);
+ else
+ fChi2TPCONENumerator = 0;
+ if (aCorrFctn.fChi2TPCONEDenominator)
+ fChi2TPCONEDenominator = new TH2D(*aCorrFctn.fChi2TPCONEDenominator);
+ else
+ fChi2TPCONEDenominator = 0;
+ if (aCorrFctn.fSigmaToVertexNumerator)
+ fSigmaToVertexNumerator = new TH2D(*aCorrFctn.fSigmaToVertexNumerator);
+ else
+ fSigmaToVertexNumerator = 0;
+ if (aCorrFctn.fSigmaToVertexDenominator)
+ fSigmaToVertexDenominator = new TH2D(*aCorrFctn.fSigmaToVertexDenominator);
+ else
+ fSigmaToVertexDenominator = 0;
+
+ return *this;
+}
+//_________________________
+void AliFemtoChi2CorrFctn::Finish(){
+ // here is where we should normalize, fit, etc...
+ // we should NOT Draw() the histos (as I had done it below),
+ // since we want to insulate ourselves from root at this level
+ // of the code. Do it instead at root command line with browser.
+ // mShareNumerator->Draw();
+ //mShareDenominator->Draw();
+ //mRatio->Draw();
+
+}
+
+//____________________________
+AliFemtoString AliFemtoChi2CorrFctn::Report(){
+ // create report
+ string stemp = "ITS and TPC quality Correlation Function Report:\n";
+ char ctemp[100];
+ sprintf(ctemp,"Number of entries in numerator:\t%E\n",fChi2ITSSUMNumerator->GetEntries());
+ stemp += ctemp;
+ sprintf(ctemp,"Number of entries in denominator:\t%E\n",fChi2ITSSUMDenominator->GetEntries());
+ stemp += ctemp;
+ // stemp += mCoulombWeight->Report();
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+//____________________________
+void AliFemtoChi2CorrFctn::AddRealPair( AliFemtoPair* pair){
+ // add real (effect) pair
+ double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
+
+ fChi2ITSSUMNumerator->Fill(tQinv,
+ (pair->Track1()->Track()->ITSchi2() +
+ pair->Track2()->Track()->ITSchi2())/
+ (pair->Track1()->Track()->ITSncls() +
+ pair->Track2()->Track()->ITSncls()));
+ fChi2TPCSUMNumerator->Fill(tQinv,
+ (pair->Track1()->Track()->TPCchi2() +
+ pair->Track2()->Track()->TPCchi2())/
+ (pair->Track1()->Track()->TPCncls() +
+ pair->Track2()->Track()->TPCncls()));
+ if ((pair->Track1()->Track()->ITSchi2()/pair->Track1()->Track()->ITSncls()) > (pair->Track2()->Track()->ITSchi2()/pair->Track2()->Track()->ITSncls())) {
+ fChi2ITSONENumerator->Fill(tQinv,
+ (pair->Track1()->Track()->ITSchi2()/
+ pair->Track1()->Track()->ITSncls()));
+ }
+ else {
+ fChi2ITSONENumerator->Fill(tQinv,
+ (pair->Track2()->Track()->ITSchi2()/
+ pair->Track2()->Track()->ITSncls()));
+ }
+ if ((pair->Track1()->Track()->TPCchi2()/pair->Track1()->Track()->TPCncls()) > (pair->Track2()->Track()->TPCchi2()/pair->Track2()->Track()->TPCncls())) {
+ fChi2TPCONENumerator->Fill(tQinv,
+ (pair->Track1()->Track()->TPCchi2()/
+ pair->Track1()->Track()->TPCncls()));
+ }
+ else {
+ fChi2TPCONENumerator->Fill(tQinv,
+ (pair->Track2()->Track()->TPCchi2()/
+ pair->Track2()->Track()->TPCncls()));
+ }
+ if (pair->Track1()->Track()->SigmaToVertex() > pair->Track2()->Track()->SigmaToVertex()) {
+ fSigmaToVertexNumerator->Fill(tQinv,
+ pair->Track1()->Track()->SigmaToVertex());
+ }
+ else {
+ fSigmaToVertexNumerator->Fill(tQinv,
+ pair->Track2()->Track()->SigmaToVertex());
+ }
+}
+//____________________________
+void AliFemtoChi2CorrFctn::AddMixedPair( AliFemtoPair* pair){
+ // add mixed (background) pair
+ double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
+
+ fChi2ITSSUMDenominator->Fill(tQinv,
+ (pair->Track1()->Track()->ITSchi2() +
+ pair->Track2()->Track()->ITSchi2())/
+ (pair->Track1()->Track()->ITSncls() +
+ pair->Track2()->Track()->ITSncls()));
+ fChi2TPCSUMDenominator->Fill(tQinv,
+ (pair->Track1()->Track()->TPCchi2() +
+ pair->Track2()->Track()->TPCchi2())/
+ (pair->Track1()->Track()->TPCncls() +
+ pair->Track2()->Track()->TPCncls()));
+ if ((pair->Track1()->Track()->ITSchi2()/pair->Track1()->Track()->ITSncls()) > (pair->Track2()->Track()->ITSchi2()/pair->Track2()->Track()->ITSncls())) {
+ fChi2ITSONEDenominator->Fill(tQinv,
+ (pair->Track1()->Track()->ITSchi2()/
+ pair->Track1()->Track()->ITSncls()));
+ }
+ else {
+ fChi2ITSONEDenominator->Fill(tQinv,
+ (pair->Track2()->Track()->ITSchi2()/
+ pair->Track2()->Track()->ITSncls()));
+ }
+ if ((pair->Track1()->Track()->TPCchi2()/pair->Track1()->Track()->TPCncls()) > (pair->Track2()->Track()->TPCchi2()/pair->Track2()->Track()->TPCncls())) {
+ fChi2TPCONEDenominator->Fill(tQinv,
+ (pair->Track1()->Track()->TPCchi2()/
+ pair->Track1()->Track()->TPCncls()));
+ }
+ else {
+ fChi2TPCONEDenominator->Fill(tQinv,
+ (pair->Track2()->Track()->TPCchi2()/
+ pair->Track2()->Track()->TPCncls()));
+ }
+ if (pair->Track1()->Track()->SigmaToVertex() > pair->Track2()->Track()->SigmaToVertex()) {
+ fSigmaToVertexDenominator->Fill(tQinv,
+ pair->Track1()->Track()->SigmaToVertex());
+ }
+ else {
+ fSigmaToVertexDenominator->Fill(tQinv,
+ pair->Track2()->Track()->SigmaToVertex());
+ }
+}
+
+
+void AliFemtoChi2CorrFctn::WriteHistos()
+{
+ // Write out result histograms
+ fChi2ITSSUMNumerator->Write();
+ fChi2ITSSUMDenominator->Write();
+ fChi2TPCSUMNumerator->Write();
+ fChi2TPCSUMDenominator->Write();
+ fChi2ITSONENumerator->Write();
+ fChi2ITSONEDenominator->Write();
+ fChi2TPCONENumerator->Write();
+ fChi2TPCONEDenominator->Write();
+ fSigmaToVertexNumerator->Write();
+ fSigmaToVertexDenominator->Write();
+
+}
+
+TList* AliFemtoChi2CorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fChi2ITSSUMNumerator);
+ tOutputList->Add(fChi2ITSSUMDenominator);
+ tOutputList->Add(fChi2TPCSUMNumerator);
+ tOutputList->Add(fChi2TPCSUMDenominator);
+ tOutputList->Add(fChi2ITSONENumerator);
+ tOutputList->Add(fChi2ITSONEDenominator);
+ tOutputList->Add(fChi2TPCONENumerator);
+ tOutputList->Add(fChi2TPCONEDenominator);
+ tOutputList->Add(fSigmaToVertexNumerator);
+ tOutputList->Add(fSigmaToVertexDenominator);
+
+ return tOutputList;
+
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoChi2CorrFctn - A correlation function that saves the correlation ///
+/// function as a function of single track quality (chi2/ndof) for its and ///
+/// tpc ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef ALIFEMTOCHI2CORRFCTN_H
+#define ALIFEMTOCHI2CORRFCTN_H
+
+#include "TH1D.h"
+#include "TH2D.h"
+#include "AliFemtoCorrFctn.h"
+
+class AliFemtoChi2CorrFctn : public AliFemtoCorrFctn {
+public:
+ AliFemtoChi2CorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi);
+ AliFemtoChi2CorrFctn(const AliFemtoChi2CorrFctn& aCorrFctn);
+ virtual ~AliFemtoChi2CorrFctn();
+
+ AliFemtoChi2CorrFctn& operator=(const AliFemtoChi2CorrFctn& aCorrFctn);
+
+ virtual AliFemtoString Report();
+ virtual void AddRealPair(AliFemtoPair* aPair);
+ virtual void AddMixedPair(AliFemtoPair* aPair);
+
+ virtual void Finish();
+
+ void WriteHistos();
+ virtual TList* GetOutputList();
+private:
+
+ TH2D *fChi2ITSSUMNumerator; // Numerator as a function of ITS quality sum for the pair
+ TH2D *fChi2ITSSUMDenominator; // Denominator as a function of ITS quality sum for the pair
+
+ TH2D *fChi2TPCSUMNumerator; // Numerator as a function of TPC quality sum for the pair
+ TH2D *fChi2TPCSUMDenominator; // Denominator as a function of TPC quality sum for the pair
+
+ TH2D *fChi2ITSONENumerator; // Numerator as a function of ITS quality for the worse track
+ TH2D *fChi2ITSONEDenominator; // Denominator as a function of ITS quality for the worse track
+
+ TH2D *fChi2TPCONENumerator; // Numerator as a function of TPC quality for the worse track
+ TH2D *fChi2TPCONEDenominator; // Denominator as a function of TPC quality for the worse track
+
+ TH2D *fSigmaToVertexNumerator; // Numerator as a function of sigma to vertex
+ TH2D *fSigmaToVertexDenominator; // Numerator as a function of sigma to vertex
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoChi2CorrFctn, 1)
+#endif
+};
+
+
+#endif
+
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoCutMonitorParticleMomRes - the cut monitor for particles to study //
+// the difference between reconstructed and true momentum //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoCutMonitorParticleMomRes.h"
+#include <TH1D.h>
+#include <TH2D.h>
+#include <TH3D.h>
+#include <TList.h>
+#include "AliFemtoModelHiddenInfo.h"
+
+AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes():
+ fMomRes3D(0),
+ fMomResXvsP(0),
+ fMomResYvsP(0),
+ fMomResZvsP(0),
+ fImpactXY(0),
+ fImpactZ(0),
+ fSigma(0),
+ fMass(0.13957)
+{
+ // Default constructor
+ fMomRes3D = new TH3D("MomRes3D", "Momentum resolution", 100, -0.05, 0.05, 100, -0.05, 0.05, 100, -0.05, 0.05);
+ fMomResXvsP = new TH2D("MomResXvsP", "X momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ fMomResYvsP = new TH2D("MomResYvsP", "Y momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ fMomResZvsP = new TH2D("MomResZvsP", "Z momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ fImpactXY = new TH2D("ImpactXY", "XY impact parameter vs P", 100, 0.1, 2.0, 200, -1.0, 1.0);
+ fImpactZ = new TH2D("ImpactZ", "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -1.0, 1.0);
+ fSigma = new TH2D("Sigma", "Sigma to vertex vs P" , 100, 0.1, 2.0, 200, -5.0, 5.0);
+}
+
+AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes(const char *aName, float aMass):
+ fMomRes3D(0),
+ fMomResXvsP(0),
+ fMomResYvsP(0),
+ fMomResZvsP(0),
+ fImpactXY(0),
+ fImpactZ(0),
+ fSigma(0),
+ fMass(aMass)
+{
+ // Normal constructor
+ char name[200];
+ snprintf(name, 200, "MomRes3D%s", aName);
+ fMomRes3D = new TH3D(name, "Momentum resolution", 100, -0.05, 0.05, 100, -0.05, 0.05, 100, -0.05, 0.05);
+ snprintf(name, 200, "MomResXvsP%s", aName);
+ fMomResXvsP = new TH2D(name, "X momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ snprintf(name, 200, "MomResYvsP%s", aName);
+ fMomResYvsP = new TH2D(name, "Y momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ snprintf(name, 200, "MomResZvsP%s", aName);
+ fMomResZvsP = new TH2D(name, "Z momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
+ snprintf(name, 200, "ImpactXY%s", aName);
+ fImpactXY = new TH2D(name, "XY impact parameter vs P", 100, 0.1, 2.0, 200, -1.0, 1.0);
+ snprintf(name, 200, "ImpactZ%s", aName);
+ fImpactZ = new TH2D(name, "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -1.0, 1.0);
+ snprintf(name, 200, "Sigma%s", aName);
+ fSigma = new TH2D(name, "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -5.0, 5.0);
+}
+
+AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes(const AliFemtoCutMonitorParticleMomRes &aCut):
+ fMomRes3D(0),
+ fMomResXvsP(0),
+ fMomResYvsP(0),
+ fMomResZvsP(0),
+ fImpactXY(0),
+ fImpactZ(0),
+ fSigma(0),
+ fMass(0.13957)
+{
+ // copy constructor
+ if (fMomRes3D) delete fMomRes3D;
+ fMomRes3D = new TH3D(*aCut.fMomRes3D);
+ if (fMomResXvsP) delete fMomResXvsP;
+ fMomResXvsP = new TH2D(*aCut.fMomResXvsP);
+ if (fMomResYvsP) delete fMomResYvsP;
+ fMomResYvsP = new TH2D(*aCut.fMomResYvsP);
+ if (fMomResZvsP) delete fMomResZvsP;
+ fMomResZvsP = new TH2D(*aCut.fMomResZvsP);
+ if (fImpactXY) delete fImpactXY;
+ fImpactXY = new TH2D(*aCut.fImpactXY);
+ if (fImpactZ) delete fImpactZ;
+ fImpactZ = new TH2D(*aCut.fImpactZ);
+ if (fSigma) delete fSigma;
+ fSigma = new TH2D(*aCut.fSigma);
+ fMass = aCut.fMass;
+}
+
+AliFemtoCutMonitorParticleMomRes::~AliFemtoCutMonitorParticleMomRes()
+{
+ // Destructor
+ delete fMomRes3D;
+ delete fMomResXvsP;
+ delete fMomResYvsP;
+ delete fMomResZvsP;
+ delete fImpactXY;
+ delete fImpactZ;
+ delete fSigma;
+}
+
+AliFemtoCutMonitorParticleMomRes& AliFemtoCutMonitorParticleMomRes::operator=(const AliFemtoCutMonitorParticleMomRes& aCut)
+{
+ // assignment operator
+ if (this == &aCut)
+ return *this;
+
+ if (fMomRes3D) delete fMomRes3D;
+ fMomRes3D = new TH3D(*aCut.fMomRes3D);
+ if (fMomResXvsP) delete fMomResXvsP;
+ fMomResXvsP = new TH2D(*aCut.fMomResXvsP);
+ if (fMomResYvsP) delete fMomResYvsP;
+ fMomResYvsP = new TH2D(*aCut.fMomResYvsP);
+ if (fMomResZvsP) delete fMomResZvsP;
+ fMomResZvsP = new TH2D(*aCut.fMomResZvsP);
+ if (fImpactXY) delete fImpactXY;
+ fImpactXY = new TH2D(*aCut.fImpactXY);
+ if (fImpactZ) delete fImpactZ;
+ fImpactZ = new TH2D(*aCut.fImpactZ);
+ if (fSigma) delete fSigma;
+ fSigma = new TH2D(*aCut.fSigma);
+
+ return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorParticleMomRes::Report(){
+ // Prepare report from the execution
+ string stemp = "*** AliFemtoCutMonitorParticleMomRes report";
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+
+void AliFemtoCutMonitorParticleMomRes::Fill(const AliFemtoTrack* aTrack)
+{
+ AliFemtoModelHiddenInfo *tInf = ( AliFemtoModelHiddenInfo *) aTrack->GetHiddenInfo();
+ fMomRes3D->Fill(tInf->GetTrueMomentum()->x() - aTrack->P().x(),
+ tInf->GetTrueMomentum()->y() - aTrack->P().y(),
+ tInf->GetTrueMomentum()->z() - aTrack->P().z());
+
+ fMomResXvsP->Fill(aTrack->P().mag(),
+ tInf->GetTrueMomentum()->x() - aTrack->P().x());
+ fMomResYvsP->Fill(aTrack->P().mag(),
+ tInf->GetTrueMomentum()->y() - aTrack->P().y());
+ fMomResZvsP->Fill(aTrack->P().mag(),
+ tInf->GetTrueMomentum()->z() - aTrack->P().z());
+ fImpactXY->Fill(aTrack->P().mag(),
+ aTrack->ImpactD());
+ fImpactZ->Fill(aTrack->P().mag(),
+ aTrack->ImpactZ());
+ fSigma->Fill(aTrack->P().mag(),
+ aTrack->SigmaToVertex());
+}
+
+void AliFemtoCutMonitorParticleMomRes::Write()
+{
+ // Write out the relevant histograms
+ fMomRes3D->Write();
+ fMomResXvsP->Write();
+ fMomResYvsP->Write();
+ fMomResZvsP->Write();
+ fImpactXY->Write();
+ fImpactZ->Write();
+ fSigma->Write();
+}
+
+TList *AliFemtoCutMonitorParticleMomRes::GetOutputList()
+{
+ TList *tOutputList = new TList();
+ tOutputList->Add(fMomRes3D);
+ tOutputList->Add(fMomResXvsP);
+ tOutputList->Add(fMomResYvsP);
+ tOutputList->Add(fMomResZvsP);
+ tOutputList->Add(fImpactXY);
+ tOutputList->Add(fImpactZ);
+ tOutputList->Add(fSigma);
+
+ return tOutputList;
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoCutMonitorParticleMomRes - the cut monitor for particles to study ///
+/// the difference between reconstructed and true momentum ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorParticleMomRes_hh
+#define AliFemtoCutMonitorParticleMomRes_hh
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; // Gael 12/04/02
+class TH1D;
+class TH2D;
+class TH3D;
+class TList;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorParticleMomRes : public AliFemtoCutMonitor{
+
+public:
+ AliFemtoCutMonitorParticleMomRes();
+ AliFemtoCutMonitorParticleMomRes(const char *aName, float aMass);
+ AliFemtoCutMonitorParticleMomRes(const AliFemtoCutMonitorParticleMomRes &aCut);
+ virtual ~AliFemtoCutMonitorParticleMomRes();
+
+ AliFemtoCutMonitorParticleMomRes& operator=(const AliFemtoCutMonitorParticleMomRes& aCut);
+
+ virtual AliFemtoString Report();
+ virtual void Fill(const AliFemtoTrack* aTrack);
+ void Write();
+
+ virtual TList *GetOutputList();
+
+private:
+ TH3D *fMomRes3D; // 3D momentum resolution
+ TH2D *fMomResXvsP; // X resolution vs momentum
+ TH2D *fMomResYvsP; // Y resolution vs momentum
+ TH2D *fMomResZvsP; // Z resolution vs momentum
+ TH2D *fImpactXY; // XY impact parameter
+ TH2D *fImpactZ; // Z impact parameter
+ TH2D *fSigma; // Sigma to vertex vs momentum
+ float fMass; // Mass hypothesis
+};
+
+#endif
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoCutMonitorParticleYPt - the cut monitor for particles to study //
+// the difference between reconstructed and true momentum //
+// //
+////////////////////////////////////////////////////////////////////////////////
+#include <TH1D.h>
+#include <TH2D.h>
+#include "AliFemtoCutMonitorParticleYPt.h"
+#include "AliFemtoModelHiddenInfo.h"
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt():
+ fYPt(0),
+ fMass(0.13957)
+{
+ // Default constructor
+ fYPt = new TH2D("YPt", "Rapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
+}
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const char *aName, float aMass):
+ fYPt(0),
+ fMass(aMass)
+{
+ // 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);
+}
+
+AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut):
+ fYPt(0),
+ fMass(0.13957)
+{
+ // copy constructor
+ if (fYPt) delete fYPt;
+ fYPt = new TH2D(*aCut.fYPt);
+ fMass = aCut.fMass;
+}
+
+AliFemtoCutMonitorParticleYPt::~AliFemtoCutMonitorParticleYPt()
+{
+ // Destructor
+ delete fYPt;
+}
+
+AliFemtoCutMonitorParticleYPt& AliFemtoCutMonitorParticleYPt::operator=(const AliFemtoCutMonitorParticleYPt& aCut)
+{
+ // assignment operator
+ if (this == &aCut)
+ return *this;
+
+ if (fYPt) delete fYPt;
+ fYPt = new TH2D(*aCut.fYPt);
+
+ return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorParticleYPt::Report(){
+ // Prepare report from the execution
+ string stemp = "*** AliFemtoCutMonitorParticleYPt report";
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+
+void AliFemtoCutMonitorParticleYPt::Fill(const AliFemtoTrack* aTrack)
+{
+ // Fill in the monitor histograms with the values from the current track
+ float tEnergy = ::sqrt(aTrack->P().mag2()+fMass*fMass);
+ float tRapidity = 0.5*::log((tEnergy+aTrack->P().z())/(tEnergy-aTrack->P().z()));
+ float tPt = ::sqrt((aTrack->P().x())*(aTrack->P().x())+(aTrack->P().y())*(aTrack->P().y()));
+ fYPt->Fill(tRapidity, tPt);
+}
+
+void AliFemtoCutMonitorParticleYPt::Write()
+{
+ // Write out the relevant histograms
+ fYPt->Write();
+}
+
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoCutMonitorParticleYPt - the cut monitor for particles to study ///
+/// the difference between reconstructed and true momentum ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorParticleYPt_hh
+#define AliFemtoCutMonitorParticleYPt_hh
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; // Gael 12/04/02
+class TH1D;
+class TH2D;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorParticleYPt : public AliFemtoCutMonitor{
+
+public:
+ AliFemtoCutMonitorParticleYPt();
+ AliFemtoCutMonitorParticleYPt(const char *aName, float aMass);
+ AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut);
+ virtual ~AliFemtoCutMonitorParticleYPt();
+
+ AliFemtoCutMonitorParticleYPt& operator=(const AliFemtoCutMonitorParticleYPt& aCut);
+
+ virtual AliFemtoString Report();
+ virtual void Fill(const AliFemtoTrack* aTrack);
+ void Write();
+
+private:
+ TH2D *fYPt; // Rapidity vs. Pt monitor
+ float fMass; // Mass hypothesis
+};
+
+#endif
fStatus(0),
fminTPCclsF(0),
fminITScls(0),
+ fMaxITSchiNdof(1000.0),
+ fMaxTPCchiNdof(1000.0),
+ fMaxSigmaToVertex(1000.0),
fNTracksPassed(0),
fNTracksFailed(0),
fRemoveKinks(kFALSE),
}
}
+ if (fRemoveKinks) {
+ if ((track->KinkIndex(0)) || (track->KinkIndex(1)) || (track->KinkIndex(2)))
+ return false;
+ }
if (fminTPCclsF>track->TPCnclsF())
{
//cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
return false;
}
+ if (fminTPCncls>track->TPCncls())
+ {
+ //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
+ return false;
+ }
if (fminITScls>track->ITSncls())
{
//cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
return false;
}
+ if (fMaxSigmaToVertex < track->SigmaToVertex()) {
+ return false;
+ }
+
+ if (track->ITSncls() > 0)
+ if ((track->ITSchi2()/track->ITSncls()) > fMaxITSchiNdof) {
+ return false;
+ }
+
+ if (track->TPCncls() > 0)
+ if ((track->TPCchi2()/track->TPCncls()) > fMaxTPCchiNdof) {
+ return false;
+ }
+
if (fLabel)
{
//cout<<"labels"<<endl;
//cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
return false;
}
- if (fRemoveKinks) {
- if ((track->KinkIndex(0)) || (track->KinkIndex(1)) || (track->KinkIndex(2)))
- return false;
- }
if (fMostProbable) {
tMost[0] = track->PidProbElectron()*PidFractionElectron(track->P().mag());
tListSetttings->AddLast(new TObjString(buf));
snprintf(buf, 200, "AliFemtoESDTrackCut.removekinks=%i", fRemoveKinks);
tListSetttings->AddLast(new TObjString(buf));
+ snprintf(buf, 200, "AliFemtoESDTrackCut.maxitschindof=%lf", fMaxITSchiNdof);
+ tListSetttings->AddLast(new TObjString(buf));
+ snprintf(buf, 200, "AliFemtoESDTrackCut.maxtpcchindof=%lf", fMaxTPCchiNdof);
+ tListSetttings->AddLast(new TObjString(buf));
+ snprintf(buf, 200, "AliFemtoESDTrackCut.maxsigmatovertex=%lf", fMaxSigmaToVertex);
+ tListSetttings->AddLast(new TObjString(buf));
if (fMostProbable) {
if (fMostProbable == 2)
snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Pion");
virtual AliFemtoString Report();
virtual TList *ListSettings();
+ virtual AliFemtoParticleType Type(){return hbtTrack;}
void SetPt(const float& lo, const float& hi);
void SetRapidity(const float& lo, const float& hi);
void SetLabel(const bool& flag);
void SetStatus(const long& w);
void SetminTPCclsF(const short& s);
+ void SetminTPCncls(const short& s);
void SetminITScls(const int& s);
void SetRemoveKinks(const bool& flag);
+ void SetMaxITSChiNdof(const float& maxchi);
+ void SetMaxTPCChiNdof(const float& maxchi);
+ void SetMaxSigmaToVertex(const float& maxsig);
void SetMostProbablePion();
void SetMostProbableKaon();
void SetMostProbableProton();
bool fLabel; // if true label<0 will not pass throught
long fStatus; // staus flag
short fminTPCclsF; // min number of findable clusters in the TPC
+ short fminTPCncls; // min number of clusters in the TPC
int fminITScls; // min number of clusters assigned in the ITS
+ float fMaxITSchiNdof; // maximum allowed chi2/ndof for ITS clusters
+ float fMaxTPCchiNdof; // maximum allowed chi2/ndof for TPC clusters
+ float fMaxSigmaToVertex; // maximum allowed sigma to primary vertex
long fNTracksPassed; // passed tracks count
long fNTracksFailed; // failed tracks count
bool fRemoveKinks; // if true particles with any kink label will not pass
inline void AliFemtoESDTrackCut::SetLabel(const bool& flag){fLabel=flag;}
inline void AliFemtoESDTrackCut::SetStatus(const long& status){fStatus=status;}
inline void AliFemtoESDTrackCut::SetminTPCclsF(const short& minTPCclsF){fminTPCclsF=minTPCclsF;}
+inline void AliFemtoESDTrackCut::SetminTPCncls(const short& s){fminTPCncls=s;}
inline void AliFemtoESDTrackCut::SetminITScls(const int& minITScls){fminITScls=minITScls;}
inline void AliFemtoESDTrackCut::SetMostProbablePion() { fMostProbable = 2; }
inline void AliFemtoESDTrackCut::SetMostProbableKaon() { fMostProbable = 3; }
inline void AliFemtoESDTrackCut::SetMostProbableProton() { fMostProbable = 4; }
inline void AliFemtoESDTrackCut::SetNoMostProbable() { fMostProbable = 0; }
+inline void AliFemtoESDTrackCut::SetMaxITSChiNdof(const float& maxchi) { fMaxITSchiNdof = maxchi; }
+inline void AliFemtoESDTrackCut::SetMaxTPCChiNdof(const float& maxchi) { fMaxTPCchiNdof = maxchi; }
+inline void AliFemtoESDTrackCut::SetMaxSigmaToVertex(const float& maxsig) { fMaxSigmaToVertex = maxsig; }
#endif
#include "AliESDtrack.h"
#include "AliESDVertex.h"
#include "AliStack.h"
-#include "AliAODParticle.h"
+//#include "AliAODParticle.h"
#include "TParticle.h"
//#include "TSystem.h"
#include "AliFemtoEvent.h"
+#include "TMath.h"
+
ClassImp(AliFemtoEventReaderESDKine)
#if !(ST_NO_NAMESPACES)
trackCopy->SetTPCnclsF(esdtrack->GetTPCNclsF());
trackCopy->SetTPCsignalN((short)esdtrack->GetTPCsignalN()); //due to bug in aliesdtrack class
trackCopy->SetTPCsignalS(esdtrack->GetTPCsignalSigma());
+ trackCopy->SetSigmaToVertex(GetSigmaToVertex(esdtrack));
trackCopy->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
+ double pvrt[3];
+ fEvent->GetPrimaryVertex()->GetXYZ(pvrt);
+
+ double xtpc[3];
+ esdtrack->GetInnerXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCEntrancePoint(xtpc);
+
+ esdtrack->GetOuterXYZ(xtpc);
+ xtpc[2] -= pvrt[2];
+ trackCopy->SetNominalTPCExitPoint(xtpc);
+
+ int indexes[3];
+ for (int ik=0; ik<3; ik++) {
+ indexes[ik] = esdtrack->GetKinkIndex(ik);
+ }
+ trackCopy->SetKinkIndexes(indexes);
+
// Fill the hidden information with the simulated data
TParticle *tPart = tStack->Particle(TMath::Abs(esdtrack->GetLabel()));
- AliAODParticle* tParticle= new AliAODParticle(*tPart,i);
+ // AliAODParticle* tParticle= new AliAODParticle(*tPart,i);
AliFemtoModelHiddenInfo *tInfo = new AliFemtoModelHiddenInfo();
- tInfo->SetPDGPid(tParticle->GetMostProbable());
- tInfo->SetTrueMomentum(tParticle->Px(), tParticle->Py(), tParticle->Pz());
- Double_t mass2 = (tParticle->E()*tParticle->E() -
- tParticle->Px()*tParticle->Px() -
- tParticle->Py()*tParticle->Py() -
- tParticle->Pz()*tParticle->Pz());
+ tInfo->SetPDGPid(tPart->GetPdgCode());
+ tInfo->SetTrueMomentum(tPart->Px(), tPart->Py(), tPart->Pz());
+ Double_t mass2 = (tPart->Energy() *tPart->Energy() -
+ tPart->Px()*tPart->Px() -
+ tPart->Py()*tPart->Py() -
+ tPart->Pz()*tPart->Pz());
if (mass2>0.0)
tInfo->SetMass(TMath::Sqrt(mass2));
else
tInfo->SetMass(0.0);
+ tInfo->SetEmissionPoint(tPart->Vx()*1e13, tPart->Vy()*1e13, tPart->Vz()*1e13, tPart->T()*1e13*300000);
trackCopy->SetHiddenInfo(tInfo);
//decision if we want this track
}
return hbtEvent;
}
+//____________________________________________________________________
+Float_t AliFemtoEventReaderESDKine::GetSigmaToVertex(const AliESDtrack* esdTrack)
+{
+ // Calculates the number of sigma to the vertex.
+
+ Float_t b[2];
+ Float_t bRes[2];
+ Float_t bCov[3];
+ esdTrack->GetImpactParameters(b,bCov);
+// if (bCov[0]<=0 || bCov[2]<=0) {
+// AliDebug(1, "Estimated b resolution lower or equal zero!");
+// bCov[0]=0; bCov[2]=0;
+// }
+ bRes[0] = TMath::Sqrt(bCov[0]);
+ bRes[1] = TMath::Sqrt(bCov[2]);
+
+ // -----------------------------------
+ // How to get to a n-sigma cut?
+ //
+ // The accumulated statistics from 0 to d is
+ //
+ // -> Erf(d/Sqrt(2)) for a 1-dim gauss (d = n_sigma)
+ // -> 1 - Exp(-d**2) for a 2-dim gauss (d*d = dx*dx + dy*dy != n_sigma)
+ //
+ // It means that for a 2-dim gauss: n_sigma(d) = Sqrt(2)*ErfInv(1 - Exp((-x**2)/2)
+ // Can this be expressed in a different way?
+
+ if (bRes[0] == 0 || bRes[1] ==0)
+ return -1;
+
+ Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
+
+ // stupid rounding problem screws up everything:
+ // if d is too big, TMath::Exp(...) gets 0, and TMath::ErfInverse(1) that should be infinite, gets 0 :(
+ if (TMath::Exp(-d * d / 2) < 1e-10)
+ return 1000;
+
+ d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
+ return d;
+}
#include <string>
#include <vector>
#include "TChain.h"
+#include "AliESDtrack.h"
#include "AliESDEvent.h"
#include <list>
#include "AliRunLoader.h"
AliESDEvent* fEvent; // ESD event
AliRunLoader* fRunLoader; // Run loader for kine reading
+ Float_t GetSigmaToVertex(const AliESDtrack* esdTrack);
+
#ifdef __ROOT__
ClassDef(AliFemtoEventReaderESDKine, 1)
#endif
fNumerator3DTrue(0),
fNumerator3DFake(0),
fDenominator3D(0),
- fQinvHisto(0)
+ fQinvHisto(0),
+ fPairCut(0)
{
-
// set up true numerator
- char TitNumT[100] = "Num3DTrue";
- strcat(TitNumT,title);
- fNumerator3DTrue = new TH3D(TitNumT,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
+ char tTitNumT[100] = "Num3DTrue";
+ strcat(tTitNumT,title);
+ fNumerator3DTrue = new TH3D(tTitNumT,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
// set up fake numerator
- char TitNumF[100] = "Num3DFake";
- strcat(TitNumF,title);
- fNumerator3DFake = new TH3D(TitNumF,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
+ char tTitNumF[100] = "Num3DFake";
+ strcat(tTitNumF,title);
+ fNumerator3DFake = new TH3D(tTitNumF,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
// set up denominator
- char TitDen[100] = "Den3D";
- strcat(TitDen,title);
- fDenominator3D = new TH3D(TitDen,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
+ char tTitDen[100] = "Den3D";
+ strcat(tTitDen,title);
+ fDenominator3D = new TH3D(tTitDen,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
// set up ave qInv
- char TitQinv[100] = "Qinv";
- strcat(TitQinv,title);
- fQinvHisto = new TH3D(TitQinv,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
+ char tTitQinv[100] = "Qinv";
+ strcat(tTitQinv,title);
+ fQinvHisto = new TH3D(tTitQinv,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
// to enable error bar calculation...
fNumerator3DTrue->Sumw2();
fNumerator3DTrue(0),
fNumerator3DFake(0),
fDenominator3D(0),
- fQinvHisto(0)
+ fQinvHisto(0),
+ fPairCut(0)
{
+ // Copy constructor
fNumerator3DTrue = new TH3D(*aCorrFctn.fNumerator3DTrue);
fNumerator3DFake = new TH3D(*aCorrFctn.fNumerator3DFake);
fDenominator3D = new TH3D(*aCorrFctn.fDenominator3D);
fQinvHisto = new TH3D(*aCorrFctn.fQinvHisto);
+ fPairCut = aCorrFctn.fPairCut->Clone();
}
//____________________________
AliFemtoModelBPLCMSCorrFctn::~AliFemtoModelBPLCMSCorrFctn()
{
+ // destructor
if (fNumeratorTrue) delete fNumeratorTrue;
if (fNumeratorFake) delete fNumeratorFake;
if (fDenominator) delete fDenominator;
delete fNumerator3DFake;
delete fDenominator3D;
delete fQinvHisto;
+ if (fPairCut) delete fPairCut;
}
//_________________________
AliFemtoModelBPLCMSCorrFctn& AliFemtoModelBPLCMSCorrFctn::operator=(const AliFemtoModelBPLCMSCorrFctn& aCorrFctn)
{
+ // Assignment operator
if (this == &aCorrFctn)
return *this;
if (fNumerator3DTrue) delete fNumerator3DTrue;
fDenominator3D = new TH3D(*aCorrFctn.fDenominator3D);
if (fQinvHisto) delete fQinvHisto;
fQinvHisto = new TH3D(*aCorrFctn.fQinvHisto);
+ fPairCut = aCorrFctn.fPairCut->Clone();
return *this;
}
//_________________________
void AliFemtoModelBPLCMSCorrFctn::Write(){
+ // Write out data histograms
AliFemtoModelCorrFctn::Write();
fNumerator3DTrue->Write();
fNumerator3DFake->Write();
fDenominator3D->Write();
fQinvHisto->Write();
}
+//________________________
+TList* AliFemtoModelBPLCMSCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
+
+ tOutputList->Add(fNumerator3DTrue);
+ tOutputList->Add(fNumerator3DFake);
+ tOutputList->Add(fDenominator3D);
+ tOutputList->Add(fQinvHisto);
+
+ return tOutputList;
+}
//_________________________
void AliFemtoModelBPLCMSCorrFctn::Finish(){
//____________________________
AliFemtoString AliFemtoModelBPLCMSCorrFctn::Report(){
+ // Prepare a report from the execution
string stemp = "LCMS Frame Bertsch-Pratt 3D Model Correlation Function Report:\n";
char ctemp[100];
sprintf(ctemp,"Number of entries in numerator:\t%E\n",fNumeratorTrue->GetEntries());
return returnThis;
}
//____________________________
-void AliFemtoModelBPLCMSCorrFctn::AddRealPair( AliFemtoPair* pair){
+void AliFemtoModelBPLCMSCorrFctn::AddRealPair( AliFemtoPair* pair)
+{
+ // Store a real pair in numerator
+ if (fPairCut){
+ if (!(fPairCut->Pass(pair))) return;
+ }
+
Double_t weight = fManager->GetWeight(pair);
double qOut = fabs(pair->QOutCMS());
}
//____________________________
void AliFemtoModelBPLCMSCorrFctn::AddMixedPair( AliFemtoPair* pair){
+ // store mixed pair in denominator
+ if (fPairCut){
+ if (!(fPairCut->Pass(pair))) return;
+ }
+
Double_t weight = fManager->GetWeight(pair);
double qOut = fabs(pair->QOutCMS());
return tCopy;
}
+
+void AliFemtoModelBPLCMSCorrFctn::SetSpecificPairCut(AliFemtoPairCut* aCut)
+{
+ fPairCut = aCut;
+}
/// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
/// ///
////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoModelBPLCMSCorrFctn_hh
-#define AliFemtoModelBPLCMSCorrFctn_hh
+#ifndef ALIFEMTOMODELBPLCMSCORRFCTN_H
+#define ALIFEMTOMODELBPLCMSCORRFCTN_H
#include "AliFemtoCorrFctn.h"
#include "AliFemtoModelCorrFctn.h"
AliFemtoModelBPLCMSCorrFctn& operator=(const AliFemtoModelBPLCMSCorrFctn& aCorrFctn);
virtual AliFemtoString Report();
- virtual void AddRealPair(AliFemtoPair*);
- virtual void AddMixedPair(AliFemtoPair*);
+ virtual void AddRealPair(AliFemtoPair* pair);
+ virtual void AddMixedPair(AliFemtoPair* pair);
virtual void Finish();
virtual void Write();
+ virtual TList* GetOutputList();
+
+ void SetSpecificPairCut(AliFemtoPairCut* aCut);
virtual AliFemtoModelCorrFctn* Clone();
TH3D* fQinvHisto; // Averag qinv histogram
+ AliFemtoPairCut* fPairCut; //! this is a PairCut specific to THIS CorrFctn, not the Analysis
+
#ifdef __ROOT__
ClassDef(AliFemtoModelBPLCMSCorrFctn, 1)
#endif
AliFemtoModelCorrFctn::Write();
}
+//________________________
+TList* AliFemtoModelCorrFctnSource::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
+
+ tOutputList->Add(fHistROut);
+ tOutputList->Add(fHistRSide);
+ tOutputList->Add(fHistRLong);
+ tOutputList->Add(fHistRStar);
+ tOutputList->Add(fHistdNdR);
+
+ return tOutputList;
+}
//_______________________
AliFemtoModelCorrFctn* AliFemtoModelCorrFctnSource::Clone()
{
virtual void AddMixedPair(AliFemtoPair* aPir);
virtual void Write();
+ virtual TList* GetOutputList();
virtual AliFemtoModelCorrFctn* Clone();
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelCorrFctnTrueQ - the class for correlation function which ///
+/// uses the model framework and weight generation and saves the generated ///
+/// emission source ///
+/// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifdef __ROOT__
+ ClassImp(AliFemtoModelCorrFctnTrueQ, 1)
+#endif
+
+#include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
+#include "AliFemtoModelHiddenInfo.h"
+#include "AliFemtoModelCorrFctnTrueQ.h"
+
+//_______________________
+AliFemtoModelCorrFctnTrueQ::AliFemtoModelCorrFctnTrueQ():
+ AliFemtoModelCorrFctn(),
+ fTrueNum(0),
+ fTrueDen(0)
+{
+ // default constructor
+ char buf[100];
+ char title[100] = "CFTrueQ";
+ sprintf(buf, "%sNum", title);
+ fTrueNum = new TH1D(buf,buf,100,0.0,0.4);
+ sprintf(buf, "%sDen", title);
+ fTrueDen = new TH1D(buf,buf,100,0.0,0.4);
+
+ fTrueNum->Sumw2();
+ fTrueDen->Sumw2();
+}
+//_______________________
+AliFemtoModelCorrFctnTrueQ::AliFemtoModelCorrFctnTrueQ(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
+ AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
+ fTrueNum(0),
+ fTrueDen(0)
+{
+ // basic constructor
+ char buf[100];
+ sprintf(buf, "%sTrueQNum", title);
+ fTrueNum = new TH1D(buf,buf,aNbins,aQinvLo,aQinvHi);
+ sprintf(buf, "%sTrueQDen", title);
+ fTrueDen = new TH1D(buf,buf,aNbins,aQinvLo,aQinvHi);
+
+ fTrueNum->Sumw2();
+ fTrueDen->Sumw2();
+}
+//_______________________
+AliFemtoModelCorrFctnTrueQ::AliFemtoModelCorrFctnTrueQ(const AliFemtoModelCorrFctnTrueQ& aCorrFctn):
+ AliFemtoModelCorrFctn(aCorrFctn),
+ fTrueNum(0),
+ fTrueDen(0)
+{
+ // copy constructor
+ fTrueNum = new TH1D(*aCorrFctn.fTrueNum);
+ fTrueDen = new TH1D(*aCorrFctn.fTrueDen);
+}
+//_______________________
+AliFemtoModelCorrFctnTrueQ::~AliFemtoModelCorrFctnTrueQ()
+{
+ // destructor
+ if (fTrueNum) delete fTrueNum;
+ if (fTrueDen) delete fTrueDen;
+ if (fNumeratorTrue) delete fNumeratorTrue;
+ if (fNumeratorFake) delete fNumeratorFake;
+ if (fDenominator) delete fDenominator;
+}
+
+//_______________________
+AliFemtoModelCorrFctnTrueQ& AliFemtoModelCorrFctnTrueQ::operator=(const AliFemtoModelCorrFctnTrueQ& aCorrFctn)
+{
+ // assignment operator
+ if (this == &aCorrFctn)
+ return *this;
+ if (aCorrFctn.fTrueNum)
+ fTrueNum = new TH1D (*aCorrFctn.fTrueNum);
+ else fTrueNum = 0;
+ if (aCorrFctn.fTrueDen)
+ fTrueDen = new TH1D(*aCorrFctn.fTrueDen);
+ else fTrueDen = 0;
+
+ return *this;
+}
+//_______________________
+AliFemtoString AliFemtoModelCorrFctnTrueQ::Report()
+{
+ // construct report
+ AliFemtoString tStr = "AliFemtoModelCorrFctnTrueQ report";
+
+ return tStr;
+}
+
+//_______________________
+void AliFemtoModelCorrFctnTrueQ::AddRealPair(AliFemtoPair* aPair)
+{
+ // add real (effect) pair
+ AliFemtoModelCorrFctn::AddRealPair(aPair);
+ fTrueNum->Fill(fManager->GetWeightGenerator()->GetKStar()*2);
+}
+//_______________________
+void AliFemtoModelCorrFctnTrueQ::AddMixedPair(AliFemtoPair* aPair)
+{
+ // add mixed (background) pair
+ AliFemtoModelCorrFctn::AddMixedPair(aPair);
+ // save the generated positions
+ fTrueDen->Fill(fManager->GetWeightGenerator()->GetKStar()*2);
+}
+//_______________________
+void AliFemtoModelCorrFctnTrueQ::Write()
+{
+ // write out all the histograms
+ fTrueNum->Write();
+ fTrueDen->Write();
+
+ AliFemtoModelCorrFctn::Write();
+}
+//_______________________
+TList* AliFemtoModelCorrFctnTrueQ::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
+
+ tOutputList->Add(fTrueNum);
+ tOutputList->Add(fTrueDen);
+
+ return tOutputList;
+}
+//_______________________
+AliFemtoModelCorrFctn* AliFemtoModelCorrFctnTrueQ::Clone()
+{
+ // Clone the correlation function
+ AliFemtoModelCorrFctnTrueQ *tCopy = new AliFemtoModelCorrFctnTrueQ(*this);
+
+ return tCopy;
+}
+
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelCorrFctnTrueQ - the class for correlation function which ///
+/// uses the model framework and weight generation and saves the correlation ///
+/// function in true qinv ///
+/// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef ALIFEMTOMODELCORRFCTNTRUEQ_H
+#define ALIFEMTOMODELCORRFCTNTRUEQ_H
+
+#include "AliFemtoCorrFctn.h"
+#include "AliFemtoPair.h"
+#include "AliFemtoModelManager.h"
+#include "AliFemtoModelCorrFctn.h"
+
+class AliFemtoModelCorrFctnTrueQ: public AliFemtoModelCorrFctn {
+
+public:
+ AliFemtoModelCorrFctnTrueQ();
+ AliFemtoModelCorrFctnTrueQ(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi);
+ AliFemtoModelCorrFctnTrueQ(const AliFemtoModelCorrFctnTrueQ& aCorrFctn);
+ virtual ~AliFemtoModelCorrFctnTrueQ();
+
+ AliFemtoModelCorrFctnTrueQ& operator=(const AliFemtoModelCorrFctnTrueQ& aCorrFctn);
+
+ virtual AliFemtoString Report();
+
+ virtual void AddRealPair(AliFemtoPair* aPair);
+ virtual void AddMixedPair(AliFemtoPair* aPir);
+
+ virtual void Write();
+ virtual TList* GetOutputList();
+
+ virtual AliFemtoModelCorrFctn* Clone();
+
+protected:
+
+ TH1D *fTrueNum; // Numerator in true q
+ TH1D *fTrueDen; // Denominator in true q
+
+private:
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoModelCorrFctnTrueQ, 1)
+#endif
+};
+
+#endif
//____________________________
void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
// add real (effect) pair
- // double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
+ double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
Int_t nh = 0;
Int_t an = 0;
Int_t ns = 0;
hsfval = ns*1.0/nh;
}
-// if ((tQinv < 0.01) && (hsmval<-0.46)) {
-// cout << "Quality Sharity " << hsmval << " " << hsfval << " " << pair->Track1()->Track() << " " << pair->Track2()->Track() << endl;
-// cout << "Qinv of the pair is " << tQinv << endl;
-// cout << "Clusters: " << endl;
-// for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
-// cout << imap ;
-// if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
-// else cout << " 0 " ;
-// if (pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
-// else cout << " 0 " ;
-// cout << " ";
-// if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
-// else cout << " X ";
-// if (pair->Track2()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
-// else cout << " X ";
-// cout << endl;
-// }
-// cout << "Momentum1 "
-// << pair->Track1()->Track()->P().x() << " "
-// << pair->Track1()->Track()->P().y() << " "
-// << pair->Track1()->Track()->P().z() << " "
-// << pair->Track1()->Track()->Label() << " "
-// << pair->Track1()->Track()->TrackId() << " "
-// << pair->Track1()->Track()->Flags() << " "
-// << pair->Track1()->Track()->KinkIndex(0) << " "
-// << pair->Track1()->Track()->KinkIndex(1) << " "
-// << pair->Track1()->Track()->KinkIndex(2) << " "
-// << endl;
-// cout << "Momentum2 "
-// << pair->Track2()->Track()->P().x() << " "
-// << pair->Track2()->Track()->P().y() << " "
-// << pair->Track2()->Track()->P().z() << " "
-// << pair->Track2()->Track()->Label() << " "
-// << pair->Track2()->Track()->TrackId() << " "
-// << pair->Track2()->Track()->Flags() << " "
-// << pair->Track2()->Track()->KinkIndex(0) << " "
-// << pair->Track2()->Track()->KinkIndex(1) << " "
-// << pair->Track2()->Track()->KinkIndex(2) << " "
-// << endl;
-// }
+ if ((tQinv < 0.005) && (hsmval<-0.0)) {
+ cout << "Quality Sharity " << hsmval << " " << hsfval << " " << pair->Track1()->Track() << " " << pair->Track2()->Track() << endl;
+ cout << "Qinv of the pair is " << tQinv << endl;
+ cout << "Clusters: " << endl;
+ for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
+ cout << imap ;
+ if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
+ else cout << " 0 " ;
+ if (pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
+ else cout << " 0 " ;
+ cout << " ";
+ if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
+ else cout << " X ";
+ if (pair->Track2()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
+ else cout << " X ";
+ cout << endl;
+ }
+ cout << "Momentum1 "
+ << pair->Track1()->Track()->P().x() << " "
+ << pair->Track1()->Track()->P().y() << " "
+ << pair->Track1()->Track()->P().z() << " "
+ << pair->Track1()->Track()->Label() << " "
+ << pair->Track1()->Track()->TrackId() << " "
+ << pair->Track1()->Track()->Flags() << " "
+ << pair->Track1()->Track()->KinkIndex(0) << " "
+ << pair->Track1()->Track()->KinkIndex(1) << " "
+ << pair->Track1()->Track()->KinkIndex(2) << " "
+ << pair->Track1()->Track()->ITSchi2() << " "
+ << pair->Track1()->Track()->ITSncls() << " "
+ << pair->Track1()->Track()->TPCchi2() << " "
+ << pair->Track1()->Track()->TPCncls() << " "
+ << endl;
+ cout << "Momentum2 "
+ << pair->Track2()->Track()->P().x() << " "
+ << pair->Track2()->Track()->P().y() << " "
+ << pair->Track2()->Track()->P().z() << " "
+ << pair->Track2()->Track()->Label() << " "
+ << pair->Track2()->Track()->TrackId() << " "
+ << pair->Track2()->Track()->Flags() << " "
+ << pair->Track2()->Track()->KinkIndex(0) << " "
+ << pair->Track2()->Track()->KinkIndex(1) << " "
+ << pair->Track2()->Track()->KinkIndex(2) << " "
+ << pair->Track2()->Track()->ITSchi2() << " "
+ << pair->Track2()->Track()->ITSncls() << " "
+ << pair->Track2()->Track()->TPCchi2() << " "
+ << pair->Track2()->Track()->TPCncls() << " "
+ << endl;
+ }
-// fShareNumerator->Fill(tQinv, hsfval);
-// fQualityNumerator->Fill(tQinv, hsmval);
+ fShareNumerator->Fill(tQinv, hsfval);
+ fQualityNumerator->Fill(tQinv, hsmval);
// cout << "AliFemtoShareQualityCorrFctn::AddRealPair : " << pair->qInv() << " " << tQinv <<
//" " << pair->Track1().FourMomentum() << " " << pair->Track2().FourMomentum() << endl;
}
void AliFemtoShareQualityCorrFctn::WriteHistos()
{
+ // Write out result histograms
fShareNumerator->Write();
fShareDenominator->Write();
fQualityNumerator->Write();
fQualityDenominator->Write();
}
+//______________________________
+TList* AliFemtoShareQualityCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fShareNumerator);
+ tOutputList->Add(fShareDenominator);
+ tOutputList->Add(fQualityNumerator);
+ tOutputList->Add(fQualityDenominator);
+
+ return tOutputList;
+}
virtual void Finish();
void WriteHistos();
+ virtual TList* GetOutputList();
private:
TH2D *fShareNumerator; // Share fraction for real pairs
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoShareQualityKTPairCut - a pair cut which checks for some pair //
+// qualities that attempt to identify slit/doubly reconstructed tracks //
+// and selects pairs based on their transverse momentum kT //
+// //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityKTPairCut.cxx,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+#include "AliFemtoShareQualityKTPairCut.h"
+#include <string>
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoShareQualityKTPairCut)
+#endif
+
+//__________________
+AliFemtoShareQualityKTPairCut::AliFemtoShareQualityKTPairCut():
+ AliFemtoShareQualityPairCut(),
+ fKTMin(0),
+ fKTMax(1.0e6)
+{
+}
+//__________________
+AliFemtoShareQualityKTPairCut::AliFemtoShareQualityKTPairCut(const AliFemtoShareQualityKTPairCut& c) :
+ AliFemtoShareQualityPairCut(c),
+ fKTMin(0),
+ fKTMax(1.0e6)
+{
+ fKTMin = c.fKTMin;
+ fKTMax = c.fKTMax;
+}
+
+//__________________
+AliFemtoShareQualityKTPairCut::~AliFemtoShareQualityKTPairCut(){
+ /* no-op */
+}
+//__________________
+bool AliFemtoShareQualityKTPairCut::Pass(const AliFemtoPair* pair){
+ // Accept a pair base on its Kt and sharity and quality
+ bool temp = true;
+
+ if (pair->KT() < fKTMin)
+ temp = false;
+
+ if (pair->KT() > fKTMax)
+ temp = false;
+
+ if (temp) {
+ temp = AliFemtoShareQualityPairCut::Pass(pair);
+ }
+ else
+ fNPairsFailed++;
+
+ return temp;
+}
+//__________________
+AliFemtoString AliFemtoShareQualityKTPairCut::Report(){
+ // Prepare a report from execution
+ string stemp = "AliFemtoShareQuality Pair Cut - remove shared and split pairs\n"; char ctemp[100];
+ sprintf(ctemp,"Accept pair with kT in range %lf , %lf",fKTMin,fKTMax);
+ stemp += ctemp;
+ sprintf(ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
+ stemp += ctemp;
+ AliFemtoString returnThis = stemp;
+ return returnThis;}
+//__________________
+
+TList *AliFemtoShareQualityKTPairCut::ListSettings()
+{
+ // return a list of settings in a writable form
+ TList *tListSetttings = AliFemtoShareQualityPairCut::ListSettings();
+ char buf[200];
+ snprintf(buf, 200, "AliFemtoShareQualityKTPairCut.ktmax=%lf", fKTMax);
+ tListSetttings->AddLast(new TObjString(buf));
+ snprintf(buf, 200, "AliFemtoShareQualityKTPairCut.ktmin=%lf", fKTMin);
+ tListSetttings->AddLast(new TObjString(buf));
+
+ return tListSetttings;
+}
+
+void AliFemtoShareQualityKTPairCut::SetKTRange(double ktmin, double ktmax)
+{
+ // Set the accepted kT range
+ fKTMin = ktmin;
+ fKTMax = ktmax;
+}
--- /dev/null
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityKTPairCut.h,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State University, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+
+#ifndef ALIFEMTOSHAREQUALITYKTPAIRCUT_H
+#define ALIFEMTOSHAREQUALITYKTPAIRCUT_H
+
+// do I need these lines ?
+//#ifndef StMaker_H
+//#include "StMaker.h"
+//#endif
+
+#include "AliFemtoPairCut.h"
+#include "AliFemtoShareQualityPairCut.h"
+
+class AliFemtoShareQualityKTPairCut : public AliFemtoShareQualityPairCut{
+public:
+ AliFemtoShareQualityKTPairCut();
+ AliFemtoShareQualityKTPairCut(const AliFemtoShareQualityKTPairCut& c);
+ virtual ~AliFemtoShareQualityKTPairCut();
+
+ virtual bool Pass(const AliFemtoPair* pair);
+ virtual AliFemtoString Report();
+ virtual TList *ListSettings();
+ AliFemtoShareQualityKTPairCut* Clone();
+ void SetKTRange(double ktmin, double ktmax);
+
+ protected:
+ Double_t fKTMin; // Minimum allowed pair transverse momentum
+ Double_t fKTMax; // Maximum allowed pair transverse momentum
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoShareQualityKTPairCut, 0)
+#endif
+};
+
+inline AliFemtoShareQualityKTPairCut* AliFemtoShareQualityKTPairCut::Clone() { AliFemtoShareQualityKTPairCut* c = new AliFemtoShareQualityKTPairCut(*this); return c;}
+
+#endif
virtual bool Pass(const AliFemtoPair* pair);
virtual AliFemtoString Report();
virtual TList *ListSettings();
- AliFemtoShareQualityPairCut* Clone();
+ virtual AliFemtoPairCut* Clone();
void SetShareQualityMax(Double_t aAliFemtoShareQualityMax);
Double_t GetAliFemtoShareQualityMax() const;
void SetShareFractionMax(Double_t aAliFemtoShareFractionMax);
fShareFractionMax(1.0)// no cut
{ /* no-op */ }
-inline AliFemtoShareQualityPairCut* AliFemtoShareQualityPairCut::Clone() { AliFemtoShareQualityPairCut* c = new AliFemtoShareQualityPairCut(*this); return c;}
+inline AliFemtoPairCut* AliFemtoShareQualityPairCut::Clone() { AliFemtoShareQualityPairCut* c = new AliFemtoShareQualityPairCut(*this); return c;}
#endif
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoShareQualityTPCEntranceSepPairCut - a pair cut which checks //
+// for some pair qualities that attempt to identify slit/doubly //
+// reconstructed tracks and also selects pairs based on their separation //
+// at the entrance to the TPC //
+// //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityTPCEntranceSepPairCut.cxx,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+#include "AliFemtoShareQualityTPCEntranceSepPairCut.h"
+#include <string>
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoShareQualityTPCEntranceSepPairCut)
+#endif
+
+//__________________
+AliFemtoShareQualityTPCEntranceSepPairCut::AliFemtoShareQualityTPCEntranceSepPairCut():
+ AliFemtoShareQualityPairCut(),
+ fDTPCMin(0)
+{
+}
+//__________________
+AliFemtoShareQualityTPCEntranceSepPairCut::AliFemtoShareQualityTPCEntranceSepPairCut(const AliFemtoShareQualityTPCEntranceSepPairCut& c) :
+ AliFemtoShareQualityPairCut(c),
+ fDTPCMin(0)
+{
+ fDTPCMin = c.fDTPCMin;
+}
+
+//__________________
+AliFemtoShareQualityTPCEntranceSepPairCut::~AliFemtoShareQualityTPCEntranceSepPairCut(){
+ /* no-op */
+}
+//__________________
+bool AliFemtoShareQualityTPCEntranceSepPairCut::Pass(const AliFemtoPair* pair){
+ // Accept pairs based on their TPC entrance separation and
+ // quality and sharity
+ bool temp = true;
+
+ double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x();
+ double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y();
+ double distz = pair->Track1()->Track()->NominalTpcEntrancePoint().z() - pair->Track2()->Track()->NominalTpcEntrancePoint().z();
+ double dist = sqrt(distx*distx + disty*disty + distz*distz);
+
+ temp = dist > fDTPCMin;
+
+ if (temp) {
+ temp = AliFemtoShareQualityPairCut::Pass(pair);
+ }
+ else
+ fNPairsFailed++;
+
+ return temp;
+}
+//__________________
+AliFemtoString AliFemtoShareQualityTPCEntranceSepPairCut::Report(){
+ // Prepare a report from the execution
+ string stemp = "AliFemtoShareQualityTPCEntranceSep Pair Cut - remove shared and split pairs and pairs with small separation at the entrance to the TPC\n"; char ctemp[100];
+ sprintf(ctemp,"Accept pair with TPC entrance separation more that %lf",fDTPCMin);
+ stemp += ctemp;
+ sprintf(ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
+ stemp += ctemp;
+ AliFemtoString returnThis = stemp;
+ return returnThis;}
+//__________________
+
+TList *AliFemtoShareQualityTPCEntranceSepPairCut::ListSettings()
+{
+ // return a list of settings in a writable form
+ TList *tListSetttings = AliFemtoShareQualityPairCut::ListSettings();
+ char buf[200];
+ snprintf(buf, 200, "AliFemtoShareQualityTPCEntranceSepPairCut.tpcentsepmin=%lf", fDTPCMin);
+ tListSetttings->AddLast(new TObjString(buf));
+
+ return tListSetttings;
+}
+
+void AliFemtoShareQualityTPCEntranceSepPairCut::SetTPCEntranceSepMinimum(double dtpc)
+{
+ fDTPCMin = dtpc;
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoShareQualityTPCEntranceSepPairCut - a pair cut which checks //
+// for some pair qualities that attempt to identify slit/doubly //
+// reconstructed tracks and also selects pairs based on their separation //
+// at the entrance to the TPC //
+// //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityTPCEntranceSepPairCut.h,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $
+ *
+ * Author: Adam Kisiel, Ohio State University, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ * a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+
+#ifndef ALIFEMTOSHAREQUALITYTPCENTRANCESEPPAIRCUT_H
+#define ALIFEMTOSHAREQUALITYTPCENTRANCESEPPAIRCUT_H
+
+// do I need these lines ?
+//#ifndef StMaker_H
+//#include "StMaker.h"
+//#endif
+
+#include "AliFemtoPairCut.h"
+#include "AliFemtoShareQualityPairCut.h"
+
+class AliFemtoShareQualityTPCEntranceSepPairCut : public AliFemtoShareQualityPairCut{
+public:
+ AliFemtoShareQualityTPCEntranceSepPairCut();
+ AliFemtoShareQualityTPCEntranceSepPairCut(const AliFemtoShareQualityTPCEntranceSepPairCut& c);
+ virtual ~AliFemtoShareQualityTPCEntranceSepPairCut();
+
+ virtual bool Pass(const AliFemtoPair* pair);
+ virtual AliFemtoString Report();
+ virtual TList *ListSettings();
+ virtual AliFemtoPairCut* Clone();
+ void SetTPCEntranceSepMinimum(double dtpc);
+
+ protected:
+ Double_t fDTPCMin; // Minimum allowed pair nominal separation at the entrance to the TPC
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoShareQualityTPCEntranceSepPairCut, 0)
+#endif
+};
+
+inline AliFemtoPairCut* AliFemtoShareQualityTPCEntranceSepPairCut::Clone() { AliFemtoShareQualityTPCEntranceSepPairCut* c = new AliFemtoShareQualityTPCEntranceSepPairCut(*this); return c;}
+
+#endif
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoTPCInnerCorrFctn - A correlation function that saves the ///
+/// distance at the entrance to the TPC between two tracks as a function ///
+/// of qinv ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliFemtoTPCInnerCorrFctn.h"
+//#include "AliFemtoHisto.hh"
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoTPCInnerCorrFctn)
+#endif
+
+//____________________________
+AliFemtoTPCInnerCorrFctn::AliFemtoTPCInnerCorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
+ fDTPCNumerator(0),
+ fDTPCDenominator(0)
+{
+ // set up numerator
+ // title = "Num Qinv (MeV/c)";
+ char tTitNum[100] = "NumDTPC";
+ strcat(tTitNum,title);
+ fDTPCNumerator = new TH2D(tTitNum,title,nbins,QinvLo,QinvHi,100,0.0,20.0);
+ // set up denominator
+ //title = "Den Qinv (MeV/c)";
+ char tTitDen[100] = "DenDTPC";
+ strcat(tTitDen,title);
+ fDTPCDenominator = new TH2D(tTitDen,title,nbins,QinvLo,QinvHi,100,0.0,20.0);
+
+ // to enable error bar calculation...
+ fDTPCNumerator->Sumw2();
+ fDTPCDenominator->Sumw2();
+}
+
+//____________________________
+AliFemtoTPCInnerCorrFctn::AliFemtoTPCInnerCorrFctn(const AliFemtoTPCInnerCorrFctn& aCorrFctn) :
+ fDTPCNumerator(0),
+ fDTPCDenominator(0)
+{
+ // copy constructor
+ if (aCorrFctn.fDTPCNumerator)
+ fDTPCNumerator = new TH2D(*aCorrFctn.fDTPCNumerator);
+ if (aCorrFctn.fDTPCDenominator)
+ fDTPCDenominator = new TH2D(*aCorrFctn.fDTPCDenominator);
+}
+//____________________________
+AliFemtoTPCInnerCorrFctn::~AliFemtoTPCInnerCorrFctn(){
+ // destructor
+ delete fDTPCNumerator;
+ delete fDTPCDenominator;
+}
+//_________________________
+AliFemtoTPCInnerCorrFctn& AliFemtoTPCInnerCorrFctn::operator=(const AliFemtoTPCInnerCorrFctn& aCorrFctn)
+{
+ // assignment operator
+ if (this == &aCorrFctn)
+ return *this;
+
+ if (aCorrFctn.fDTPCNumerator)
+ fDTPCNumerator = new TH2D(*aCorrFctn.fDTPCNumerator);
+ else
+ fDTPCNumerator = 0;
+ if (aCorrFctn.fDTPCDenominator)
+ fDTPCDenominator = new TH2D(*aCorrFctn.fDTPCDenominator);
+ else
+ fDTPCDenominator = 0;
+
+ return *this;
+}
+//_________________________
+void AliFemtoTPCInnerCorrFctn::Finish(){
+ // here is where we should normalize, fit, etc...
+ // we should NOT Draw() the histos (as I had done it below),
+ // since we want to insulate ourselves from root at this level
+ // of the code. Do it instead at root command line with browser.
+ // mShareNumerator->Draw();
+ //mShareDenominator->Draw();
+ //mRatio->Draw();
+
+}
+
+//____________________________
+AliFemtoString AliFemtoTPCInnerCorrFctn::Report(){
+ // create report
+ string stemp = "Entrace TPC distance Correlation Function Report:\n";
+ char ctemp[100];
+ sprintf(ctemp,"Number of entries in numerator:\t%E\n",fDTPCNumerator->GetEntries());
+ stemp += ctemp;
+ sprintf(ctemp,"Number of entries in denominator:\t%E\n",fDTPCDenominator->GetEntries());
+ stemp += ctemp;
+ // stemp += mCoulombWeight->Report();
+ AliFemtoString returnThis = stemp;
+ return returnThis;
+}
+//____________________________
+void AliFemtoTPCInnerCorrFctn::AddRealPair( AliFemtoPair* pair){
+ // add real (effect) pair
+ double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
+ double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x();
+ double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y();
+ double distz = pair->Track1()->Track()->NominalTpcEntrancePoint().z() - pair->Track2()->Track()->NominalTpcEntrancePoint().z();
+ double dist = sqrt(distx*distx + disty*disty + distz*distz);
+
+ fDTPCNumerator->Fill(tQinv, dist);
+// cout << "AliFemtoTPCInnerCorrFctn::AddRealPair : " << tQinv << " " << dist << endl;
+// cout << distx << " " << disty << " " << distz << endl;
+}
+//____________________________
+void AliFemtoTPCInnerCorrFctn::AddMixedPair( AliFemtoPair* pair){
+ // add mixed (background) pair
+ double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
+ double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x();
+ double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y();
+ double distz = pair->Track1()->Track()->NominalTpcEntrancePoint().z() - pair->Track2()->Track()->NominalTpcEntrancePoint().z();
+ double dist = sqrt(distx*distx + disty*disty + distz*distz);
+
+ fDTPCDenominator->Fill(tQinv,dist);
+}
+
+
+void AliFemtoTPCInnerCorrFctn::WriteHistos()
+{
+ // Write out result histograms
+ fDTPCNumerator->Write();
+ fDTPCDenominator->Write();
+}
+//______________________________
+TList* AliFemtoTPCInnerCorrFctn::GetOutputList()
+{
+ // Prepare the list of objects to be written to the output
+ TList *tOutputList = new TList();
+
+ tOutputList->Add(fDTPCNumerator);
+ tOutputList->Add(fDTPCDenominator);
+
+ return tOutputList;
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoTPCInnerCorrFctn - A correlation function that saves the ///
+/// distance at the entrance to the TPC between two tracks as a function ///
+/// of qinv ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef AliFemtoTPCInnerCorrFctn_hh
+#define AliFemtoTPCInnerCorrFctn_hh
+
+#include "TH1D.h"
+#include "TH2D.h"
+#include "AliFemtoCorrFctn.h"
+
+class AliFemtoTPCInnerCorrFctn : public AliFemtoCorrFctn {
+public:
+ AliFemtoTPCInnerCorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi);
+ AliFemtoTPCInnerCorrFctn(const AliFemtoTPCInnerCorrFctn& aCorrFctn);
+ virtual ~AliFemtoTPCInnerCorrFctn();
+
+ AliFemtoTPCInnerCorrFctn& operator=(const AliFemtoTPCInnerCorrFctn& aCorrFctn);
+
+ virtual AliFemtoString Report();
+ virtual void AddRealPair(AliFemtoPair* aPair);
+ virtual void AddMixedPair(AliFemtoPair* aPair);
+
+ virtual void Finish();
+
+ void WriteHistos();
+ virtual TList* GetOutputList();
+private:
+
+ TH2D *fDTPCNumerator; // Distance at the entrance to the TPC for real pairs
+ TH2D *fDTPCDenominator; // Distance at the entrance to tht TPC for mixed pairs
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoTPCInnerCorrFctn, 1)
+#endif
+};
+
+
+#endif
+
#pragma link C++ class AliFemtoEventReader;
#pragma link C++ class AliFemtoKinkCut;
#pragma link C++ class AliFemtoPairCut;
+#pragma link C++ class AliFemtoKTPairCut;
#pragma link C++ class AliFemtoParticleCut;
#pragma link C++ class AliFemtoTrackCut;
#pragma link C++ class AliFemtoV0Cut;
#pragma link C++ class AliFemtoXiCut;
#pragma link C++ class AliFemtoBPLCMS3DCorrFctn;
#pragma link C++ class AliFemtoQinvCorrFctn;
+#pragma link C++ class AliFemtoCorrFctnNonIdDR;
#pragma link C++ class AliFemtoBasicEventCut;
#pragma link C++ class AliFemtoBasicTrackCut;
#pragma link C++ class AliFemtoDummyPairCut;
#pragma link C++ class AliFmThreeVectorF;
#pragma link C++ class AliFemtoEventReaderESD;
#pragma link C++ class AliFemtoEventReaderESDChain;
+#pragma link C++ class AliFemtoEventReaderESDChainKine;
#pragma link C++ class AliFemtoModelManager;
#pragma link C++ class AliFemtoModelWeightGenerator;
#pragma link C++ class AliFemtoModelWeightGeneratorBasic;
#pragma link C++ class AliFemtoModelHiddenInfo;
#pragma link C++ class AliFemtoModelCorrFctn;
#pragma link C++ class AliFemtoModelWeightGeneratorLednicky;
+#pragma link C++ class AliFemtoCutMonitorParticleYPt;
// #pragma link C++ class marekTrackCut;
// #pragma link C++ class marekPairCut;
#pragma link C++ class AliFemtoShareQualityPairCut;
+#pragma link C++ class AliFemtoShareQualityKTPairCut;
+#pragma link C++ class AliFemtoShareQualityTPCEntranceSepPairCut;
#pragma link C++ class AliFemtoESDTrackCut;
#pragma link C++ class AliFemtoQPairCut;
#pragma link C++ class AliFemtoShareQualityCorrFctn;
+#pragma link C++ class AliFemtoTPCInnerCorrFctn;
+#pragma link C++ class AliFemtoChi2CorrFctn;
#pragma link C++ class AliFemtoModelCorrFctnSource;
+#pragma link C++ class AliFemtoModelBPLCMSCorrFctn;
#pragma link C++ class AliFemtoModelGausRinvFreezeOutGenerator;
//#pragma link C++ class AliStHbtEvent;
//#pragma link C++ class AliStHbtEventReader;
//#pragma link C++ class AliStHbtPythiaOnFlyEventReader;
//#pragma link C++ class AliStHbtTrack;
#pragma link C++ class AliFemtoEventReaderESDKine;
+#pragma link C++ class AliFemtoModelCorrFctnTrueQ;
+#pragma link C++ class AliFemtoCutMonitorParticleMomRes;
FEMTOSCOPY/AliFemto/AliFemtoEventReader.cxx \
FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.cxx \
FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx \
+ FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChainKine.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.cxx \
FEMTOSCOPY/AliFemto/AliFemtoModelFreezeOutGenerator.cxx \
- FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorLednicky.cxx
+ FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorLednicky.cxx \
+ FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.cxx \
+ FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx \
+ FEMTOSCOPY/AliFemto/AliFemtoCorrFctnNonIdDR.cxx
+
HDRS= $(SRCS:.cxx=.h)
HDRS += FEMTOSCOPY/AliFemto/AliFmThreeVector.h \
SRCS= FEMTOSCOPY/AliFemtoUser/AliFemtoQPairCut.cxx \
FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityPairCut.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityKTPairCut.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityTPCEntranceSepPairCut.cxx \
FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.cxx \
FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityCorrFctn.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoTPCInnerCorrFctn.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoChi2CorrFctn.cxx \
FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnSource.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoModelBPLCMSCorrFctn.cxx \
FEMTOSCOPY/AliFemtoUser/AliFemtoModelGausRinvFreezeOutGenerator.cxx \
- FEMTOSCOPY/AliFemtoUser/AliFemtoEventReaderESDKine.cxx
+ FEMTOSCOPY/AliFemtoUser/AliFemtoEventReaderESDKine.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnTrueQ.cxx \
+ FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorParticleMomRes.cxx
HDRS= $(SRCS:.cxx=.h)