AliPhysics  5a28df1 (5a28df1)
AliJetEmbeddingSelRhoTask.cxx
Go to the documentation of this file.
1 #include <AliRhoParameter.h>
2 #include <AliLog.h>
3 
5 
7 
8 //____________________________________________________________________________
9 
11 fRhoMin(0),
12 fRhoMax(1000),
13 fRhoName(""),
14 fhQARhoEventRejection(),
15 fhQARho()
16 {
17  // Default constructor
18 }
19 
20 //____________________________________________________________________________
21 
23 fRhoMin(0),
24 fRhoMax(1000),
25 fRhoName(""),
26 fhQARhoEventRejection(),
27 fhQARho()
28 {
29  // Standard constructor
30 }
31 
32 //____________________________________________________________________________
33 
35 
37 
38  Int_t nBinsRho = 50;
39  Double_t minRho = 0.;
40  Double_t maxRho = 20.;
41 
42  fhQARhoEventRejection = new TH1F("fhQARhoEventRejection", "Event selection: #rho", 2, 0, 2.);
44 
45  fhQARho = new TH1F("fhQARho", "#rho of selected events; #rho;", nBinsRho, minRho, maxRho);
46  fOutput->Add(fhQARho);
47 
48 }
49 //____________________________________________________________________________
50 
52 
54  AliRhoParameter* rhomParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fRhoName));
55  if(!rhomParam){
56  AliFatal(Form("Cannot find %s in the event", fRhoName.Data()));
57  }
58  Double_t rhoevent = rhomParam->GetVal();
59 
60  Bool_t outofrhorange = kFALSE;
61 
62  if(rhoevent < fRhoMin || rhoevent >= fRhoMax) outofrhorange = kTRUE;
63 
64  if(!outofrhorange){
65  fhQARhoEventRejection->Fill(0);
66  fhQARho->Fill(rhoevent);
67  }
68  else {
69  fhQARhoEventRejection->Fill(1);
70  //don't run the embedding in this event
71  return;
72  }
73 
76 }
77 //____________________________________________________________________________
78 
80  Printf("Task terminated");
82 }
83 
Class for track embedding into an event.
double Double_t
Definition: External.C:58
TList * fOutput
! output list for QA histograms
void Terminate(Option_t *option="")
TH1F * fhQARhoEventRejection
! Events accepted and rejected
Double_t fRhoMax
Maximum Rho accepted.
int Int_t
Definition: External.C:63
TString fRhoName
Name of rho to be read.
Track embedding into an event with rho in a given range.
const char Option_t
Definition: External.C:48
void Terminate(Option_t *option="")
bool Bool_t
Definition: External.C:53
void Run()
intialize task