+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoEventReaderESDChain - the reader class for the Alice ESD ///
+/// tailored for the Task framework ///
+/// Reads in AliESDfriend to create shared hit/quality information ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
#include "AliFemtoEventReaderESDChain.h"
#include "TFile.h"
#include "AliESD.h"
#include "AliESDtrack.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(AliFemtoEventReaderESDChain)
using namespace std;
//____________________________
-//constructor with 0 parameters , look at default settings
AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain():
fFileName(" "),
fConstrained(true),
fSharedList(0x0),
fClusterPerPadrow(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>();
}
//__________________
-// Copy constructor
AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(const AliFemtoEventReaderESDChain& aReader):
fFileName(" "),
fConstrained(true),
fSharedList(0x0),
fClusterPerPadrow(0x0)
{
+ // Copy constructor
fConstrained = aReader.fConstrained;
fNumberofEvent = aReader.fNumberofEvent;
fCurEvent = aReader.fCurEvent;
fCurFile = aReader.fCurFile;
- //fEvent = new AliESD(*aReader.fEvent);
+ // fEvent = new AliESD(*aReader.fEvent);
fEvent = new AliESD();
fEventFriend = aReader.fEventFriend;
fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
}
}
//__________________
-//Destructor
AliFemtoEventReaderESDChain::~AliFemtoEventReaderESDChain()
{
+ //Destructor
delete fEvent;
for (int tPad=0; tPad<AliESDfriendTrack::kMaxTPCcluster; tPad++) {
}
//__________________
-// Assignment operator
AliFemtoEventReaderESDChain& AliFemtoEventReaderESDChain::operator=(const AliFemtoEventReaderESDChain& aReader)
{
+ // Assignment operator
if (this == &aReader)
return *this;
fCurEvent = aReader.fCurEvent;
fCurFile = aReader.fCurFile;
if (fEvent) delete fEvent;
- //fEvent = new AliESD(*aReader.fEvent);
- fEvent = new AliESD();
+ fEvent = new AliESD(*aReader.fEvent);
fEventFriend = aReader.fEventFriend;
}
//__________________
-// Select whether to read constrained or not constrained momentum
void AliFemtoEventReaderESDChain::SetConstrained(const bool constrained)
{
+ // Select whether to read constrained or not constrained momentum
fConstrained=constrained;
}
//__________________
-// Check whether we read constrained or not constrained momentum
bool AliFemtoEventReaderESDChain::GetConstrained() const
{
+ // Check whether we read constrained or not constrained momentum
return fConstrained;
}
//__________________
// Get the friend information
cout<<"starting to read event "<<fCurEvent<<endl;
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]);
if (v.mag() == 0) {
}
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]);
- const AliFmThreeVectorD origin(fV1[0],fV1[1],fV1[2]);
+ 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(p,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge()));
+ AliFmPhysicalHelixD helix(kP,kOrigin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge()));
trackCopy->SetHelix(helix);
trackCopy->SetTrackId(esdtrack->GetID());
}
}
- if (good_momentum==true)
+ if (tGoodMomentum==true)
{
hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis
realnofTracks++;//real number of tracks
return hbtEvent;
}
//___________________
-// The chain loads the ESD for us
-// You must provide the address where it can be found
void AliFemtoEventReaderESDChain::SetESDSource(AliESD *aESD)
{
+ // The chain loads the ESD for us
+ // You must provide the address where it can be found
fEvent = aESD;
}
//___________________
-// We need the ESD tree to obtain
-// information about the friend file location
void AliFemtoEventReaderESDChain::SetESDfriendSource(AliESDfriend *aFriend)
{
+ // We need the ESD tree to obtain
+ // information about the friend file location
fEventFriend = aFriend;
}