13 #include <TParameter.h> 16 #include <THashTable.h> 19 #include "AliVEvent.h" 29 fLHC11hAnchorRun(kTRUE),
32 fUseAsVetoTable(kTRUE),
33 fMinEntriesPerPtHardBin(1),
34 fCurrentPtHardBin(-1),
37 fDebugEmbedding(kFALSE),
41 SetSuffix(
"PYTHIAEmbedding");
43 fRandomAccess = kTRUE;
50 fPYTHIAPath(
"alien:///alice/sim/2012/LHC12a15e_fix/%d/%d/AOD149/%04d/AliAOD.root"),
52 fLHC11hAnchorRun(kTRUE),
55 fUseAsVetoTable(kTRUE),
56 fMinEntriesPerPtHardBin(1),
57 fCurrentPtHardBin(-1),
60 fDebugEmbedding(kFALSE),
84 fHistPtHardBins =
new TH1F(
"fHistPtHardBins",
"fHistPtHardBins", 11, 0, 11);
89 const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
90 const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
92 for (
Int_t i = 1; i < 12; i++)
93 fHistPtHardBins->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
95 fHistEmbeddingQA =
new TH1F(
"fHistEmbeddingQA",
"fHistEmbeddingQA", 2, 0, 2);
102 fHistRejectedEvents =
new TH1F(
"fHistRejectedEvents",
"fHistRejectedEvents", 500, -0.5, 499.5);
119 AliWarning(
"No hard pt bin scaling!");
133 AliDebug(3,
"Adding pt hard bin param object to the event list...");
164 static Int_t order[20]={-1};
189 Int_t runNumber = InputEvent()->GetRunNumber();
191 Int_t semiGoodRunList[32] = {169975, 169981, 170038, 170040, 170083, 170084, 170085,
192 170088, 170089, 170091, 170152, 170155, 170159, 170163,
193 170193, 170195, 170203, 170204, 170228, 170230, 170268,
194 170269, 170270, 170306, 170308, 170309, 169238, 169160,
195 169156, 169148, 169145, 169144};
199 for (
Int_t i = 0; i < 32; i++) {
200 if (runNumber == semiGoodRunList[i]) {
239 AliWarning(Form(
"File %s found in the vetoed file table. Skipping...", fileName.Data()));
243 AliWarning(Form(
"File %s not found in the allowed file table. Skipping...", fileName.Data()));
248 if (fileName.BeginsWith(
"alien://") && !gGrid) {
249 AliInfo(
"Trying to connect to AliEn ...");
250 TGrid::Connect(
"alien://");
253 TString baseFileName(fileName);
254 if (baseFileName.Contains(
".zip#")) {
255 Ssiz_t pos = baseFileName.Last(
'#');
256 baseFileName.Remove(pos);
259 if (
gSystem->AccessPathName(baseFileName)) {
260 AliError(Form(
"File %s does not exist!", baseFileName.Data()));
264 AliDebug(3,Form(
"Trying to open file %s...", fileName.Data()));
265 TFile *
file = TFile::Open(fileName);
267 if (!file || file->IsZombie()) {
268 AliError(Form(
"Unable to open file: %s!", fileName.Data()));
AliJetEmbeddingFromPYTHIATask()
Int_t GetRandomPtHardBin()
virtual Bool_t OpenNextFile()
TList * fOutput
! output list for QA histograms
TH1 * fHistEmbeddingQA
File ID not embedded.
Class for Pythia event embedding into data.
TArrayD fPtHardBinScaling
void UserCreateOutputObjects()
Bool_t ExecOnce()
generate a particle with random eta,phi, and correlated pt,mass values
Bool_t ExecOnce()
generate a particle with random eta,phi, and correlated pt,mass values
TParameter< int > * fPtHardBinParam
Pt hard bin of the current open file.
virtual Bool_t GetNextEntry()
Bool_t fQAhistos
draw QA histograms
void UserCreateOutputObjects()
Int_t fMinEntriesPerPtHardBin
Int_t fPtHardBinCount
Pt hard bin param.
TFile * file
TList with histograms for a given trigger.
Int_t fCurrentAODFileID
Current file being processed (via the event handler)
void SetSuffix(const char *s)
virtual ~AliJetEmbeddingFromPYTHIATask()
Bool_t fDebugEmbedding
Number of event embedded from the current pt hard bin.
Class for embedding a AOD event into a data event.
TH1 * fHistRejectedEvents
Embedding QA.