AliPhysics  58f3d52 (58f3d52)
 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  // temporary remove constness, since event.GetNumberOfPrimaries() was not const
148  Bool_t ProcessTracks(const AliMCEvent& event,
149  const TVector3& ip,
150  TH2D* primary);
163  Bool_t ProcessTrack(AliMCParticle* particle,
164  const AliMCParticle* mother);
170  virtual Int_t GetDetectorId() const = 0;
185  virtual AliTrackReference* ProcessRef(AliMCParticle* particle,
186  const AliMCParticle* mother,
187  AliTrackReference* ref) = 0;
192  virtual void BeginTrackRefs() {}
198  virtual Bool_t CheckTrackRef(AliTrackReference*) const { return true; }
203  virtual void EndTrackRefs(Int_t /*nRefs*/) {}
217  virtual Double_t StoreParticle(AliMCParticle* particle,
218  const AliMCParticle* mother,
219  AliTrackReference* ref) const;
227  Bool_t GetCollisionParameters(const AliMCEvent& event);
235  Double_t GetTrackRefTheta(const AliTrackReference* ref) const;
244  const AliMCParticle* GetMother(Int_t iTr, const AliMCEvent& event) const;
253  Double_t CalculateWeight(const AliMCParticle* p,
254  Bool_t isPrimary) const;
262  Double_t CalculateTruthWeight(const AliMCParticle* p) const;
263  Bool_t fUseOnlyPrimary; // Only use primaries
264  TH2D* fBinFlow; // eta,phi bin flow
265  TH2D* fEtaBinFlow; // dEta vs eta of strip
266  TH2D* fPhiBinFlow; // dPhi vs phi of strip
267  TH1D* fNRefs; // Number of track-references per track
268  AliBaseMCWeights* fWeights; // MC weights
269  AliBaseMCWeights* fTruthWeights; // MC truth weights
270  TVector3 fIP; // IP z-coordinate of this event
271  Double_t fB; // Impact parameter of this event
272  Double_t fPhiR; // Reaction plane of this event
273  Bool_t fDebug; // Debug flag
274  Bool_t fTrackGammaToPi0;// If true, try to track gamma to pi0
275  ClassDef(AliBaseMCTrackDensity,6); // Calculate track-ref density
276 };
277 
278 #endif
279 // Local Variables:
280 // mode: C++
281 // End:
void SetUseFlowWeights(Bool_t use)
void SetTrackGammaToPi0(Bool_t use)
double Double_t
Definition: External.C:58
void SetTruthWeights(AliBaseMCWeights *weights)
const int debug
Definition: scanAll.C:15
const AliMCParticle * GetMother(Int_t iTr, const AliMCEvent &event) const
virtual void CreateOutputObjects(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)
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)