X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ANALYSIS%2FWriteAOD.C;h=b10ea063e4df959f16e75ab4dbf2f783a3215cec;hb=351c53ea8fac696b3e8e8fa5a91d38810682ba01;hp=6ac7008c562e3df26820526d32fab0d16f7ff134;hpb=dd2b68109eefad14bcbe009b2e54872b133e9d7f;p=u%2Fmrichter%2FAliRoot.git diff --git a/ANALYSIS/WriteAOD.C b/ANALYSIS/WriteAOD.C index 6ac7008c562..b10ea063e4d 100644 --- a/ANALYSIS/WriteAOD.C +++ b/ANALYSIS/WriteAOD.C @@ -2,6 +2,7 @@ #include "$(ALICE_ROOT)/TPC/alles.h" #include "AliReader.h" #include "AliReaderKineTree.h" + #include "AliReaderESDTree.h" #include "AliAODParticleCut.h" #include "AliAOD.h" #include "AliAODPairCut.h" @@ -12,8 +13,8 @@ #endif -void WriteAOD(Option_t* datatype, Option_t* processopt="TracksAndParticles", - Int_t first = -1,Int_t last = -1, +void WriteAOD(Option_t* datatype, Int_t first = -1,Int_t last = -1, + Option_t* processopt="TracksAndParticles", char *outfile = "AOD.root") { //datatype defines type of data to be read @@ -34,6 +35,8 @@ void WriteAOD(Option_t* datatype, Option_t* processopt="TracksAndParticles", // //these names I use when analysis is done directly from CASTOR files via RFIO + Bool_t multcheck = kTRUE; + const char* basedir="."; const char* serie=""; const char* field = ""; @@ -44,12 +47,38 @@ void WriteAOD(Option_t* datatype, Option_t* processopt="TracksAndParticles", gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libANALYSIS"); cout<<"WriteAOD.C: ..... Loaded\n"; - Bool_t multcheck = kTRUE; + Int_t PID[11]; + + PID[0]=kProton; + PID[1]=kProtonBar; + PID[2]=kKPlus; + PID[3]=kKMinus; + PID[4]=kPiPlus; + PID[5]=kPiMinus; + PID[6]=kElectron; + PID[7]=kPositron; + PID[8]=kMuonMinus; + PID[9]=kMuonPlus; + PID[10]=0;//Last must be 0!!!!!!!!!!!!!!!!!! + + Float_t PIDprob[11]; + PIDprob[0] = 0.5; + PIDprob[1] = 0.5; + PIDprob[2] = 0.5; + PIDprob[3] = 0.5; + PIDprob[4] = 0.5; + PIDprob[5] = 0.5; + PIDprob[6] = 0.5; + PIDprob[7] = 0.5; + PIDprob[8] = 0.5; + PIDprob[9] = 0.5; + PIDprob[10] = 0.5; /***********************************************************/ AliReader* reader; Int_t kine = strcmp(datatype,"Kine"); Int_t ESD = strcmp(datatype,"ESD"); + Int_t ESDMuon = strcmp(datatype,"ESDMuon"); Int_t intern = strcmp(datatype,"AOD"); if(!kine) @@ -62,15 +91,41 @@ void WriteAOD(Option_t* datatype, Option_t* processopt="TracksAndParticles", { AliReaderESD* esdreader = new AliReaderESD(); esdreader->ReadSimulatedData(kTRUE); + esdreader->SetNumberOfTrackPoints(5,30.);//5 points every 30 cm + esdreader->SetITSTrackPoints(kTRUE); + esdreader->SetClusterMap(kTRUE); + reader = esdreader; multcheck = kTRUE; } else if(!intern) { - reader = new AliHBTReaderAOD("AOD.root"); + AliReaderAOD* aodreader = new AliReaderAOD("AOD.root"); + if (strstr(processopt,"Particles")) + aodreader->ReadSimulatedData(kTRUE); + else + aodreader->ReadSimulatedData(kFALSE); + + reader = aodreader; + multcheck = kTRUE; } + + else if (!ESDMuon) + { + // set reader for ESD + AliReaderESDTree* muonreader = new AliReaderESDTree("AliESDs.root"); + // active muon ESD reader + muonreader->SetReadMuon(kTRUE); + // disable central barrel (default = kTRUE) + muonreader->SetReadCentralBarrel(kFALSE); + // disable simulated data (not implemented yet) + muonreader->ReadSimulatedData(kFALSE); + + reader = muonreader; + multcheck = kFALSE; + } else { cerr<<"Option "<SetDirs(dirs); - - AliAODParticleCut* readerpartcut= new AliAODParticleCut(); - readerpartcut->SetPtRange(0.0,10000.0); - readerpartcut->SetPID(kKPlus); - AliAODPIDCut* pidcut = new AliAODPIDCut(kKPlus,0.5); - readerpartcut->AddBasePartCut(pidcut); - - reader->AddParticleCut(readerpartcut);//read this particle type with this cut + reader->SetDirs(dirs); + + AliAODParticleCut* readerpartcut= new AliAODParticleCut(); + + Int_t l = 0; + while (PID[l] != 0) + { + cout<<"WriteAOD.C: Adding PID = "<