sprintf(fPath,"%s/%s",localpath,dirname);
void *dirb = gSystem->OpenDirectory(fPath);
while((filename = gSystem->GetDirEntry(dirb))) {
- if(strstr(filename,pattern)) {
- TString aodFileName;
- aodFileName = fPath;
- aodFileName += "/";
- aodFileName += pattern;
- fChain->Add(aodFileName);
- }//pattern check
- }//child directory's entry loop
- }//parent directory's entry loop
-
+ TString bstr = dirname;
+ if(bstr.Contains("..")) continue;
+ if(strstr(filename,pattern)) {
+ TString aodFileName;
+ aodFileName = fPath;
+ aodFileName += "/";
+ aodFileName += pattern;
+ fChain->Add(aodFileName);
+ } //pattern check
+ } //child directory's entry loop
+ } //parent directory's entry loop
+
AliInfo(Form("AOD chain created......."));
AliInfo(Form("Chain entries: %d",fChain->GetEntries()));
TFile* ftag = TFile::Open(fileName, "recreate");
- AliRunTag *fRunTag = new AliRunTag();
+ fRunTag = new AliRunTag();
fTreeT = new TTree("T","A Tree with event tags");
TBranch * btag = fTreeT->Branch("AliTAG", &fRunTag);
btag->SetCompressionLevel(9);
const TUrl *url = file->GetEndpointUrl();
fguid = file->GetUUID().AsString();
- if (type == "grid") {
+ if (!strcmp(type,"grid")) {
TString fturltemp = "alien://"; fturltemp += url->GetFile();
fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
} else {
// Set the event and input file references
evTag->SetEventId(iEventNumber+1);
evTag->SetGUID(fguid);
- if(type == "grid") {
+ if(!strcmp(type,"grid")) {
evTag->SetMD5(0);
evTag->SetTURL(fturl);
evTag->SetSize(0);
Int_t nPos = 0, nNeg = 0, nNeutr =0;
Int_t nKinks = 0, nV0s = 0, nCascades = 0;
Int_t nK0s = 0, nNeutrons = 0, nPi0s = 0, nGamas = 0;
- Int_t nProtons = 0, nKaons = 0, nPions = 0, nMuons = 0, nElectrons = 0;
+ Int_t nProtons = 0, nKaons = 0, nPions = 0, nMuons = 0, nElectrons = 0, nFWMuons = 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;
if(fPt > fHighPtCut) nEl3GeV++;
if(fPt > fVeryHighPtCut) nEl10GeV++;
}
-
totalP += track->P();
meanPt += fPt;
ntrack++;
+ // forward muons (in the dimuon spectrometer)
+ if(track->IsMuonTrack()) nFWMuons++;
+
}//track loop
//
// Fill the event tags
evTag->SetNumOfKaons(nKaons);
evTag->SetNumOfPions(nPions);
evTag->SetNumOfMuons(nMuons);
+ evTag->SetNumOfFWMuons(nFWMuons);
evTag->SetNumOfElectrons(nElectrons);
evTag->SetNumOfPhotons(nGamas);
evTag->SetNumOfPi0s(nPi0s);