setter to assume pion mass for clusters
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetFastSimulation.h
CommitLineData
b3821b05 1#ifndef ALIJETFASTSIMULATION_H
2#define ALIJETFASTSIMULATION_H
3
4// $Id$
5
6class TClonesArray;
7class TRandom3;
8class AliVParticle;
9class AliPicoTrack;
10
11#include "AliAnalysisTaskEmcal.h"
12
13class AliJetFastSimulation : public AliAnalysisTaskEmcal {
14 public:
15 AliJetFastSimulation();
16 AliJetFastSimulation(const char *name);
17 virtual ~AliJetFastSimulation();
18
19 virtual void LocalInit();
20 virtual void UserCreateOutputObjects();
21
22 void SetTracksOutName(const char *n) { fTracksOutName = n; }
23 void SetNTrackClasses(Int_t i) { fNTrackClasses = i; }
24 void SetFixedTrackEfficiency(Double_t eff) { fEfficiencyFixed = eff ; }
25
26 void SetUseTrResolutionFromOADB(Bool_t b=kTRUE, TString path="$ALICE_ROOT/OADB/PWGJE/Resolution/PtResol_LHCh_Cent0-10_v1.root") {fUseTrPtResolutionFromOADB = b; fPathTrPtResolution=path;}
27 void SetUseTrEfficiencyFromOADB(Bool_t b=kTRUE, TString path="$ALICE_ROOT/OADB/PWGJE/Efficiency/Efficiency_LHC11a2aj_Cent0_v1.root") {fUseTrEfficiencyFromOADB = b; fPathTrEfficiency=path;}
28 void SetSmearResolution(Bool_t b) { fUseTrPtResolutionSmearing = b ;}
29 void SetDiceEfficiency(Int_t b) { fUseDiceEfficiency = b ;}
30 void SetDiceEfficiencyMinPt(Double_t pt) { fDiceEfficiencyMinPt = pt;}
31
32 protected:
33 void ExecOnce();
34 Bool_t Run();
35
36 void SimulateTracks();
37 Bool_t DiceEfficiency(AliPicoTrack *vp, Double_t eff[3], Double_t rnd);
38 AliPicoTrack *SmearPt(AliPicoTrack *vp, Double_t eff[3], Double_t rnd);
39 Double_t GetMomentumSmearing(Int_t cat, Double_t pt);
40 void FitMomentumResolution();
41 void LoadTrEfficiencyRootFileFromOADB();
42 void LoadTrPtResolutionRootFileFromOADB();
43 void SetMomentumResolutionHybrid(TProfile *p1, TProfile *p2, TProfile *p3);
44 void SetEfficiencyHybrid(TH1 *h1, TH1 *h2, TH1 *h3);
45
46 TString fTracksOutName; // name of output track collection
47 TClonesArray *fTracksOut; //!output track collection
48 Int_t fNTrackClasses; // number of track classes
49 TRandom3 *fRandom; //! random number generator
50 Double_t fEfficiencyFixed; // fixed efficiency for all pT and all types of tracks
51 TProfile *fMomResH1; // Momentum resolution from TrackQA Hybrid Category 1
52 TProfile *fMomResH2; // Momentum resolution from TrackQA Hybrid Category 2
53 TProfile *fMomResH3; // Momentum resolution from TrackQA Hybrid Category 3
54 TF1 *fMomResH1Fit; // fit to momentum resolution
55 TF1 *fMomResH2Fit; // fit to momentum resolution
56 TF1 *fMomResH3Fit; // fit to momentum resolution
57 TH1 *fhEffH1; // Efficiency for Spectra Hybrid Category 1
58 TH1 *fhEffH2; // Efficiency for Spectra Hybrid Category 2
59 TH1 *fhEffH3; // Efficiency for Spectra Hybrid Category 3
60 Bool_t fUseTrPtResolutionSmearing; // Apply momentum smearing on track level
61 Int_t fUseDiceEfficiency; // Flag to apply efficiency on track level by dicing 0: no dicing; 1: dicing wrt to input branch;
62 Double_t fDiceEfficiencyMinPt; // Only do efficiency dicing for tracks above this pt
63 Bool_t fUseTrPtResolutionFromOADB; // Load track pt resolution root file from OADB path
64 Bool_t fUseTrEfficiencyFromOADB; // Load tracking efficiency root file from OADB path
65 TString fPathTrPtResolution; // OADB path to root file
66 TString fPathTrEfficiency; // OADB path to root file
67
68 //Output objects
69 TH1F *fHistPtDet; //!pT spectrum of detector level particles
70 TH2F *fh2PtGenPtSmeared; //! Control histo smeared momentum
71 TProfile *fp1Efficiency; //! Control profile efficiency
72 TProfile *fp1PtResolution; //! Control profile for pT resolution
73
74
75 private:
76 AliJetFastSimulation(const AliJetFastSimulation&); // not implemented
77 AliJetFastSimulation &operator=(const AliJetFastSimulation&); // not implemented
78
79 ClassDef(AliJetFastSimulation, 1) // Jet fast simulation task
80};
81#endif