31 UShort_t VertexBuilder::gNbVertexBuilder = 0u;
53 if ( gNbVertexBuilder == 0u )
59 if ( gDefautVertexBuilder == 0x0 ) {
64 Watcher::SetFirst(vertex);
66 gDefautVertexBuilder = vertex;
68 return gDefautVertexBuilder;
75 if ( gDefautVertexBuilder == 0x0 )
76 VertexBuilder::theDefault();
79 Watcher::GetLastRegistered(
"VertexBuilder");
88 if ( gDefautVertexBuilder )
89 {
delete gDefautVertexBuilder; gDefautVertexBuilder = 0x0; }
93 (Double_t x,Double_t y,Double_t z,Double_t Dx,Double_t Dy,Double_t Dz,Double_t beta)
109 fVertexFrame = MainFrameFactory::theMainFactory().
112 fIsToBeDeleted =
true;
122 GlobalDC::GlobalDC(
const char *name,
const char *title, TDirectory *sp_dir, TDirectory *tag_dir) :
129 fVertexBuilder =
dynamic_cast<VertexBuilder *
> ( Watcher::GetLastRegistered(
"VertexBuilder") );
131 fBeta = MakeTH1<TH1F>(
"Beta",
"Beta ",500,0.,1.0);
134 fPosition = MakeTH3<TH3F>(
"VertexP",
"Position of the vertex;x;y;z",50,-50.,50.,50,-50.,50.,50,-50.,50.);
135 fExpansion = MakeTH3<TH3F>(
"VertexE",
"Expansion of the vertex ;x;y;z",100,-200.,200.,100,-200.,200.,100,-500.,7000.);
136 fDirection = MakeTH3<TH3F>(
"VertexD",
"Direction of the recoil nucleus;dx;dy;dz",50,-1.,1.,50,-1.,1.,50,-1.,1.);
146 if ( opt.Contains(
"tag") ) {
154 Watcher::SetTrigger(trigger);
161 Double_t x, y, z, wx, wy, wz,dx, dy, dz, beta;
164 printf(
"GlobalDC::Exec is called \n");
virtual void GetDirection(Double_t &, Double_t &, Double_t &, Double_t=0.0) const =0
get the direction of the source (last argument is used in case the position depends on time) ...
virtual VertexInterface * GetVertex()
Get the vertex data interface.
printf("******************************************************************** \n")
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
To set the Frames (through a trigger) associated to this watcher.
Interface for any watcher that is a VertexBuilder.
virtual void SetVertex(Double_t=0., Double_t=0., Double_t=0., Double_t=0., Double_t=0., Double_t=1., Double_t=0.02)
modify the current vertext definition. In principle done by event by event in Exec ...
Watcher that built the spectra expected for a Vertex.
virtual void GetPosition(Double_t &, Double_t &, Double_t &, Double_t=0.0) const =0
get the position of the source (last argument is used in case the position depends on time) ...
GlobalDC(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
virtual void SetPosition(Double_t, Double_t, Double_t, Double_t=0.0)=0
Set the position of the source (last argument is used in case the position depends on time) ...
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Bool_t fIsToBeDeleted
True if the vertex frame is to be deleted by this. Otherwise it is extracted from a trigger i...
virtual Double_t GetBeta(Double_t=0.0) const =0
get recoil velocity
Base class for a Watcher.
void DrawTag(TCanvas *, Option_t *)
To display tagged histograms and their reference.
static void DestroyGlobals()
to delete the default VertexWatcher
Base class for version numbers.
suitable for a vertex that is not based on event by event basis
GlobalVertex(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
virtual void Exec(Option_t *option="")
watch the current frame
void TagOn(TObject *)
Add this histogram to the list of tagged histograms.
Base class for a trigger on a data flow.
virtual void SetDirection(Double_t, Double_t, Double_t, Double_t=0.0)=0
set the direction of the source (last argument is used in case the position depends on time) ...
SharedFP * fVertexFrame
Pointer to a Vertex Frame. Has to do SharedFP since can be in the data flow.
virtual void SetBeta(Double_t, Double_t=0.0)=0
set recoil velocity
Base class that described an item in a Factory.
static VertexBuilder * theCurrentVertexBuilder()
to get the current VertexWatcher (for other watchers) i.e. the last one registered.