AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliBaseMCTrackDensity.h
Go to the documentation of this file.
1 #ifndef ALIBaseMCTRACKDENSITY_MC
2 #define ALIBaseMCTRACKDENSITY_MC
3 
12 #include <TNamed.h>
13 #include <TVector3.h>
14 class TList;
15 class TH1D;
16 class TH2D;
17 class TF1;
18 class TGraph;
19 class AliMCEvent;
20 class AliMCParticle;
21 class AliTrackReference;
22 class AliStack;
23 class AliBaseMCWeights;
24 
46 {
47 public:
57  AliBaseMCTrackDensity(const char* name);
76 
91  void SetUseFlowWeights(Bool_t use);
104  void SetDebug(Bool_t debug=true) { fDebug = debug; }
110  virtual void CreateOutputObjects(TList* list);
116  virtual void Print(Option_t* option="") const;
117  /*
118  * Set weights to use
119  *
120  * @param weights Weights object to use
121  */
122  void SetWeights(AliBaseMCWeights* weights);
123  /*
124  * Set weights to use
125  *
126  * @param weights Weights object to use
127  */
128  void SetTruthWeights(AliBaseMCWeights* weights);
129 protected:
147  Bool_t ProcessTracks(const AliMCEvent& event,
148  const TVector3& ip,
149  TH2D* primary);
162  Bool_t ProcessTrack(AliMCParticle* particle,
163  const AliMCParticle* mother);
169  virtual Int_t GetDetectorId() const = 0;
184  virtual AliTrackReference* ProcessRef(AliMCParticle* particle,
185  const AliMCParticle* mother,
186  AliTrackReference* ref) = 0;
191  virtual void BeginTrackRefs() {}
197  virtual Bool_t CheckTrackRef(AliTrackReference*) const { return true; }
202  virtual void EndTrackRefs(Int_t /*nRefs*/) {}
216  virtual Double_t StoreParticle(AliMCParticle* particle,
217  const AliMCParticle* mother,
218  AliTrackReference* ref) const;
226  Bool_t GetCollisionParameters(const AliMCEvent& event);
234  Double_t GetTrackRefTheta(const AliTrackReference* ref) const;
243  const AliMCParticle* GetMother(Int_t iTr, const AliMCEvent& event) const;
252  Double_t CalculateWeight(const AliMCParticle* p,
253  Bool_t isPrimary) const;
261  Double_t CalculateTruthWeight(const AliMCParticle* p) const;
262  Bool_t fUseOnlyPrimary; // Only use primaries
263  TH2D* fBinFlow; // eta,phi bin flow
264  TH2D* fEtaBinFlow; // dEta vs eta of strip
265  TH2D* fPhiBinFlow; // dPhi vs phi of strip
266  TH1D* fNRefs; // Number of track-references per track
267  AliBaseMCWeights* fWeights; // MC weights
268  AliBaseMCWeights* fTruthWeights; // MC truth weights
269  TVector3 fIP; // IP z-coordinate of this event
270  Double_t fB; // Impact parameter of this event
271  Double_t fPhiR; // Reaction plane of this event
272  Bool_t fDebug; // Debug flag
273  Bool_t fTrackGammaToPi0;// If true, try to track gamma to pi0
274  ClassDef(AliBaseMCTrackDensity,6); // Calculate track-ref density
275 };
276 
277 #endif
278 // Local Variables:
279 // mode: C++
280 // End:
void SetUseFlowWeights(Bool_t use)
void SetTrackGammaToPi0(Bool_t use)
double Double_t
Definition: External.C:58
void SetTruthWeights(AliBaseMCWeights *weights)
const AliMCParticle * GetMother(Int_t iTr, const AliMCEvent &event) const
virtual void CreateOutputObjects(TList *list)
TList * list
void SetWeights(AliBaseMCWeights *weights)
virtual Bool_t CheckTrackRef(AliTrackReference *) const
virtual Double_t StoreParticle(AliMCParticle *particle, const AliMCParticle *mother, AliTrackReference *ref) const
virtual void Print(Option_t *option="") const
Double_t GetTrackRefTheta(const AliTrackReference *ref) const
int Int_t
Definition: External.C:63
void SetDebug(Bool_t debug=true)
virtual AliTrackReference * ProcessRef(AliMCParticle *particle, const AliMCParticle *mother, AliTrackReference *ref)=0
Definition: External.C:228
Definition: External.C:212
Double_t CalculateWeight(const AliMCParticle *p, Bool_t isPrimary) const
AliBaseMCWeights * fWeights
AliBaseMCTrackDensity & operator=(const AliBaseMCTrackDensity &o)
void SetUseOnlyPrimary(Bool_t use)
virtual Int_t GetDetectorId() const =0
virtual void EndTrackRefs(Int_t)
ClassDef(AliBaseMCTrackDensity, 6)
Double_t CalculateTruthWeight(const AliMCParticle *p) const
const char Option_t
Definition: External.C:48
Bool_t ProcessTracks(const AliMCEvent &event, const TVector3 &ip, TH2D *primary)
bool Bool_t
Definition: External.C:53
AliBaseMCWeights * fTruthWeights
Bool_t GetCollisionParameters(const AliMCEvent &event)
Bool_t ProcessTrack(AliMCParticle *particle, const AliMCParticle *mother)