KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVElasticScatterEvent.h
Go to the documentation of this file.
1 /*
2 $Id: KVElasticScatterEvent.h,v 1.3 2009/01/14 15:35:50 ebonnet Exp $
3 $Revision: 1.3 $
4 $Date: 2009/01/14 15:35:50 $
5 */
6 
9 
10 #ifndef __KVELASTICSCATTEREVENT_H
11 #define __KVELASTICSCATTEREVENT_H
12 
13 #include "KVString.h"
14 #include "TVector3.h"
15 #include "KVTarget.h"
16 #include "KVLayer.h"
17 #include "KVMaterial.h"
18 #include "KVNucleus.h"
19 #include "KVSimEvent.h"
20 #include "KV2Body.h"
21 #include "KVMultiDetArray.h"
22 #include "KVReconstructedNucleus.h"
23 #include "KVReconstructedEvent.h"
24 #include "TObject.h"
25 #include "TTree.h"
26 #include "KVHashList.h"
27 #include "KVBase.h"
28 #include "KVDBSystem.h"
29 #include "KVPosition.h"
30 #include "KVParticle.h"
31 
71 
81 class KVElasticScatterEvent : public KVBase {
82 
83 protected:
91 
94 
99 
106  /*
107  Bool_t SecondTurn;
108  Double_t Ekdiff_ST;
109  Double_t Thdiff_ST;
110  Double_t Phdiff_ST;
111  */
112  void init();
113  void GenereKV2Body();
115  void PropagateInTargetLayer();
117  void StartEvents();
118  virtual void MakeDiffusion();
119  void SortieDeCible();
120 
121 public:
122 
123  enum {
124  kProjIsSet = BIT(14), //kTRUE if projectile nucleus defined
125  kTargIsSet = BIT(15), //kTRUE if target nucleus defined
126  kHasTarget = BIT(16), //kTRUE if target material defined
127  kIsUpdated = BIT(17), //flag indicating if ValidateEntrance method has to be called
128  kIsDetectionOn = BIT(18) //flag indicating if user asked detection of events
129  };
130 
132  {
133  return TestBit(kProjIsSet);
134  }
136  {
137  return TestBit(kTargIsSet);
138  }
140  {
141  return TestBit(kHasTarget);
142  }
144  {
145  return TestBit(kIsUpdated);
146  }
148  {
149  return TestBit(kIsDetectionOn);
150  }
151 
152  void ChooseKinSol(Int_t choix = 1);
153 
155  virtual ~KVElasticScatterEvent();
156 
157  virtual void SetSystem(KVDBSystem* sys);
158  virtual void SetSystem(Int_t zp, Int_t ap, Double_t ekin, Int_t zt, Int_t at);
159  virtual void SetTargNucleus(KVNucleus* nuc);
160  virtual void SetProjNucleus(KVNucleus* nuc);
161 
162  void SetDetectionOn(Bool_t On = kTRUE);
163 
164 
165  KVNucleus* GetNucleus(const Char_t* name) const;
166  KVNucleus* GetNucleus(Int_t ii) const;
167 
168  virtual void SetTargetMaterial(KVTarget* targ, Bool_t IsRandomized = kTRUE);
169  KVTarget* GetTarget() const;
170 
172 
174  {
175  return GetReconstructedEvent()->GetParticleWithName(nucname);
176  }
178  {
179  return rec_evt;
180  }
181  KVEvent* GetSimEvent(void) const
182  {
183  return sim_evt;
184  }
185 
186  virtual void Reset();
187  virtual Bool_t ValidateEntrance();
188 
189  void SetDiffNucleus(KVString name = "PROJ");
190  void SetRandomOption(Option_t* opt = "isotropic");
191  Bool_t IsIsotropic() const;
192 
193  virtual void Process(Int_t ntimes = 1, Bool_t reset = kTRUE);
194 
195  virtual void SetAnglesForDiffusion(Double_t theta, Double_t phi);
196  virtual void Filter();
197  virtual void TreateEvent();
198 
199  virtual void DefineAngularRange(TObject*);
200  void DefineAngularRange(Double_t tmin, Double_t tmax, Double_t pmin, Double_t pmax);
201  Double_t GetTheta(KVString opt) const;
202  Double_t GetPhi(KVString opt)const;
203 
205  {
206  return kb2;
207  }
208  void Print(Option_t* /*opt*/ = "") const;
209 
210  virtual void ClearTrees();
211  virtual void ResetTrees();
212  virtual void DefineTrees();
213  KVHashList* GetTrees() const;
214 
215  virtual void ClearHistos();
216  virtual void DefineHistos();
217  virtual void ResetHistos();
218  KVHashList* GetHistos() const;
219 
220  ClassDef(KVElasticScatterEvent, 1) //simulate ElasticScatterEvent and answer of a given (multi-)detector
221 };
222 
223 #endif
int Int_t
char Char_t
bool Bool_t
double Double_t
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:165
Base class for KaliVeda framework.
Definition: KVBase.h:141
Database class used to store information on different colliding systems studied during an experiment.
Definition: KVDBSystem.h:51
simulate ElasticScatterEvent and answer of a given (multi-)detector : A + B -> A + B
virtual void SetProjNucleus(KVNucleus *nuc)
Define new projectile nucleus.
virtual void SetSystem(KVDBSystem *sys)
KVHashList * ltree
to store tree
virtual TVector3 & GetInteractionPointInTargetLayer()
return the last interaction point in the target
void Print(Option_t *="") const
virtual void ClearTrees()
Efface la liste des arbres et leur contenu et met le pointeur a zero.
virtual void DefineAngularRange(TObject *)
void SetDiffNucleus(KVString name="PROJ")
virtual void SetTargNucleus(KVNucleus *nuc)
Define new target nucleus.
Bool_t IsIsotropic() const
retoune kTRUE si l'option choisi est isotrope
virtual void SetAnglesForDiffusion(Double_t theta, Double_t phi)
void SetRandomOption(Option_t *opt="isotropic")
KVReconstructedNucleus * GetReconstructedNucleus(KVString nucname)
KVHashList * GetTrees() const
return the list where histo are stored
KVTarget * GetTarget() const
return the current target material
virtual void Process(Int_t ntimes=1, Bool_t reset=kTRUE)
virtual void ClearHistos()
Efface la liste des histo et leur contenu et met le pointeur a zero.
KVElasticScatterEvent()
Default constructor.
virtual void ResetHistos()
Reset histo in the list.
virtual void SetTargetMaterial(KVTarget *targ, Bool_t IsRandomized=kTRUE)
KVReconstructedEvent * rec_evt
void SetDetectionOn(Bool_t On=kTRUE)
KVEvent * GetSimEvent(void) const
KVHashList * GetHistos() const
return the list where histo are stored
Int_t kTreatedNevts
number of diffusion performed
virtual ~KVElasticScatterEvent()
Destructor.
virtual void Reset()
Set contents/entries to zero for predifined histograms, trees.
KVReconstructedEvent * GetReconstructedEvent(void) const
KVHashList * lhisto
to store control histogram
KVNucleus * GetNucleus(const Char_t *name) const
return the current projectile ("PROJ") or the target ("TARG") nucleus
void ChooseKinSol(Int_t choix=1)
Bool_t DefineTargetNucleusFromLayer(KVString layer_name="")
Double_t GetPhi(KVString opt) const
Double_t GetTheta(KVString opt) const
Abstract base class container for multi-particle events.
Definition: KVEvent.h:66
Extended version of ROOT THashList.
Definition: KVHashList.h:28
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:90
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Nuclei reconstructed from data measured by a detector array .
Container class for simulated nuclei, KVSimNucleus.
Definition: KVSimEvent.h:21
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:126
Particle * GetParticleWithName(const Char_t *name) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const