////////////////////////////////////////////////////////////////////////////////
#include "AliFemtoBasicEventCut.h"
-#include <cstdio>
+//#include <cstdio>
#ifdef __ROOT__
ClassImp(AliFemtoBasicEventCut)
AliFemtoBasicEventCut::AliFemtoBasicEventCut() :
fNEventsPassed(0), fNEventsFailed(0)
{
- /* no-op */
+ // Default constructor
}
//------------------------------
-//AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
-// /* noop */
-//}
+AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
+ // Default destructor
+}
//------------------------------
bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
+ // Pass events if they fall within the multiplicity and z-vertex
+ // position range. Fail otherwise
int mult = event->NumberOfTracks();
- double VertexZPos = event->PrimVertPos().z();
+ double vertexZPos = event->PrimVertPos().z();
cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
- cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << VertexZPos << " < " << fVertZPos[1] << endl;
+ cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
bool goodEvent =
((mult > fEventMult[0]) &&
(mult < fEventMult[1]) &&
- (VertexZPos > fVertZPos[0]) &&
- (VertexZPos < fVertZPos[1]));
+ (vertexZPos > fVertZPos[0]) &&
+ (vertexZPos < fVertZPos[1]));
goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
return (goodEvent);
}
//------------------------------
AliFemtoString AliFemtoBasicEventCut::Report(){
- string Stemp;
- char Ctemp[100];
- sprintf(Ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
- Stemp = Ctemp;
- sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
- Stemp += Ctemp;
- sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
- Stemp += Ctemp;
- AliFemtoString returnThis = Stemp;
+ // Prepare report
+ string stemp;
+ char ctemp[100];
+ sprintf(ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
+ stemp = ctemp;
+ sprintf(ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
+ stemp += ctemp;
+ sprintf(ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
+ stemp += ctemp;
+ AliFemtoString returnThis = stemp;
return returnThis;
}
// //
////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoBasicEventCut_hh
-#define AliFemtoBasicEventCut_hh
+#ifndef ALIFEMTOBASICEVENTCUT_H
+#define ALIFEMTOBASICEVENTCUT_H
// do I need these lines ?
//#ifndef StMaker_H
public:
AliFemtoBasicEventCut();
- AliFemtoBasicEventCut(AliFemtoBasicEventCut&);
- //~AliFemtoBasicEventCut();
+ AliFemtoBasicEventCut(AliFemtoBasicEventCut& c);
+ virtual ~AliFemtoBasicEventCut();
void SetEventMult(const int& lo,const int& hi);
void SetVertZPos(const float& lo, const float& hi);
- int NEventsPassed();
- int NEventsFailed();
+ int NEventsPassed() const;
+ int NEventsFailed() const;
virtual AliFemtoString Report();
- virtual bool Pass(const AliFemtoEvent*);
+ virtual bool Pass(const AliFemtoEvent* event);
AliFemtoBasicEventCut* Clone();
int fEventMult[2]; // range of multiplicity
float fVertZPos[2]; // range of z-position of vertex
- long fNEventsPassed;
- long fNEventsFailed;
+ long fNEventsPassed; // Number of events checked by this cut that passed
+ long fNEventsFailed; // Number of events checked by this cut that failed
#ifdef __ROOT__
ClassDef(AliFemtoBasicEventCut, 1)
inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
-inline int AliFemtoBasicEventCut::NEventsPassed() {return fNEventsPassed;}
-inline int AliFemtoBasicEventCut::NEventsFailed() {return fNEventsFailed;}
+inline int AliFemtoBasicEventCut::NEventsPassed() const {return fNEventsPassed;}
+inline int AliFemtoBasicEventCut::NEventsFailed() const {return fNEventsFailed;}
inline AliFemtoBasicEventCut* AliFemtoBasicEventCut::Clone() { AliFemtoBasicEventCut* c = new AliFemtoBasicEventCut(*this); return c;}
inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) : AliFemtoEventCut(c), fNEventsPassed(0), fNEventsFailed(0) {
fEventMult[0] = c.fEventMult[0];
protected:
AliFemtoAnalysis* fyAnalysis;
-private:
+ private:
};
inline void AliFemtoCorrFctn::AddMixedPair(AliFemtoPair*) { cout << "Not implemented" << endl; }
inline AliFemtoCorrFctn::AliFemtoCorrFctn(const AliFemtoCorrFctn& c):fyAnalysis(0) {}
-inline AliFemtoCorrFctn::AliFemtoCorrFctn(): fyAnalysis(0) {/* no-op */};
+inline AliFemtoCorrFctn::AliFemtoCorrFctn(): fyAnalysis(0) {/* no-op */}
inline void AliFemtoCorrFctn::SetAnalysis(AliFemtoAnalysis* analysis) { fyAnalysis = analysis; }
inline AliFemtoCorrFctn& AliFemtoCorrFctn::operator=(const AliFemtoCorrFctn& aCorrFctn) { if (this == &aCorrFctn) return *this; fyAnalysis = aCorrFctn.fyAnalysis; return *this; }
***************************************************************************
*
* $Log$
+ * Revision 1.2.2.1 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.2 2007/05/22 09:01:42 akisiel
+ * Add the possibiloity to save cut settings in the ROOT file
+ *
* Revision 1.1 2007/05/16 10:22:11 akisiel
* Making the directory structure of AliFemto flat. All files go into one common directory
*
//}
//__________________
bool AliFemtoDummyPairCut::Pass(const AliFemtoPair* pair){
+ // Pass all pairs
bool temp = true;
temp ? fNPairsPassed++ : fNPairsFailed++;
return true;
}
//__________________
AliFemtoString AliFemtoDummyPairCut::Report(){
- string Stemp = "AliFemtoDummy Pair Cut - total dummy-- always returns true\n";
- char Ctemp[100];
- sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
- Stemp += Ctemp;
- AliFemtoString returnThis = Stemp;
+ // prepare a report from the execution
+ string stemp = "AliFemtoDummy Pair Cut - total dummy-- always returns true\n";
+ char ctemp[100];
+ sprintf(ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
+ stemp += ctemp;
+ AliFemtoString returnThis = stemp;
return returnThis;
}
//__________________
***************************************************************************
*
* $Log$
+ * Revision 1.2.2.1 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.2 2007/05/22 09:01:42 akisiel
+ * Add the possibiloity to save cut settings in the ROOT file
+ *
* Revision 1.1 2007/05/16 10:22:11 akisiel
* Making the directory structure of AliFemto flat. All files go into one common directory
*
**************************************************************************/
-#ifndef AliFemtoDummyPairCut_hh
-#define AliFemtoDummyPairCut_hh
+#ifndef ALIFEMTODUMMYPAIRCUT_H
+#define ALIFEMTODUMMYPAIRCUT_H
// do I need these lines ?
//#ifndef StMaker_H
virtual TList *ListSettings();
AliFemtoDummyPairCut* Clone();
-
private:
- long fNPairsPassed;
- long fNPairsFailed;
+ long fNPairsPassed; // number of pairs analyzed by this cut that passed
+ long fNPairsFailed; // number of pairs analyzed by this cut that failed
#ifdef __ROOT__
ClassDef(AliFemtoDummyPairCut, 1)
}
}
}
+//___________________
+AliFemtoEvent::AliFemtoEvent(const AliFemtoEvent& ev):
+ fEventNumber(0),
+ fRunNumber(0),
+ fNumberOfTracks(0),
+ fMagneticField(0),
+ fPrimVertPos(0,0,0),
+ fTrackCollection(0),
+ fV0Collection(0),
+ fXiCollection(0),
+ fKinkCollection(0),
+ fZDCN1Energy(0),
+ fZDCP1Energy(0),
+ fZDCN2Energy(0),
+ fZDCP2Energy(0),
+ fZDCEMEnergy(0),
+ fZDCParticipants(0),
+ fTriggerMask(0),
+ fTriggerCluster(0)
+{
+ // copy constructor
+ fEventNumber = ev.fEventNumber;
+ fRunNumber = ev.fRunNumber;
+
+ fZDCN1Energy=ev.fZDCN1Energy;
+ fZDCP1Energy=ev.fZDCP1Energy;
+ fZDCN2Energy=ev.fZDCN2Energy;
+ fZDCP2Energy=ev.fZDCP2Energy;
+ fZDCEMEnergy=ev.fZDCEMEnergy;
+ fZDCParticipants=ev.fZDCParticipants;
+ fNumberOfTracks = ev.fNumberOfTracks;
+ fMagneticField= ev.fMagneticField;
+
+ fTriggerMask=ev.fTriggerMask; // Trigger Type (mask)
+ fTriggerCluster=ev.fTriggerCluster;
+ // create collections
+ fTrackCollection = new AliFemtoTrackCollection;
+ fV0Collection = new AliFemtoV0Collection;
+ fXiCollection = new AliFemtoXiCollection;
+ fKinkCollection = new AliFemtoKinkCollection;
+ // copy track collection
+ for ( AliFemtoTrackIterator tIter=ev.fTrackCollection->begin(); tIter!=ev.fTrackCollection->end(); tIter++) {
+ AliFemtoTrack* trackCopy = new AliFemtoTrack(**tIter);
+ fTrackCollection->push_back(trackCopy);
+ }
+ // copy v0 collection
+ for ( AliFemtoV0Iterator vIter=ev.fV0Collection->begin(); vIter!=ev.fV0Collection->end(); vIter++) {
+ AliFemtoV0* v0Copy = new AliFemtoV0(**vIter);
+ fV0Collection->push_back(v0Copy);
+ }
+ // copy xi collection
+ for ( AliFemtoXiIterator xIter=ev.fXiCollection->begin(); xIter!=ev.fXiCollection->end(); xIter++) {
+ AliFemtoXi* xiCopy = new AliFemtoXi(**xIter);
+ fXiCollection->push_back(xiCopy);
+ }
+ // copy kink collection
+ for ( AliFemtoKinkIterator kIter=ev.fKinkCollection->begin(); kIter!=ev.fKinkCollection->end(); kIter++) {
+ //cout << " kinkCut passed " << endl;
+ AliFemtoKink* kinkCopy = new AliFemtoKink(**kIter);
+ fKinkCollection->push_back(kinkCopy);
+ }
+}
//______________________________
AliFemtoEvent& AliFemtoEvent::operator=(const AliFemtoEvent& aEvent)
{
//
#endif
#endif
- AliFemtoEvent(const AliFemtoEvent&, AliFemtoTrackCut* =0, AliFemtoV0Cut* =0, AliFemtoXiCut* =0, AliFemtoKinkCut* =0); // copy constructor with track and v0 cuts
+ AliFemtoEvent(const AliFemtoEvent& ev, AliFemtoTrackCut* tCut=0, AliFemtoV0Cut* vCut=0, AliFemtoXiCut* xCut=0, AliFemtoKinkCut* kCut=0); // copy constructor with track and v0 cuts
+ AliFemtoEvent(const AliFemtoEvent& ev); // copy constructor
~AliFemtoEvent();
AliFemtoEvent& operator=(const AliFemtoEvent& aEvent);
inline AliFemtoEventCut::AliFemtoEventCut(const AliFemtoEventCut& c) : AliFemtoCutMonitorHandler(), fyAnalysis(0) { }
inline void AliFemtoEventCut::SetAnalysis(AliFemtoAnalysis* analysis) { fyAnalysis = analysis; }
-inline AliFemtoEventCut::AliFemtoEventCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0){}; // default constructor. - Users should write their own
+inline AliFemtoEventCut::AliFemtoEventCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0){} // default constructor. - Users should write their own
inline AliFemtoEventCut& AliFemtoEventCut::operator=(const AliFemtoEventCut& aCut) { if (this == &aCut) return *this; fyAnalysis = aCut.fyAnalysis; return *this; }
#endif
////////////////////////////////////////////////////////////////////////////////
+/// ///
/// AliFemtoEventReader - the pure virtual base class for the event reader ///
/// All event readers must inherit from this one ///
+/// ///
////////////////////////////////////////////////////////////////////////////////
#include "AliFemtoEvent.h"
#include "AliFemtoEventCut.h"
fReaderStatus(0),
fDebug(0)
{
+ // Copy constructor
fEventCut = aReader.fEventCut;
fTrackCut = aReader.fTrackCut;
fV0Cut = aReader.fV0Cut;
AliFemtoEventReader& AliFemtoEventReader::operator=(const AliFemtoEventReader& aReader)
{
+ // Assignment operator
if (this == &aReader)
return *this;
/// AliFemtoEventReader - the pure virtual base class for the event reader ///
/// All event readers must inherit from this one ///
////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoEventReader_hh
-#define AliFemtoEventReader_hh
+#ifndef ALIFEMTOEVENTREADER_H
+#define ALIFEMTOEVENTREADER_H
+
class AliFemtoEvent;
class AliFemtoEventCut;
class AliFemtoTrackCut;
class AliFemtoXiCut;
class AliFemtoKinkCut;
+#include "AliFemtoString.h"
#include <iostream>
#include <fstream>
#include <stdio.h>
-using namespace std;
-#include "AliFemtoString.h"
+using namespace std;
class AliFemtoEventReader {
virtual int Init(const char* ReadWrite, AliFemtoString& Message){cout << "do-nothing AliFemtoEventReader::Init()\n"; return(0);}
virtual void Finish(){/*no-op*/};
- int Status(){return fReaderStatus;} // AliFemtoManager looks at this for guidance if it gets null pointer from ReturnHbtEvent
+ int Status() const {return fReaderStatus;} // AliFemtoManager looks at this for guidance if it gets null pointer from ReturnHbtEvent
virtual void SetEventCut(AliFemtoEventCut* ecut);
virtual void SetTrackCut(AliFemtoTrackCut* pcut);
/* 2: once per event */
/* 3: once per track */
/* 4: once per pair */
- int Debug(){return fDebug;}
+ int Debug() const {return fDebug;}
void SetDebug(int d){fDebug=d;}
protected:
/*
*$Id$
*$Log$
+ *Revision 1.2.2.2 2007/10/04 13:10:52 akisiel
+ *Add Kink index storageAliFemtoEventReaderESD.cxx AliFemtoTrack.cxx AliFemtoTrack.h
+ *
+ *Revision 1.2.2.1 2007/09/30 11:38:59 akisiel
+ *Adapt the readers to the new AliESDEvent structure
+ *
+ *Revision 1.2 2007/05/22 09:01:42 akisiel
+ *Add the possibiloity to save cut settings in the ROOT file
+ *
*Revision 1.1 2007/05/16 10:22:11 akisiel
*Making the directory structure of AliFemto flat. All files go into one common directory
*
#include "TFile.h"
#include "TTree.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
+#include "AliESDVertex.h"
//#include "TSystem.h"
#include "SystemOfUnits.h"
#include "AliFemtoEvent.h"
+#include "AliFemtoModelHiddenInfo.h"
ClassImp(AliFemtoEventReaderESD)
fInputFile(" "),
fFileName(" "),
fConstrained(true),
+ fReadInner(false),
fNumberofEvent(0),
fCurEvent(0),
- fCurFile(0),
- fListOfFiles(0x0),
fTree(0x0),
- fEvent(0x0),
fEsdFile(0x0),
- fEventFriend(0),
- fSharedList(0x0),
- fClusterPerPadrow(0x0)
+ fEvent(0x0)
{
// default constructor
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- }
}
AliFemtoEventReaderESD::AliFemtoEventReaderESD(const AliFemtoEventReaderESD &aReader) :
fInputFile(" "),
fFileName(" "),
fConstrained(true),
+ fReadInner(false),
fNumberofEvent(0),
fCurEvent(0),
- fCurFile(0),
- fListOfFiles(0x0),
fTree(0x0),
- fEvent(0x0),
fEsdFile(0x0),
- fEventFriend(0),
- fSharedList(0x0),
- fClusterPerPadrow(0x0)
+ fEvent(0x0)
{
// copy constructor
fInputFile = aReader.fInputFile;
fFileName = aReader.fFileName;
fConstrained = aReader.fConstrained;
+ fReadInner = aReader.fReadInner;
fNumberofEvent = aReader.fNumberofEvent;
fCurEvent = aReader.fCurEvent;
- fCurFile = aReader.fCurFile;
- fTree = aReader.fTree->CloneTree();
+ // fTree = aReader.fTree->CloneTree();
// fEvent = new AliESD(*aReader.fEvent);
- fEvent = new AliESD();
+ fEvent = new AliESDEvent();
fEsdFile = new TFile(aReader.fEsdFile->GetName());
- fEventFriend = aReader.fEventFriend;
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
- fClusterPerPadrow[tPad]->push_back(*iter);
- }
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
- fSharedList[tPad]->push_back(*iter);
- }
- }
- for (unsigned int veciter = 0; veciter<aReader.fListOfFiles.size(); veciter++)
- fListOfFiles.push_back(aReader.fListOfFiles[veciter]);
}
//__________________
//Destructor
delete fTree;
delete fEvent;
delete fEsdFile;
-
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- delete fClusterPerPadrow[tPad];
- }
- delete [] fClusterPerPadrow;
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- delete fSharedList[tPad];
- }
- delete [] fSharedList;
}
//__________________
fInputFile = aReader.fInputFile;
fFileName = aReader.fFileName;
fConstrained = aReader.fConstrained;
+ fReadInner = aReader.fReadInner;
fNumberofEvent = aReader.fNumberofEvent;
fCurEvent = aReader.fCurEvent;
- fCurFile = aReader.fCurFile;
if (fTree) delete fTree;
- fTree = aReader.fTree->CloneTree();
+ // fTree = aReader.fTree->CloneTree();
if (fEvent) delete fEvent;
- fEvent = new AliESD();
+ fEvent = new AliESDEvent();
if (fEsdFile) delete fEsdFile;
fEsdFile = new TFile(aReader.fEsdFile->GetName());
- fEventFriend = aReader.fEventFriend;
-
- if (fClusterPerPadrow) {
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- delete fClusterPerPadrow[tPad];
- }
- delete [] fClusterPerPadrow;
- }
-
- if (fSharedList) {
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- delete fSharedList[tPad];
- }
- delete [] fSharedList;
- }
-
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
- fClusterPerPadrow[tPad]->push_back(*iter);
- }
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
- fSharedList[tPad]->push_back(*iter);
- }
- }
- for (unsigned int veciter = 0; veciter<aReader.fListOfFiles.size(); veciter++)
- fListOfFiles.push_back(aReader.fListOfFiles[veciter]);
-
return *this;
}
//__________________
fInputFile=string(inputFile);
cout<<"Input File set on "<<fInputFile<<endl;
ifstream infile(inputFile);
+
+ fTree = new TChain("esdTree");
+
if(infile.good()==true)
{
//checking if all give files have good tree inside
if (tree!=0x0)
{
cout<<"putting file "<<string(buffer)<<" into analysis"<<endl;
- fListOfFiles.push_back(string(buffer));
+ fTree->AddFile(buffer);
delete tree;
}
esdFile->Close();
}
}
-//setting the next file to read
-bool AliFemtoEventReaderESD::GetNextFile()
-{
- // Begin reading the next file
- if (fCurFile>=fListOfFiles.size())
- return false;
- fFileName=fListOfFiles.at(fCurFile);
- cout<<"FileName set on "<<fFileName<<" "<<fCurFile<<endl;
-
- fCurFile++;
- return true;
-}
void AliFemtoEventReaderESD::SetConstrained(const bool constrained)
{
fConstrained=constrained;
return fConstrained;
}
+void AliFemtoEventReaderESD::SetReadTPCInner(const bool readinner)
+{
+ fReadInner=readinner;
+}
+
+bool AliFemtoEventReaderESD::GetReadTPCInner() const
+{
+ return fReadInner;
+}
+
AliFemtoEvent* AliFemtoEventReaderESD::ReturnHbtEvent()
{
// read in a next hbt event from the chain
// convert it to AliFemtoEvent and return
// for further analysis
AliFemtoEvent *hbtEvent = 0;
- string tFriendFileName;
if (fCurEvent==fNumberofEvent)//open next file
{
- cout<<"next file"<<endl;
- if(GetNextFile())
+ if(fNumberofEvent==0)
{
- delete fEventFriend;
- fEventFriend = 0;
- delete fEvent;//added 1.04.2007
- fEvent=new AliESD();
+ // delete fEvent;//added 1.04.2007
+ fEvent=new AliESDEvent();
// delete fTree;
//fTree=0;
- delete fEsdFile;
+ // delete fEsdFile;
//ESD data
- fEsdFile=TFile::Open(fFileName.c_str(),"READ");
- fTree = (TTree*) fEsdFile->Get("esdTree");
- fTree->SetBranchAddress("ESD", &fEvent);
-
- // Attach the friend tree with additional information
- tFriendFileName = fFileName;
- tFriendFileName.insert(tFriendFileName.find("s.root"),"friend");
- cout << "Reading friend " << tFriendFileName.c_str() << endl;;
- fTree->AddFriend("esdFriendTree",tFriendFileName.c_str());
- fTree->SetBranchAddress("ESDfriend",&fEventFriend);
-
-// chain->SetBranchStatus("*",0);
-// chain->SetBranchStatus("fUniqueID",1);
-// chain->SetBranchStatus("fTracks",1);
-// chain->SetBranchStatus("fTracks.*",1);
-// chain->SetBranchStatus("fTracks.fTPCindex[160]",1);
- fTree->SetBranchStatus("fTracks.fCalibContainer",0);
-
+ // fEsdFile=TFile::Open(fFileName.c_str(),"READ");
+ // fTree = (TTree*) fEsdFile->Get("esdTree");
+ // fTree->SetBranchAddress("ESD", &fEvent);
+ fTree->SetBranchStatus("MuonTracks*",0);
+ fTree->SetBranchStatus("PmdTracks*",0);
+ fTree->SetBranchStatus("TrdTracks*",0);
+ fTree->SetBranchStatus("V0s*",0);
+ fTree->SetBranchStatus("Cascades*",0);
+ fTree->SetBranchStatus("Kinks*",0);
+ fTree->SetBranchStatus("CaloClusters*",0);
+ fTree->SetBranchStatus("AliRawDataErrorLogs*",0);
+ fTree->SetBranchStatus("ESDfriend*",0);
+ fEvent->ReadFromTree(fTree);
fNumberofEvent=fTree->GetEntries();
cout<<"Number of Entries in file "<<fNumberofEvent<<endl;
}
cout<<"starting to read event "<<fCurEvent<<endl;
fTree->GetEvent(fCurEvent);//getting next event
- fEvent->SetESDfriend(fEventFriend);
+ cout << "Read event " << fEvent << " from file " << fTree << endl;
// vector<int> tLabelTable;//to check labels
hbtEvent = new AliFemtoEvent;
int nofTracks=0; //number of reconstructed tracks in event
nofTracks=fEvent->GetNumberOfTracks();
int realnofTracks=0;//number of track which we use ina analysis
-
- // Clear the shared cluster list
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- }
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- }
-
-
- for (int i=0;i<nofTracks;i++) {
- const AliESDtrack *esdtrack=fEvent->GetTrack(i);//getting next track
-
- list<Int_t>::iterator tClustIter;
-
- Int_t tTrackIndices[AliESDfriendTrack::kMaxTPCcluster];
- Int_t tNClusters = esdtrack->GetTPCclusters(tTrackIndices);
- for (int tNcl=0; tNcl<AliESDfriendTrack::kMaxTPCcluster; tNcl++) {
- if (tTrackIndices[tNcl] >= 0) {
- tClustIter = find(fClusterPerPadrow[tNcl]->begin(), fClusterPerPadrow[tNcl]->end(), tTrackIndices[tNcl]);
- if (tClustIter == fClusterPerPadrow[tNcl]->end()) {
- fClusterPerPadrow[tNcl]->push_back(tTrackIndices[tNcl]);
- }
- else {
- fSharedList[tNcl]->push_back(tTrackIndices[tNcl]);
- }
- }
- }
-
- }
+ cout << "Event has " << nofTracks << " tracks " << endl;
for (int i=0;i<nofTracks;i++)
{
trackCopy->SetPidProbProton(esdpid[4]);
double pxyz[3];
+ if (fReadInner == true) {
+
+ if (esdtrack->GetTPCInnerParam()) {
+ AliExternalTrackParam *param = new AliExternalTrackParam(*esdtrack->GetTPCInnerParam());
+ param->PropagateToDCA(fEvent->GetPrimaryVertex(), (fEvent->GetMagneticField()), 10000);
+ param->GetPxPyPz(pxyz);//reading noconstarined momentum
+ delete param;
+
+ AliFemtoModelHiddenInfo *tInfo = new AliFemtoModelHiddenInfo();
+ tInfo->SetPDGPid(211);
+ tInfo->SetTrueMomentum(pxyz[0], pxyz[1], pxyz[2]);
+ tInfo->SetMass(0.13957);
+ trackCopy->SetHiddenInfo(tInfo);
+ }
+ }
if (fConstrained==true)
tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
else
trackCopy->SetTrackId(esdtrack->GetID());
trackCopy->SetFlags(esdtrack->GetStatus());
- //trackCopy->SetLabel(esdtrack->GetLabel());
+ trackCopy->SetLabel(esdtrack->GetLabel());
//some stuff which could be useful
float impact[2];
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->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
+ trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
+ 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
hbtEvent->SetNumberOfTracks(realnofTracks);//setting number of track which we read in event
fCurEvent++;
cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
- if (fCurEvent== fNumberofEvent)//if end of current file close all
- {
- fTree->Reset();
- delete fTree;
- fEsdFile->Close();
- }
+// if (fCurEvent== fNumberofEvent)//if end of current file close all
+// {
+// fTree->Reset();
+// delete fTree;
+// fEsdFile->Close();
+// }
return hbtEvent;
}
/*
*$Id$
*$Log$
+ *Revision 1.1.2.1 2007/09/30 11:38:59 akisiel
+ *Adapt the readers to the new AliESDEvent structure
+ *
+ *Revision 1.1 2007/05/16 10:22:11 akisiel
+ *Making the directory structure of AliFemto flat. All files go into one common directory
+ *
*Revision 1.4 2007/05/03 09:45:20 akisiel
*Fixing Effective C++ warnings
*
#include <string>
#include <vector>
#include "TTree.h"
-#include "AliESD.h"
-#include "AliESDfriend.h"
+#include "TChain.h"
+#include "AliESDEvent.h"
#include <list>
class AliFemtoEvent;
AliFemtoEventReaderESD& operator=(const AliFemtoEventReaderESD& aReader);
- AliFemtoEvent* ReturnHbtEvent();
+ virtual AliFemtoEvent* ReturnHbtEvent();
AliFemtoString Report();
//void SetFileName(const char* fileName);
void SetInputFile(const char* inputFile);
void SetConstrained(const bool constrained);
bool GetConstrained() const;
+ void SetReadTPCInner(const bool readinner);
+ bool GetReadTPCInner() const;
protected:
private:
- bool GetNextFile(); // setting next file to read
-
string fInputFile; // name of input file with ESD filenames
string fFileName; // name of current ESD file
bool fConstrained; // flag to set which momentum from ESD file will be use
+ bool fReadInner; // flag to set if one wants to read TPC-only momentum
+ // instead of the global one
int fNumberofEvent; // number of Events in ESD file
int fCurEvent; // number of current event
- unsigned int fCurFile; // number of current file
- vector<string> fListOfFiles; // list of ESD files
- TTree* fTree; // ESD tree
- AliESD* fEvent; // ESD event
+ TChain* fTree; // ESD tree
TFile* fEsdFile; // ESD file
- AliESDfriend* fEventFriend; // ESD friend informaion
-
- 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
+ AliESDEvent* fEvent; // ESD event
#ifdef __ROOT__
- ClassDef(AliFemtoEventReaderESD, 10)
+ ClassDef(AliFemtoEventReaderESD, 11)
#endif
};
#include "TFile.h"
#include "TTree.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
+#include "AliESDVertex.h"
#include "AliFmPhysicalHelixD.h"
#include "AliFmThreeVectorF.h"
fNumberofEvent(0),
fCurEvent(0),
fCurFile(0),
- fEvent(0x0),
- fEventFriend(0),
- fSharedList(0x0),
- fClusterPerPadrow(0x0)
+ fEvent(0x0)
{
//constructor with 0 parameters , look at default settings
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- }
+// fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad] = new list<Int_t>();
+// }
+// fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad] = new list<Int_t>();
+// }
}
//__________________
fNumberofEvent(0),
fCurEvent(0),
fCurFile(0),
- fEvent(0x0),
- fEventFriend(0),
- fSharedList(0x0),
- fClusterPerPadrow(0x0)
+ fEvent(0x0)
{
// Copy constructor
fConstrained = aReader.fConstrained;
fCurEvent = aReader.fCurEvent;
fCurFile = aReader.fCurFile;
// fEvent = new AliESD(*aReader.fEvent);
- fEvent = new AliESD();
- fEventFriend = aReader.fEventFriend;
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
- fClusterPerPadrow[tPad]->push_back(*iter);
- }
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
- fSharedList[tPad]->push_back(*iter);
- }
- }
+ fEvent = new AliESDEvent();
+// fEventFriend = aReader.fEventFriend;
+// fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad] = new list<Int_t>();
+// list<Int_t>::iterator iter;
+// for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
+// fClusterPerPadrow[tPad]->push_back(*iter);
+// }
+// }
+// fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad] = new list<Int_t>();
+// list<Int_t>::iterator iter;
+// for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
+// fSharedList[tPad]->push_back(*iter);
+// }
+// }
}
//__________________
AliFemtoEventReaderESDChain::~AliFemtoEventReaderESDChain()
//Destructor
delete fEvent;
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- delete fClusterPerPadrow[tPad];
- }
- delete [] fClusterPerPadrow;
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- delete fSharedList[tPad];
- }
- delete [] fSharedList;
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad]->clear();
+// delete fClusterPerPadrow[tPad];
+// }
+// delete [] fClusterPerPadrow;
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad]->clear();
+// delete fSharedList[tPad];
+// }
+// delete [] fSharedList;
}
//__________________
fCurEvent = aReader.fCurEvent;
fCurFile = aReader.fCurFile;
if (fEvent) delete fEvent;
- fEvent = new AliESD();
+ fEvent = new AliESDEvent();
- fEventFriend = aReader.fEventFriend;
+ // fEventFriend = aReader.fEventFriend;
- if (fClusterPerPadrow) {
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- delete fClusterPerPadrow[tPad];
- }
- delete [] fClusterPerPadrow;
- }
+// if (fClusterPerPadrow) {
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad]->clear();
+// delete fClusterPerPadrow[tPad];
+// }
+// delete [] fClusterPerPadrow;
+// }
- if (fSharedList) {
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- delete fSharedList[tPad];
- }
- delete [] fSharedList;
- }
-
- fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
- fClusterPerPadrow[tPad]->push_back(*iter);
- }
- }
- fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad] = new list<Int_t>();
- list<Int_t>::iterator iter;
- for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
- fSharedList[tPad]->push_back(*iter);
- }
- }
+// if (fSharedList) {
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad]->clear();
+// delete fSharedList[tPad];
+// }
+// delete [] fSharedList;
+// }
+
+// fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad] = new list<Int_t>();
+// list<Int_t>::iterator iter;
+// for (iter=aReader.fClusterPerPadrow[tPad]->begin(); iter!=aReader.fClusterPerPadrow[tPad]->end(); iter++) {
+// fClusterPerPadrow[tPad]->push_back(*iter);
+// }
+// }
+// fSharedList = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad] = new list<Int_t>();
+// list<Int_t>::iterator iter;
+// for (iter=aReader.fSharedList[tPad]->begin(); iter!=aReader.fSharedList[tPad]->end(); iter++) {
+// fSharedList[tPad]->push_back(*iter);
+// }
+// }
return *this;
}
// Get the friend information
cout<<"starting to read event "<<fCurEvent<<endl;
- fEvent->SetESDfriend(fEventFriend);
+ // fEvent->SetESDfriend(fEventFriend);
vector<int> tLabelTable;//to check labels
hbtEvent = new AliFemtoEvent;
nofTracks=fEvent->GetNumberOfTracks();
int realnofTracks=0;//number of track which we use ina analysis
- // Clear the shared cluster list
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fClusterPerPadrow[tPad]->clear();
- }
- for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
- fSharedList[tPad]->clear();
- }
-
-
- for (int i=0;i<nofTracks;i++) {
- const AliESDtrack *esdtrack=fEvent->GetTrack(i);//getting next track
-
- list<Int_t>::iterator tClustIter;
-
- Int_t tTrackIndices[AliESDfriendTrack::kMaxTPCcluster];
- Int_t tNClusters = esdtrack->GetTPCclusters(tTrackIndices);
- for (int tNcl=0; tNcl<AliESDfriendTrack::kMaxTPCcluster; tNcl++) {
- if (tTrackIndices[tNcl] >= 0) {
- tClustIter = find(fClusterPerPadrow[tNcl]->begin(), fClusterPerPadrow[tNcl]->end(), tTrackIndices[tNcl]);
- if (tClustIter == fClusterPerPadrow[tNcl]->end()) {
- fClusterPerPadrow[tNcl]->push_back(tTrackIndices[tNcl]);
- }
- else {
- fSharedList[tNcl]->push_back(tTrackIndices[tNcl]);
- }
- }
- }
+// // Clear the shared cluster list
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fClusterPerPadrow[tPad]->clear();
+// }
+// for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
+// fSharedList[tPad]->clear();
+// }
+
+
+// for (int i=0;i<nofTracks;i++) {
+// const AliESDtrack *esdtrack=fEvent->GetTrack(i);//getting next track
+
+// list<Int_t>::iterator tClustIter;
+
+// Int_t tTrackIndices[AliESDfriendTrack::kMaxTPCcluster];
+// Int_t tNClusters = esdtrack->GetTPCclusters(tTrackIndices);
+// for (int tNcl=0; tNcl<AliESDfriendTrack::kMaxTPCcluster; tNcl++) {
+// if (tTrackIndices[tNcl] >= 0) {
+// tClustIter = find(fClusterPerPadrow[tNcl]->begin(), fClusterPerPadrow[tNcl]->end(), tTrackIndices[tNcl]);
+// if (tClustIter == fClusterPerPadrow[tNcl]->end()) {
+// fClusterPerPadrow[tNcl]->push_back(tTrackIndices[tNcl]);
+// }
+// else {
+// fSharedList[tNcl]->push_back(tTrackIndices[tNcl]);
+// }
+// }
+// }
- }
+// }
for (int i=0;i<nofTracks;i++)
{
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 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);
- }
- }
- }
+// // 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->SetTPCClusterMap(esdtrack->GetTPCClusterMap());
+ trackCopy->SetTPCSharedMap(esdtrack->GetTPCSharedMap());
if (tGoodMomentum==true)
{
return hbtEvent;
}
//___________________
-void AliFemtoEventReaderESDChain::SetESDSource(AliESD *aESD)
+void AliFemtoEventReaderESDChain::SetESDSource(AliESDEvent *aESD)
{
// The chain loads the ESD for us
// You must provide the address where it can be found
fEvent = aESD;
}
//___________________
-void AliFemtoEventReaderESDChain::SetESDfriendSource(AliESDfriend *aFriend)
-{
- // We need the ESD tree to obtain
- // information about the friend file location
- fEventFriend = aFriend;
-}
+// void AliFemtoEventReaderESDChain::SetESDfriendSource(AliESDfriend *aFriend)
+// {
+// // We need the ESD tree to obtain
+// // information about the friend file location
+// fEventFriend = aFriend;
+// }
#include <string>
#include <vector>
#include "TTree.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDfriend.h"
#include <list>
void SetConstrained(const bool constrained);
bool GetConstrained() const;
- void SetESDSource(AliESD *aESD);
- void SetESDfriendSource(AliESDfriend *aFriend);
+ void SetESDSource(AliESDEvent *aESD);
+ // void SetESDfriendSource(AliESDfriend *aFriend);
protected:
int fNumberofEvent; //number of Events in ESD file
int fCurEvent; //number of current event
unsigned int fCurFile; //number of current file
- AliESD* fEvent; //ESD event
- AliESDfriend* fEventFriend;
+ AliESDEvent* fEvent; //ESD event
+ // AliESDfriend* fEventFriend;
- 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
+/* 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 */
#ifdef __ROOT__
ClassDef(AliFemtoEventReaderESDChain, 1)
#include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
#include "AliFemtoModelHiddenInfo.h"
#include "AliFemtoModelCorrFctn.h"
+#include "AliFemtoPair.h"
+#include "AliFemtoModelManager.h"
+#include <TH1D.h>
//_______________________
AliFemtoModelCorrFctn::AliFemtoModelCorrFctn():
fNumeratorFake(0),
fDenominator(0)
{
+ // Default constructor
fNumeratorTrue = new TH1D("ModelNumTrue","ModelNumTrue",50,0.0,0.5);
fNumeratorFake = new TH1D("ModelNumFake","ModelNumFake",50,0.0,0.5);
fDenominator = new TH1D("ModelDen","ModelDen",50,0.0,0.5);
fNumeratorFake(0),
fDenominator(0)
{
+ // Normal constructor
char buf[100];
sprintf(buf, "NumTrue%s", title);
fNumeratorTrue = new TH1D(buf,buf,aNbins,aQinvLo,aQinvHi);
fNumeratorFake(0),
fDenominator(0)
{
+ // Copy constructor
if (aCorrFctn.fNumeratorTrue)
fNumeratorTrue = new TH1D(*(aCorrFctn.fNumeratorTrue));
if (aCorrFctn.fNumeratorFake)
//_______________________
AliFemtoModelCorrFctn::~AliFemtoModelCorrFctn()
{
+ // Destructor
if (fNumeratorTrue) delete fNumeratorTrue;
if (fNumeratorFake) delete fNumeratorFake;
if (fDenominator) delete fDenominator;
//_______________________
AliFemtoModelCorrFctn& AliFemtoModelCorrFctn::operator=(const AliFemtoModelCorrFctn& aCorrFctn)
{
+ // Assignment operator
if (this == &aCorrFctn)
return *this;
//_______________________
AliFemtoString AliFemtoModelCorrFctn::Report()
{
+ // Prepare report
AliFemtoString tStr = "AliFemtoModelCorrFctn report";
return tStr;
//_______________________
void AliFemtoModelCorrFctn::Write()
{
+ // Write out data histos
fNumeratorTrue->Write();
fNumeratorFake->Write();
fDenominator->Write();
//_______________________
AliFemtoModelCorrFctn* AliFemtoModelCorrFctn::Clone()
{
+ // Create clone
AliFemtoModelCorrFctn *tCopy = new AliFemtoModelCorrFctn(*this);
return tCopy;
/// uses the model framework and weight generation ///
/// ///
////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoModelCorrFctn_hh
-#define AliFemtoModelCorrFctn_hh
+#ifndef ALIFEMTOMODELCORRFCTN_H
+#define ALIFEMTOMODELCORRFCTN_H
#include "AliFemtoCorrFctn.h"
-#include "AliFemtoPair.h"
-#include "AliFemtoModelManager.h"
+class AliFemtoPair;
+class AliFemtoModelManager;
+class TH1D;
class AliFemtoModelCorrFctn: public AliFemtoCorrFctn {
AliFemtoModelGausLCMSFreezeOutGenerator();
AliFemtoModelGausLCMSFreezeOutGenerator(const AliFemtoModelGausLCMSFreezeOutGenerator &aModel);
virtual ~AliFemtoModelGausLCMSFreezeOutGenerator();
- virtual void GenerateFreezeOut(AliFemtoPair *aPair);;
+ virtual void GenerateFreezeOut(AliFemtoPair *aPair);
void SetSizeOut(Double_t aSizeOut);
void SetSizeSide(Double_t aSizeSide);
fMass(0)
{
// Default constructor
-};
+}
//_____________________________________________
AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &aInfo) :
fTrueMomentum(0),
ClassImp(AliFemtoModelGausLCMSFreezeOutGenerator, 1)
#endif
+#include "AliFemtoPair.h"
+
#include "AliFemtoModelWeightGenerator.h"
#include "AliFemtoModelHiddenInfo.h"
//_____________________________________________
void AliFemtoModelWeightGenerator::SetPairTypeFromPair(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();
/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
/// ///
////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoModelWeightGenerator_hh
-#define AliFemtoModelWeightGenerator_hh
+#ifndef ALIFEMTOMODELWEIGHTGENERATOR_H
+#define ALIFEMTOMODELWEIGHTGENERATOR_H
#include "TRandom2.h"
-#include "AliFemtoPair.h"
+class AliFemtoPair;
class AliFemtoModelWeightGenerator
{
static const Int_t fgkKaonPlusAntiproton;// opposite-charge kaon proton pair
protected:
- Int_t fPairType;
+ Int_t fPairType; // Type of the pair for which the calculation is done
Double_t fKStarOut; // relative momentum out component in PRF
Double_t fKStarSide; // relative momentum side component in PRF
//#include "StHbtMaker/ThCorrFctn/AliFemtoModelWeightGeneratorLednicky.h"
#include "AliFemtoModelWeightGeneratorLednicky.h"
#include "AliFemtoModelHiddenInfo.h"
+#include "AliFemtoPair.h"
//#include "StarCallf77.h"
//#include <strstream.h>
//#include <iomanip.h>
strcpy( fLLName[30],"Proton Anti-proton");// gael 21May02
FsiInit();
FsiNucl();
-};
+}
//______________________
AliFemtoModelWeightGeneratorLednicky::AliFemtoModelWeightGeneratorLednicky(const AliFemtoModelWeightGeneratorLednicky &aWeight):
AliFemtoModelWeightGenerator(),
if (fI3c==0) return fWein;
fWeightDen=fWeif;
return fWei;
- };
-};
+ }
+}
AliFemtoString AliFemtoModelWeightGeneratorLednicky::Report() {
// create report
cout <<"mIsi dans FsiInit() = " << fIsi << endl;
cout <<"mI3c dans FsiInit() = " << fI3c << endl;
fsiin(fItest,fIch,fIqs,fIsi,fI3c);
-};
+}
void AliFemtoModelWeightGeneratorLednicky::FsiNucl(){
// initialize weight generation taking into account the residual charge
cout <<"fNuclCharge dans FsiNucl() = " << fNuclCharge << endl;
cout <<"fNuclChargeSign dans FsiNucl() = " << fNuclChargeSign << endl;
fsinucl(fNuclMass,fNuclCharge*fNuclChargeSign);
-};
+}
void AliFemtoModelWeightGeneratorLednicky::FsiSetLL(){
// set internal pair type for the module
int tNS;
if (fSphereApp||(fLL>5)) {
if (fT0App) { tNS=4;}
- else {tNS=2;};
- } else { tNS=1;};
+ else {tNS=2;}
+ } else { tNS=1;}
//cout <<"fLL dans FsiSetLL() = "<< fLL << endl;
//cout <<"tNS dans FsiSetLL() = "<< tNS << endl;
//cout <<"fItest dans FsiSetLL() = "<< fItest << endl;
case ksLamPid: fLL=27;tChargeFactor*=1 ;break;
case -ksProtPid: fLL=30;tChargeFactor*=1 ;break;
default: fLL=0;
- };
+ }
break;
case ksKPid:
switch (tPidh) {
case ksProtPid: fLL=16;tChargeFactor*=1 ;break;
case -ksProtPid: fLL=17;tChargeFactor*=-1 ;break;
default: fLL=0;
- };
+ }
break;
case ksK0Pid:
switch (tPidh) {
case ksK0Pid: fLL=22;tChargeFactor*=1 ;break;
case -ksK0Pid: fLL=23;tChargeFactor*=1 ;break;
default: fLL=0;
- };
+ }
break;
case ksPi0Pid:
switch (tPidh) {
case ksPi0Pid: fLL=6; tChargeFactor*=1 ;break;
default: fLL=0;
- };
+ }
break;
case ksNeutPid:
switch (tPidh) {
case ksProtPid: fLL=3; tChargeFactor*=1 ;break;
case ksLamPid: fLL=28;tChargeFactor*=1 ;break;
default: fLL=0;
- };
+ }
break; //Gael 21May02
case ksLamPid: //Gael 21May02
switch (tPidh) { //Gael 21May02
case ksLamPid: fLL=29;tChargeFactor*=1 ;break;//Gael 21May02
default: fLL=0; //Gael 21May02
- }; //Gael 21May02
+ } //Gael 21May02
break; //Gael 21May02
default: fLL=0;
}
}
AliFemtoModelWeightGeneratorLednicky::~AliFemtoModelWeightGeneratorLednicky()
-{ /* no-op */ };
+{ /* no-op */ }
//_____________________________________________
void AliFemtoModelWeightGeneratorLednicky::SetPairType(Int_t aPairType)
SetPid(ktPid1, ktPid2);
}
-void AliFemtoModelWeightGeneratorLednicky::SetNuclCharge(const double aNuclCharge) {fNuclCharge=aNuclCharge;FsiNucl();};
-void AliFemtoModelWeightGeneratorLednicky::SetNuclMass(const double aNuclMass){fNuclMass=aNuclMass;FsiNucl();};
+void AliFemtoModelWeightGeneratorLednicky::SetNuclCharge(const double aNuclCharge) {fNuclCharge=aNuclCharge;FsiNucl();}
+void AliFemtoModelWeightGeneratorLednicky::SetNuclMass(const double aNuclMass){fNuclMass=aNuclMass;FsiNucl();}
-void AliFemtoModelWeightGeneratorLednicky::SetSphere(){fSphereApp=true;};
-void AliFemtoModelWeightGeneratorLednicky::SetSquare(){fSphereApp=false;};
-void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOn(){ fT0App=true;};
-void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOff(){ fT0App=false;};
+void AliFemtoModelWeightGeneratorLednicky::SetSphere(){fSphereApp=true;}
+void AliFemtoModelWeightGeneratorLednicky::SetSquare(){fSphereApp=false;}
+void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOn(){ fT0App=true;}
+void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOff(){ fT0App=false;}
void AliFemtoModelWeightGeneratorLednicky::SetDefaultCalcPar(){
fItest=1;fIqs=1;fIsi=1;fI3c=0;fIch=1;FsiInit();
- fSphereApp=false;fT0App=false;};
-
-void AliFemtoModelWeightGeneratorLednicky::SetCoulOn() {fItest=1;fIch=1;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::SetCoulOff() {fItest=1;fIch=0;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::SetQuantumOn() {fItest=1;fIqs=1;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::SetQuantumOff(){fItest=1;fIqs=0;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::SetStrongOn() {fItest=1;fIsi=1;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::SetStrongOff() {fItest=1;fIsi=0;FsiInit();};
-void AliFemtoModelWeightGeneratorLednicky::Set3BodyOn() {fItest=1;fI3c=1;FsiInit();FsiNucl();};
-void AliFemtoModelWeightGeneratorLednicky::Set3BodyOff() {fItest=1;fI3c=0;FsiInit();fWeightDen=1.;FsiNucl();};
+ fSphereApp=false;fT0App=false;}
+
+void AliFemtoModelWeightGeneratorLednicky::SetCoulOn() {fItest=1;fIch=1;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::SetCoulOff() {fItest=1;fIch=0;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::SetQuantumOn() {fItest=1;fIqs=1;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::SetQuantumOff(){fItest=1;fIqs=0;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::SetStrongOn() {fItest=1;fIsi=1;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::SetStrongOff() {fItest=1;fIsi=0;FsiInit();}
+void AliFemtoModelWeightGeneratorLednicky::Set3BodyOn() {fItest=1;fI3c=1;FsiInit();FsiNucl();}
+void AliFemtoModelWeightGeneratorLednicky::Set3BodyOff() {fItest=1;fI3c=0;FsiInit();fWeightDen=1.;FsiNucl();}
Double_t AliFemtoModelWeightGeneratorLednicky::GetKStar() const {return AliFemtoModelWeightGenerator::GetKStar();}
Double_t AliFemtoModelWeightGeneratorLednicky::GetKStarOut() const { return AliFemtoModelWeightGenerator::GetKStarOut(); }
fgMaxDzInner = aMaxDzInner;
fgMaxDuOuter = aMaxDuOuter;
fgMaxDzOuter = aMaxDzOuter;
-};
+}
AliFemtoPair::~AliFemtoPair() {
// Destructor
inline AliFemtoPairCut::AliFemtoPairCut(const AliFemtoPairCut& c) : AliFemtoCutMonitorHandler(), fyAnalysis(0) { }
inline void AliFemtoPairCut::SetAnalysis(AliFemtoAnalysis* analysis) { fyAnalysis = analysis; }
-inline AliFemtoPairCut::AliFemtoPairCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0) {}; // default constructor. - Users should write their own
+inline AliFemtoPairCut::AliFemtoPairCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0) {} // default constructor. - Users should write their own
inline AliFemtoPairCut& AliFemtoPairCut::operator=(const AliFemtoPairCut &aCut) { if (this == &aCut) return *this; fyAnalysis = aCut.fyAnalysis; return *this; }
#endif
// the following method is for explicit internal calculation to fill datamembers.
// It is invoked automatically if AliFemtoParticle constructed from AliFemtoTrack
- //void CalculateNominalTpcExitAndEntrancePoints(); // NOTE - this requires the fHelix, so be sure this is filled
+ // void CalculateNominalTpcExitAndEntrancePoints();
+ // NOTE - this requires the fHelix, so be sure this is filled
AliFemtoThreeVector fNominalPosSample[11]; // I make this public for convenience and speed of AliFemtoPair()
};
inline AliFemtoTrack* AliFemtoParticle::Track() const { return fTrack; }
-inline unsigned long AliFemtoParticle::TrackId() const { return fTrack->TrackId(); };
+inline unsigned long AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }
inline const AliFemtoLorentzVector& AliFemtoParticle::FourMomentum() const {return fFourMomentum;}
inline AliFmPhysicalHelixD& AliFemtoParticle::Helix() {return fHelix;}
//inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return fMap[word];}
#endif
};
-inline AliFemtoParticleCut::AliFemtoParticleCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0){}; // default constructor. - Users should write their own
+inline AliFemtoParticleCut::AliFemtoParticleCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0){} // default constructor. - Users should write their own
inline AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0) {
fMass = c.fMass; fyAnalysis = 0;
#ifdef STHBTDEBUG
+////////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoPicoEvent - internal AliFemto representation of the event. //
+// Created for the sake of minimizing the used size. Multiple instances are //
+// stored in memory when several mixing bins are used. //
+// //
+////////////////////////////////////////////////////////////////////////////////
/***************************************************************************
*
* $Id$
***************************************************************************
*
* $Log$
+ * Revision 1.1.2.1 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.1 2007/05/16 10:22:11 akisiel
+ * Making the directory structure of AliFemto flat. All files go into one common directory
+ *
* Revision 1.2 2007/05/03 09:42:29 akisiel
* Fixing Effective C++ warnings
*
**************************************************************************/
#include "AliFemtoPicoEvent.h"
+#include "AliFemtoParticleCollection.h"
//________________
AliFemtoPicoEvent::AliFemtoPicoEvent() :
fSecondParticleCollection(0),
fThirdParticleCollection(0)
{
+ // Default constructor
fFirstParticleCollection = new AliFemtoParticleCollection;
fSecondParticleCollection = new AliFemtoParticleCollection;
fThirdParticleCollection = new AliFemtoParticleCollection;
fSecondParticleCollection(0),
fThirdParticleCollection(0)
{
+ // Copy constructor
AliFemtoParticleIterator iter;
fFirstParticleCollection = new AliFemtoParticleCollection;
}
//_________________
AliFemtoPicoEvent::~AliFemtoPicoEvent(){
+ // Destructor
AliFemtoParticleIterator iter;
if (fFirstParticleCollection){
}
}
//_________________
- AliFemtoPicoEvent& AliFemtoPicoEvent::operator=(AliFemtoPicoEvent& aPicoEvent)
+AliFemtoPicoEvent& AliFemtoPicoEvent::operator=(const AliFemtoPicoEvent& aPicoEvent)
{
+ // Assignment operator
if (this == &aPicoEvent)
return *this;
***************************************************************************
*
* $Log$
+ * Revision 1.1.2.1 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.1 2007/05/16 10:22:11 akisiel
+ * Making the directory structure of AliFemto flat. All files go into one common directory
+ *
* Revision 1.2 2007/05/03 09:42:29 akisiel
* Fixing Effective C++ warnings
*
*
**************************************************************************/
-#ifndef AliFemtoPicoEvent_hh
-#define AliFemtoPicoEvent_hh
+#ifndef ALIFEMTOPICOEVENT_H
+#define ALIFEMTOPICOEVENT_H
#include "AliFemtoParticleCollection.h"
AliFemtoPicoEvent(const AliFemtoPicoEvent& aPicoEvent);
~AliFemtoPicoEvent();
- AliFemtoPicoEvent& operator=(AliFemtoPicoEvent& aPicoEvent);
+ AliFemtoPicoEvent& operator=(const AliFemtoPicoEvent& aPicoEvent);
/* may want to have other stuff in here, like where is primary vertex */
AliFemtoParticleCollection* ThirdParticleCollection();
private:
- AliFemtoParticleCollection* fFirstParticleCollection;
- AliFemtoParticleCollection* fSecondParticleCollection;
- AliFemtoParticleCollection* fThirdParticleCollection;
+ AliFemtoParticleCollection* fFirstParticleCollection; // Collection of particles of type 1
+ AliFemtoParticleCollection* fSecondParticleCollection; // Collection of particles of type 2
+ AliFemtoParticleCollection* fThirdParticleCollection; // Collection of particles of type 3
};
inline AliFemtoParticleCollection* AliFemtoPicoEvent::FirstParticleCollection(){return fFirstParticleCollection;}
{
// Default constructor
fHiddenInfo = NULL;
+ fKinkIndexes[0] = 0;
+ fKinkIndexes[1] = 0;
+ fKinkIndexes[2] = 0;
// cout << "Created track " << this << endl;
}
fHiddenInfo = t.GetHiddenInfo()->Clone();
else
fHiddenInfo = NULL;
+ fKinkIndexes[0] = t.fKinkIndexes[0];
+ fKinkIndexes[1] = t.fKinkIndexes[1];
+ fKinkIndexes[2] = t.fKinkIndexes[2];
// cout << "Created track " << this << endl;
-};
+}
AliFemtoTrack& AliFemtoTrack::operator=(const AliFemtoTrack& aTrack)
{
fTPCsignalS=aTrack.fTPCsignalS;
fClusters=aTrack.fClusters;
fShared=aTrack.fShared;
+ fKinkIndexes[0] = aTrack.fKinkIndexes[0];
+ fKinkIndexes[1] = aTrack.fKinkIndexes[1];
+ fKinkIndexes[2] = aTrack.fKinkIndexes[2];
if (ValidHiddenInfo())
delete fHiddenInfo;
if (aTrack.ValidHiddenInfo())
fShared.SetBitNumber(aNBit, aValue);
}
+void AliFemtoTrack::SetTPCClusterMap(const TBits& aBits)
+{
+ fClusters = aBits;
+}
+void AliFemtoTrack::SetTPCSharedMap(const TBits& aBits)
+{
+ fShared = aBits;
+}
+
+void AliFemtoTrack::SetKinkIndexes(int points[3])
+{
+ fKinkIndexes[0] = points[0];
+ fKinkIndexes[1] = points[1];
+ fKinkIndexes[2] = points[2];
+}
+
+int AliFemtoTrack::KinkIndex(int aIndex) const
+{
+ if ((aIndex <3) && (aIndex>=0))
+ return fKinkIndexes[aIndex];
+ else
+ return 0;
+}
void SetTPCcluster(const short& aNBit, const Bool_t& aValue);
void SetTPCshared(const short& aNBit, const Bool_t& aValue);
+ void SetTPCClusterMap(const TBits& aBits);
+ void SetTPCSharedMap(const TBits& aBits);
+
+ void SetKinkIndexes(int points[3]);
+ int KinkIndex(int aIndex) const;
+
/* Th stuff */
void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo);
bool ValidHiddenInfo() const;
kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
- kHMPIDpid=0x20000,
+ kRICHpid=0x20000,
kTRDbackup=0x80000,
kTRDStop=0x20000000,
kESDpid=0x40000000,
// TPC related track information
float fTPCchi2; // chi2 in the TPC
int fTPCncls; // number of clusters assigned in the TPC
- short fTPCnclsF; // number of findable clusters in the TPC
- short fTPCsignalN; // number of points used for dEdx
- float fTPCsignalS; // RMS of dEdx measurement
- TBits fClusters; // Cluster per padrow map
- TBits fShared; // Sharing per padrow map
-
+ short fTPCnclsF; // number of findable clusters in the TPC
+ short fTPCsignalN; // number of points used for dEdx
+ float fTPCsignalS; // RMS of dEdx measurement
+ TBits fClusters; // Cluster per padrow map
+ TBits fShared; // Sharing per padrow map
+
+ int fKinkIndexes[3]; // Kink Index list
/* Th stuff */
// Fab private : add mutable
// mutable
+////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoVertexAnalysis - Femtoscopic analysis which mixes events //
+// with respect to the z position of the primary vertex //
+// //
+////////////////////////////////////////////////////////////////////////////
/***************************************************************************
*
* $Id$
***************************************************************************
*
* $Log$
+ * Revision 1.2.2.2 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.2.2.1 2007/10/05 09:38:17 akisiel
+ * Fix stray colons
+ *
+ * Revision 1.2 2007/07/09 16:17:11 mlisa
+ * several files changed to change name of AliFemtoAnalysis to AliFemtoSimpleAnalysis and AliFemtoBaseAnalysis to AliFemtoAnalysis. Also removed some hard-coded cuts of Marek
+ *
* Revision 1.1 2007/05/16 10:22:12 akisiel
* Making the directory structure of AliFemto flat. All files go into one common directory
*
fOverFlow = 0;
if (fMixingBuffer) delete fMixingBuffer;
fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexBins,fVertexZ[0],fVertexZ[1]);
-};
+}
//____________________________
AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) :
//____________________________
AliFemtoString AliFemtoVertexAnalysis::Report()
{
+ // prepare report fromt the execution
cout << "AliFemtoVertexAnalysis - constructing Report..."<<endl;
- char Ctemp[200];
+ char ctemp[200];
AliFemtoString temp = "-----------\nHbt AliFemtoVertexAnalysis Report:\n";
- sprintf(Ctemp,"Events are mixed in %d bins in the range %E cm to %E cm.\n",fVertexBins,fVertexZ[0],fVertexZ[1]);
- temp += Ctemp;
- sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlow);
- temp += Ctemp;
- sprintf(Ctemp,"Events overflowing: %d\n",fOverFlow);
- temp += Ctemp;
- sprintf(Ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n");
- temp += Ctemp;
+ sprintf(ctemp,"Events are mixed in %d bins in the range %E cm to %E cm.\n",fVertexBins,fVertexZ[0],fVertexZ[1]);
+ temp += ctemp;
+ sprintf(ctemp,"Events underflowing: %d\n",fUnderFlow);
+ temp += ctemp;
+ sprintf(ctemp,"Events overflowing: %d\n",fOverFlow);
+ temp += ctemp;
+ sprintf(ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n");
+ temp += ctemp;
temp += AliFemtoSimpleAnalysis::Report();
AliFemtoString returnThis=temp;
return returnThis;
}
//_________________________
void AliFemtoVertexAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
+ // Put the event though the analysis
cout << " AliFemtoVertexAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
// get right mixing buffer
double vertexZ = hbtEvent->PrimVertPos().z();
+////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoVertexAnalysis - Femtoscopic analysis which mixes events //
+// with respect to the z position of the primary vertex //
+// //
+////////////////////////////////////////////////////////////////////////////
+
/***************************************************************************
* Collection and analysis for vertex dependent event mixing
* Frank Laue, Ohio State, 2000
*
**************************************************************************/
-#ifndef AliFemtoVertexAnalysis_hh
-#define AliFemtoVertexAnalysis_hh
+#ifndef ALIFEMTOVERTEXANALYSIS_H
+#define ALIFEMTOVERTEXANALYSIS_H
#include "AliFemtoSimpleAnalysis.h" // base analysis class
public:
- AliFemtoVertexAnalysis(unsigned int =10, double =-100., double=+100.);
+ AliFemtoVertexAnalysis(unsigned int bins=10, double min=-100., double max=+100.);
AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& OriginalAnalysis); // copy constructor
virtual void ProcessEvent(const AliFemtoEvent* ProcessThisEvent);
virtual ~AliFemtoVertexAnalysis();
***************************************************************************
*
* $Log$
+ * Revision 1.2.2.2 2007/10/12 14:28:37 akisiel
+ * New wave of cleanup and rule conformance
+ *
+ * Revision 1.2.2.1 2007/10/05 09:38:17 akisiel
+ * Fix stray colons
+ *
+ * Revision 1.2 2007/07/09 16:17:11 mlisa
+ * several files changed to change name of AliFemtoAnalysis to AliFemtoSimpleAnalysis and AliFemtoBaseAnalysis to AliFemtoAnalysis. Also removed some hard-coded cuts of Marek
+ *
* Revision 1.1 2007/05/16 10:22:12 akisiel
* Making the directory structure of AliFemto flat. All files go into one common directory
*
*
*
**************************************************************************/
+////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoVertexMultAnalysis - Femtoscopic analysis which mixes event //
+// with respect to the z position of the primary vertex and event total //
+// multiplicity //
+// You need to provide the number of z-vertex and multiplicity bins //
+// as well as ranges for the variables //
+// //
+////////////////////////////////////////////////////////////////////////////
#include "AliFemtoVertexMultAnalysis.h"
#include "AliFemtoParticleCollection.h"
#endif
extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut,
- AliFemtoEvent* hbtEvent,
- AliFemtoParticleCollection* partCollection);
+ AliFemtoEvent* hbtEvent,
+ AliFemtoParticleCollection* partCollection);
//____________________________
AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex,
- unsigned int binsMult, double minMult, double maxMult)
+ unsigned int binsMult, double minMult, double maxMult)
:
fVertexZBins(binsVertex),
fOverFlowVertexZ(0),
if (fMixingBuffer) delete fMixingBuffer;
fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
fMultBins,fMult[0],fMult[1]);
-};
+}
//____________________________
AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) :
//____________________________
AliFemtoString AliFemtoVertexMultAnalysis::Report()
{
+ // Prepare a report of the execution
cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl;
- char Ctemp[200];
+ char ctemp[200];
AliFemtoString temp = "-----------\nHbt AliFemtoVertexMultAnalysis Report:\n";
- sprintf(Ctemp,"Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
- temp += Ctemp;
- sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ);
- temp += Ctemp;
- sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ);
- temp += Ctemp;
- sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
- temp += Ctemp;
- sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult);
- temp += Ctemp;
- sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult);
- temp += Ctemp;
- sprintf(Ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n");
- temp += Ctemp;
+ sprintf(ctemp,"Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
+ temp += ctemp;
+ sprintf(ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ);
+ temp += ctemp;
+ sprintf(ctemp,"Events overflowing: %d\n",fOverFlowVertexZ);
+ temp += ctemp;
+ sprintf(ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
+ temp += ctemp;
+ sprintf(ctemp,"Events underflowing: %d\n",fUnderFlowMult);
+ temp += ctemp;
+ sprintf(ctemp,"Events overflowing: %d\n",fOverFlowMult);
+ temp += ctemp;
+ sprintf(ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n");
+ temp += ctemp;
temp += AliFemtoSimpleAnalysis::Report();
AliFemtoString returnThis=temp;
return returnThis;
}
//_________________________
void AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
+ // Perform event processing
+ // in bins of z vertex and multiplicity
+
cout << " AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
// get right mixing buffer
double vertexZ = hbtEvent->PrimVertPos().z();
-/***************************************************************************
- * Frank Laue, Ohio State, 2001
- *
- **************************************************************************/
+////////////////////////////////////////////////////////////////////////////
+// //
+// AliFemtoVertexMultAnalysis - Femtoscopic analysis which mixes event //
+// with respect to the z position of the primary vertex and event total //
+// multiplicity //
+// //
+////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoVertexMultAnalysis_hh
-#define AliFemtoVertexMultAnalysis_hh
+#ifndef ALIFEMTOVERTEXMULTANALYSIS_H
+#define ALIFEMTOVERTEXMULTANALYSIS_H
#include "AliFemtoSimpleAnalysis.h" // base analysis class
-#include <limits.h>
class AliFemtoVertexMultAnalysis : public AliFemtoSimpleAnalysis {
public:
- AliFemtoVertexMultAnalysis(unsigned int=10, double=-100., double=+100., unsigned int b=10, double=-1.e9, double=+1.e9);
+ AliFemtoVertexMultAnalysis(unsigned int binsVertex=10, double minVertex=-100., double maxVertex=+100., unsigned int binsMult=10, double minMult=-1.e9, double maxMult=+1.e9);
AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& TheOriginalAnalysis); // copy constructor
virtual void ProcessEvent(const AliFemtoEvent* ProcessThisEvent);
virtual ~AliFemtoVertexMultAnalysis();
virtual AliFemtoString Report(); //! returns reports of all cuts applied and correlation functions being done
- virtual unsigned int OverflowVertexZ() { return fOverFlowVertexZ;}
- virtual unsigned int UnderflowVertexZ() { return fUnderFlowVertexZ;}
- virtual unsigned int OverflowMult() { return fOverFlowMult;}
- virtual unsigned int UnderflowMult() { return fUnderFlowMult;}
+ virtual unsigned int OverflowVertexZ() const { return fOverFlowVertexZ;}
+ virtual unsigned int UnderflowVertexZ() const { return fUnderFlowVertexZ;}
+ virtual unsigned int OverflowMult() const { return fOverFlowMult;}
+ virtual unsigned int UnderflowMult() const { return fUnderFlowMult;}
protected:
double fVertexZ[2]; /* min/max z-vertex position allowed to be processed */
unsigned int fVertexZBins; /* number of VERTEX mixing bins in z-vertex in EventMixing Buffer */
inline float AliFemtoXi::DedxBac() const {return fDedxBachelor;}
inline unsigned long AliFemtoXi::TrackTopologyMapBac(unsigned int word) const { return fTopologyMapBachelor[word]; }
-inline unsigned short AliFemtoXi::IdBac() const { return fKeyBac; };
+inline unsigned short AliFemtoXi::IdBac() const { return fKeyBac; }
inline unsigned short AliFemtoXi::KeyBac() const { return fKeyBac; }
inline void AliFemtoXi::SetdecayLengthXi(const float x){ fDecayLengthXi= x;}
/***********************************************************************
*
* $Log$
+ * Revision 1.1.2.1 2007/10/05 09:38:17 akisiel
+ * Fix stray colons
+ *
+ * Revision 1.1 2007/05/16 10:22:12 akisiel
+ * Making the directory structure of AliFemto flat. All files go into one common directory
+ *
* Revision 1.2 2007/05/03 09:42:29 akisiel
* Fixing Effective C++ warnings
*
// AliFmHelix: a helper helix class //
// //
///////////////////////////////////////////////////////////////////////////
-#ifndef ALIPHYSICALHELIX_H
-#define ALIPHYSICALHELIX_H
+#ifndef ALIFMPHYSICALHELIX_H
+#define ALIFMPHYSICALHELIX_H
#include "AliFmThreeVector.h"
#include "AliFmHelix.h"
***************************************************************************
*
* $Log$
+ * Revision 1.1.2.1 2007/10/05 09:38:17 akisiel
+ * Fix stray colons
+ *
+ * Revision 1.1 2007/05/16 10:22:12 akisiel
+ * Making the directory structure of AliFemto flat. All files go into one common directory
+ *
* Revision 1.1.1.1 2007/04/25 15:38:41 panos
* Importing the HBT code dir
*
#endif
-};
+}
using namespace units;
#endif /* HEP_SYSTEM_OF_UNITS_H */