AliPhysics  63e47e1 (63e47e1)
AliAnalysisTaskGenerateThermalBackgroundMC.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskGenerateThermalBackgroundMC_H
2 #define AliAnalysisTaskGenerateThermalBackgroundMC_H
3 
4 /**********************************************************************************
5  * Copyright (C) 2016, Copyright Holders of the ALICE Collaboration *
6  * All rights reserved. *
7  * *
8  * Redistribution and use in source and binary forms, with or without *
9  * modification, are permitted provided that the following conditions are met: *
10  * * Redistributions of source code must retain the above copyright *
11  * notice, this list of conditions and the following disclaimer. *
12  * * Redistributions in binary form must reproduce the above copyright *
13  * notice, this list of conditions and the following disclaimer in the *
14  * documentation and/or other materials provided with the distribution. *
15  * * Neither the name of the <organization> nor the *
16  * names of its contributors may be used to endorse or promote products *
17  * derived from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
22  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
26  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
29  * *********************************************************************************/
30 
40 class AliVEvent;
41 
42 #include <TRandom3.h>
43 
44 #include <AliAnalysisTaskSE.h>
45 #include <THistManager.h>
46 
48  public:
49 
53 
54  static AliAnalysisTaskGenerateThermalBackgroundMC* AddTaskGenerateThermalBackgroundMC(const char *outputName = "thermalparticles",
55  const Double_t beta = 0.3,
56  const char *suffix = "");
57  // Methods from AliAnalysisTaskSE
59  void UserExec(Option_t* option);
60 
61  // Additional steering functions
62  void ExecOnce();
63  void Run();
64  void FillHistograms();
65 
66  // Analysis functions
67  void CreateNewObjectBranch();
68  Double_t GetDeltaR(Double_t eta, Double_t phi, Double_t etaRef, Double_t phiRef);
69 
70  // Thermal model setters
71  void SetOutputCollectionName(std::string name) { fOutputCollectionName = name; }
73 
74  void SetAlpha(Double_t d) { fAlpha = d; }
75  void SetBeta(Double_t d) { fBeta = d; }
78  void SetMaxPt(Int_t d) { fMaxPt = d; }
79 
80  void SetUseGaussianForN(bool b) { fUseGaussianForN = b; }
83  void SetMinN(Int_t d) { fMinN = d; }
84  void SetMaxN(Int_t d) { fMaxN = d; }
85 
86  void SetMinEta(Int_t d) { fMinEta = d; }
87  void SetMaxEta(Int_t d) { fMaxEta = d; }
88 
89  protected:
90  // Event parameters
92  AliVEvent* fEvent;
93 
95  // Thermal model parameters
96 
97  // General
98  std::string fOutputCollectionName;
99  TClonesArray* fThermalParticlesArray;
101  TRandom3 fRandom;
102 
103  // pT, based on a gamma distribution. Default choice is a=2, b=<pT>/2. Choosing a=1 gives exponential.
110 
111  // N particles
117 
118  // Other
121 
123 
124  // Histogram output
127 
128  private:
131 
135 };
136 #endif
Double_t fBeta
Value of b in the gamma distribution f_gamma ~ x^(a-1) * e^(-x/b)
double Double_t
Definition: External.C:58
std::string fOutputCollectionName
Name of TClonesArray output the thermal particles to the event.
static AliAnalysisTaskGenerateThermalBackgroundMC * AddTaskGenerateThermalBackgroundMC(const char *outputName="thermalparticles", const Double_t beta=0.3, const char *suffix="")
bool fUseGaussianForN
Use a Gaussian for number of particles per event. Otherwise, use flat distribution.
bool fEventInitialized
If the event is initialized properly.
Double_t fMinChargedPt
Min pT of charged thermal particles.
int Int_t
Definition: External.C:63
Double_t GetDeltaR(Double_t eta, Double_t phi, Double_t etaRef, Double_t phiRef)
Int_t fMinN
Min number of particles in thermal model (for flat distribution)
Double_t fAlpha
Value of a in the gamma distribution f_gamma ~ x^(a-1) * e^(-x/b)
TClonesArray * fThermalParticlesArray
! Thermal particle collection
Container class for histograms.
Definition: THistManager.h:99
const char Option_t
Definition: External.C:48
Double_t fMinNeutralPt
Min pT of neutral thermal particles.
Int_t fMaxN
Max number of particles in thermal model (for flat distribution)
Double_t fChargedParticleFraction
Fraction of thermal particles set to have nonzero charge.
TF1 * fPtDistribution
! Distribution to sample particle pT from
AliAnalysisTaskGenerateThermalBackgroundMC & operator=(const AliAnalysisTaskGenerateThermalBackgroundMC &)