//#include "TSystem.h"
-#include "Infrastructure/AliFmPhysicalHelixD.h"
-#include "Infrastructure/AliFmThreeVectorF.h"
+#include "AliFmPhysicalHelixD.h"
+#include "AliFmThreeVectorF.h"
-#include "Base/SystemOfUnits.h"
+#include "SystemOfUnits.h"
-#include "Infrastructure/AliFemtoEvent.h"
+#include "AliFemtoEvent.h"
ClassImp(AliFemtoEventReaderESD)
fSharedList(0x0),
fClusterPerPadrow(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(0x0),
fClusterPerPadrow(0x0)
{
+ // copy constructor
fInputFile = aReader.fInputFile;
fFileName = aReader.fFileName;
fConstrained = aReader.fConstrained;
fCurEvent = aReader.fCurEvent;
fCurFile = aReader.fCurFile;
fTree = aReader.fTree->CloneTree();
- //fEvent = new AliESD(*aReader.fEvent);
+ // fEvent = new AliESD(*aReader.fEvent);
fEvent = new AliESD();
fEsdFile = new TFile(aReader.fEsdFile->GetName());
fEventFriend = aReader.fEventFriend;
//Destructor
AliFemtoEventReaderESD::~AliFemtoEventReaderESD()
{
+ // destructor
//delete fListOfFiles;
delete fTree;
delete fEvent;
//__________________
AliFemtoEventReaderESD& AliFemtoEventReaderESD::operator=(const AliFemtoEventReaderESD& aReader)
{
+ // assignment operator
if (this == &aReader)
return *this;
if (fTree) delete fTree;
fTree = aReader.fTree->CloneTree();
if (fEvent) delete fEvent;
- //fEvent = new AliESD(*aReader.fEvent);
fEvent = new AliESD();
if (fEsdFile) delete fEsdFile;
fEsdFile = new TFile(aReader.fEsdFile->GetName());
//__________________
AliFemtoString AliFemtoEventReaderESD::Report()
{
+ // create reader report
AliFemtoString temp = "\n This is the AliFemtoEventReaderESD\n";
return temp;
}
//__________________
-//setting the name of file where names of ESD file are written
-//it takes only this files which have good trees
void AliFemtoEventReaderESD::SetInputFile(const char* inputFile)
{
+ //setting the name of file where names of ESD file are written
+ //it takes only this files which have good trees
char buffer[256];
fInputFile=string(inputFile);
cout<<"Input File set on "<<fInputFile<<endl;
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;
cout<<"starting to read event "<<fCurEvent<<endl;
fTree->GetEvent(fCurEvent);//getting next event
fEvent->SetESDfriend(fEventFriend);
- vector<int> label_table;//to check labels
+ // vector<int> tLabelTable;//to check labels
hbtEvent = new AliFemtoEvent;
//setting basic things
for (int i=0;i<nofTracks;i++)
{
- bool good_momentum=true; //flaga to chcek if we can read momentum of this track
+ 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
double pxyz[3];
if (fConstrained==true)
- good_momentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
+ tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
else
- good_momentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum
+ tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
trackCopy->SetP(v);//setting momentum
trackCopy->SetPt(sqrt(pxyz[0]*pxyz[0]+pxyz[1]*pxyz[1]));
- const AliFmThreeVectorD p(pxyz[0],pxyz[1],pxyz[2]);
- if (p.mag() == 0) {
+ const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]);
+ if (ktP.mag() == 0) {
delete trackCopy;
continue;
}
const AliFmThreeVectorD origin(fV1[0],fV1[1],fV1[2]);
//setting helix I do not if it is ok
- AliFmPhysicalHelixD helix(p,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge()));
+ AliFmPhysicalHelixD helix(ktP,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge()));
trackCopy->SetHelix(helix);
trackCopy->SetTrackId(esdtrack->GetID());
//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 (good_momentum==true)
+ if (tGoodMomentum==true)
{
hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis
realnofTracks++;//real number of tracks