#include <TSystem.h>
#include <TChain.h>
#include <TLorentzVector.h>
+#include <TRefArray.h>
//ROOT-AliEn
#include <TGrid.h>
if(fLastEvent == -1) lastEvent = (Int_t)fChain->GetEntries();
else lastEvent = fLastEvent;
-
char fileName[256];
sprintf(fileName, "Run%d.Event%d_%d.AOD.tag.root",
fAODEvent->GetRunNumber(), fFirstEvent, lastEvent );
// Private method that creates tag files
//
-
- //reading the esd tag file
+ //reading the esd tag file
fTreeTEsd = new TChain("T");
const char * tagPattern = "ESD.tag";
// Open the working directory
if (strstr(name,tagPattern)) fTreeTEsd->Add(name);
}//directory loop
AliInfo(Form("Chained tag files: %d", fTreeTEsd->GetEntries()));
-
-
+
fChain = chain;
TString fSession = type;
Int_t ntags = 0;
Int_t tagentry = 0;
const TClonesArray *evTagList = 0;
-
+
for (Int_t iEventNumber = 0; iEventNumber < nEvents; iEventNumber++) {
// Copy old tag information
if (iEventNumber >= ntags) {
// Fill the event tag from the aod informatiom
FillEventTag(fAODEvent, evTag);
// Set the event and input file references
- evTag->SetEventId(iEventNumber+1);
+ //evTag->SetEventId(iEventNumber+1);
evTag->SetGUID(fguid);
if(!strcmp(type,"grid")) {
- evTag->SetMD5(0);
+ evTag->SetMD5("");
evTag->SetTURL(fturl);
evTag->SetSize(0);
}
Int_t nCh1GeV = 0, nCh3GeV = 0, nCh10GeV = 0;
Int_t nMu1GeV = 0, nMu3GeV = 0, nMu10GeV = 0;
Int_t nEl1GeV = 0, nEl3GeV = 0, nEl10GeV = 0;
- Float_t maxPt = .0, meanPt = .0, totalP = .0;
+ Float_t maxPt = .0, etamaxPt = -999., phimaxPt = -999., meanPt = .0, totalP = .0;
- Int_t nTracks = fAODEvent->GetNTracks();
+ TRefArray tmp;
+
+
+ // Primary Vertex
+ AliAODVertex *pVertex = fAODEvent->GetPrimaryVertex();
+ if (pVertex) {
+ evTag->SetVertexX(pVertex->GetX());
+ evTag->SetVertexY(pVertex->GetY());
+ evTag->SetVertexZ(pVertex->GetZ());
+ Double_t covmatrix[6];
+ pVertex->GetCovarianceMatrix(covmatrix);
+ evTag->SetVertexZError(sqrt(covmatrix[5]));
+ }
// loop over vertices
Int_t nVtxs = fAODEvent->GetNumberOfVertices();
for (Int_t nVtx = 0; nVtx < nVtxs; nVtx++) {
if(vertex->GetType() == 2) nV0s += 1;
if(vertex->GetType() == 3) nCascades += 1;
}
+ Int_t nTracks = fAODEvent->GetNTracks();
for (Int_t nTr = 0; nTr < nTracks; nTr++) {
AliAODTrack *track = fAODEvent->GetTrack(nTr);
Double_t fPt = track->Pt();
- if(fPt > maxPt) maxPt = fPt;
+ if(fPt > maxPt) {
+ maxPt = fPt;
+ etamaxPt = track->Eta();
+ phimaxPt = track->Phi();
+ }
+
if(track->Charge() > 0) {
nPos++;
if(fPt > fLowPtCut) nCh1GeV++;
evTag->SetNumOfElectronsAbove1GeV(nEl1GeV);
evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);
+
+ tmp.Clear();
+ evTag->SetNumOfPHOSClusters(fAODEvent->GetPHOSClusters(&tmp));
+ tmp.Clear();
+ evTag->SetNumOfEMCALClusters(fAODEvent->GetEMCALClusters(&tmp));
evTag->SetTotalMomentum(totalP);
evTag->SetMeanPt(meanPt);
evTag->SetMaxPt(maxPt);
+ evTag->SetEtaMaxPt(etamaxPt);
+ evTag->SetPhiMaxPt(phimaxPt);
}