55 GetTree()->Branch(
"EventNumber", &fEventNumber,
"evnumber/i");
56 GetTree()->Branch(
"TimeStamp", &fTimestamp,
"timestamp/l");
63 printf(
"DoMyKeyTree::Exec is called \n");
66 if ( fFrame == 0x0 || !fFrame->
IsValid() )
103 printf(
"DoMyRawAncillaryTree::Exec is called \n");
134 GetTree()->Branch(
"DR",&DR,
"DR/F");
135 GetTree()->Branch(
"DTheta",&DTheta,
"DTheta/F");
136 GetTree()->Branch(
"DPhi",&DPhi,
"DPhi/F");
142 printf(
"DoAncillaryTree::Exec is called \n");
178 GetTree()->Branch(
"number_of_gammas",&number_of_gammas,
"number_of_gammas/I");
179 GetTree()->Branch(
"gammaE", gammaE,
"gammaE[number_of_gammas]/F");
180 GetTree()->Branch(
"gammaEDC", gammaEDC,
"gammaEDC[number_of_gammas]/F");
181 GetTree()->Branch(
"gammaX1",gammaX1,
"gammaX1[number_of_gammas]/F");
182 GetTree()->Branch(
"gammaY1",gammaY1,
"gammaY1[number_of_gammas]/F");
183 GetTree()->Branch(
"gammaZ1",gammaZ1,
"gammaZ1[number_of_gammas]/F");
184 GetTree()->Branch(
"gammaX2",gammaX2,
"gammaX2[number_of_gammas]/F");
185 GetTree()->Branch(
"gammaY2",gammaY2,
"gammaY2[number_of_gammas]/F");
186 GetTree()->Branch(
"gammaZ2",gammaZ2,
"gammaZ2[number_of_gammas]/F");
205 GetCstDataPointer<GammaTrackedInterface>(
fFrame);
210 for (UShort_t i = 0u; i < number_of_gammas; i++) {
214 gammaE[i] = gamma1->
GetE();
217 gammaX1[i] = gamma1->
GetX();
218 gammaY1[i] = gamma1->
GetY();
219 gammaZ1[i] = gamma1->
GetZ();
221 if ( gamma1->
GetHit(1) ) {
227 gammaX2[i] = gamma1->
GetX();
228 gammaY2[i] = gamma1->
GetY();
229 gammaZ2[i] = gamma1->
GetZ();
245 if ( fVertexBuilder == 0x0 )
246 std::cout <<
"Should not be NULL " <<
std::endl;
249 if ( gSystem->AccessPathName(
"CrystalPositionLookUpTable") ) {
250 if ( gSystem->AccessPathName(
"CrystalPositionLookUpTable.dat") ) {
251 fLog <<
error <<
" CrystalPositionLookUpTable required " <<
nline;
254 fLog <<
info <<
" Ge positions extracted from CrystalPositionLookUpTable.dat " <<
nline;
259 fLog <<
info <<
" Ge positions extracted from CrystalPositionLookUpTable.dat " <<
nline;
268 fIdSpectra = MakeTH1<TH1F>(
"hit_ID_spectra",
"Spectra of the ID ",100,0,100);
269 fSumSpectra = MakeTH1<TH1F>(
"SumSpectra",
"Sum of all core energy ",4096,0,4096);
270 fhitAgata = MakeTH3<TH3F>(
"hitDW",
"Tracking from TaDSSD to WallD ;x;y;z",100,-200.,200.,100,-200.,200.,200,-4000.,4000.);
281 GetTree()->Branch(
"number_of_hits",&number_of_hits,
"number_of_hits/I");
282 GetTree()->Branch(
"mult_gamma",&mult_gamma,
"mult_gamma/I");
283 GetTree()->Branch(
"hitE",hitE,
"hitE[number_of_hits]/F");
284 GetTree()->Branch(
"hitX",hitX,
"hitX[number_of_hits]/F");
285 GetTree()->Branch(
"hitY",hitY,
"hitY[number_of_hits]/F");
286 GetTree()->Branch(
"hitZ",hitZ,
"hitZ[number_of_hits]/F");
287 GetTree()->Branch(
"hit_per_cryst",hit_per_cryst,
"hit_per_cryst[number_of_hits]/I");
288 GetTree()->Branch(
"hitId",hitId,
"hitId[number_of_hits]/I");
289 GetTree()->Branch(
"hitSg",hitSg,
"hitSg[number_of_hits]/I");
290 GetTree()->Branch(
"coreE0",coreE0,
"coreE0[number_of_hits]/F");
291 GetTree()->Branch(
"coreE1",coreE1,
"coreE1[number_of_hits]/F");
293 GetTree()->Branch(
"MhitX",MhitX,
"MhitX[number_of_hits]/F");
294 GetTree()->Branch(
"MhitY",MhitY,
"MhitY[number_of_hits]/F");
295 GetTree()->Branch(
"MhitZ",MhitZ,
"MhitZ[number_of_hits]/F");
296 GetTree()->Branch(
"velDop",velDop,
"velDop[number_of_hits]/F");
297 GetTree()->Branch(
"coreDE0",coreDE0,
"coreDE0[number_of_hits]/F");
298 GetTree()->Branch(
"coreDE1",coreDE1,
"coreDE1[number_of_hits]/F");
312 for(
int i=0; i<MaxHits ; i++) {
324 Double_t max_e = 0.0;
354 fIdSpectra->Fill(data->
GetUID());
355 fSumSpectra->Fill(data->
GetE());
362 for (Int_t j = 0; j < data->
GetNbHits(); ++j) {
369 pHit->
GetXYZ(xLocal, yLocal, zLocal);
374 if ( pHit->
GetE() > max_e ) {
375 gamma.
SetXYZ(-yGlobal, -xGlobal, zGlobal);
376 max_e = pHit->
GetE();
388 for (Int_t j = 0; j < data->
GetNbHits(); ++j) {
392 hitE[number_of_hits] = pHit->
GetE();
393 hitX[number_of_hits] = pHit->
GetX();
394 hitY[number_of_hits] = pHit->
GetY();
395 hitZ[number_of_hits] = pHit->
GetZ();
396 hit_per_cryst[number_of_hits] = nb_hits;
397 hitId[number_of_hits] = data->
GetUID() ;
398 hitSg[number_of_hits] = pHit->
GetID();
399 coreE0[number_of_hits] = data->
GetE();
400 coreE1[number_of_hits] = data->
GetE(1u);
403 pHit->
GetXYZ(xLocal, yLocal, zLocal);
408 MhitX[number_of_hits]= yGlobal;
409 MhitY[number_of_hits]= xGlobal;
410 MhitZ[number_of_hits]= zGlobal;
411 fhitAgata->Fill(yGlobal,xGlobal, zGlobal);
415 if ( vertex &&beta0>0 && beta0<1) {
420 fhitAgata->Fill(xt,yt,zt);
427 coreDE0[number_of_hits] = edc;
428 velDop[number_of_hits] = beta0;
430 else coreDE1[number_of_hits] = -1;
437 coreDE1[number_of_hits] = edc;
439 else coreDE1[number_of_hits] = -1;
445 if ( number_of_hits == 500 ) {
447 cout <<
"merdaasse" <<
endl;
455 if ( number_of_hits == 500 )
456 fLog <<
error <<
" Number of Hits to hit in ! " << number_of_hits <<
nline;
469 Double_t px, py, pz, dx, dy, dz;
476 Double_t x = hit->
GetX() - px;
477 Double_t y = hit->
GetY() - py;
478 Double_t z = hit->
GetZ() - pz;
480 Double_t dd = x*x + y*y + z*z;
482 Double_t cosTheta = (x*dx + y*dy + z*dz)/::sqrt(dd);
483 e = VertexInterface::DopplerCorrection(e,beta,gamma,cosTheta);
528 if ( fp == 0x0 || !fp->
IsValid() )
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set the trigger on the main Frame whatever it is
DoMyTrackTree(const char *name, const char *title, TTree *tree=0x0)
virtual Bool_t IsValid() const
true if it is a valid pointer
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.
virtual UShort_t GetNbHits() const =0
To know the number of Hits currently on the stack.
virtual Key * GetKey()=0
To get the Key associated to this frame.
virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex)
Do Doppler taking into account additionnal offset of the agat position (see SetAgataOffset) ...
printf("******************************************************************** \n")
virtual Frame * GetFrame() const
UInt_t GetNbFramePSA()
number of PSA Frames extracted from the current event
virtual Double_t GetY() const
virtual void SetBranches()
add branches to the ttree.
virtual void SetBranches()
virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex)
Do Doppler taking into account additionnal offset of the agata position (see SetAgataOffset) ...
LogMessage & error(LogMessage &)
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) ...
built a root tree for the tracked part
virtual Double_t GetE(UInt_t=0u) const =0
to get the energy associated to the core
AgataGeometryTransformer * fTrans
virtual Double_t GetE() const
virtual Int_t GetUID() const =0
to get the crystal ID
virtual SharedFP * GetInputSharedFP(UInt_t which=0u)=0
to get back the Shared pointer that define this trigger
The tracking algorithm produces a stack of TrackedHits.
virtual TrackedHit * GetGamma(UShort_t) const =0
To get the current number of gammas in the stack.
built a root tree for the ancillary part
Base for a watcher on an ancillary (raw) frame.
virtual ~DoMyRawAncillaryTree()
LogMessage & nline(LogMessage &)
built a root tree for the ancillary part
virtual Double_t GetX() const
virtual Double_t GetE() const
void FillSpectraByUser()
Filling the spectra.
virtual ULong64_t GetTimeStamp() const =0
To set the timestamp.
virtual Double_t GetBeta(Double_t=0.0) const =0
get recoil velocity
Base class for a Watcher.
virtual void SetBranches()
built branches for coincidence between agata and ancillary
virtual UInt_t GetNbInputFrame() const =0
number of input frames that define this trigger
built a root tree for the tracked part
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
Base class for a Watcher that fill a TTree or some branches of a TTree.
virtual void SetBranches()
virtual UInt_t GetEventNumber() const =0
To get the event number encoded.
DoMyKeyTree(const char *name, const char *title, TTree *tree=0x0)
virtual Frame * GetInputFrame(UInt_t which=0u)=0
to get back the frames that define this trigger
virtual Double_t GetZ() const
Base Watcher working for any event:data.
Base class for Dante Watcher.
virtual ~DoMyAncillaryTree()
virtual void SetXYZ(Double_t x, Double_t y, Double_t z)
virtual void SetE(Double_t e)
virtual void Exec(Option_t *option="")
watch the current frame
It is a hit associated to a list of Hits.
built a tree with the event # and the timestamp of the main Frame
virtual Double_t GetX() const
DoMyAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
PSAInterface * GetDataPSA(UInt_t which)
To get one by one the PSA Frames in one event (It fills fFramePSA). Read has beed called ! ...
virtual void Exec(Option_t *option="")
watch the current frame
virtual Double_t GetGamma(Double_t=0.0) const
virtual Int_t GetID(Int_t which_id=0) const
get crystal/segment id. if which_id > 0, get crystal ID.
virtual void FillTree()
Fill the tree if it is the owner of the tree.
DoMyHitTree(const char *name, const char *title, TTree *tree=0x0)
Float_t rawBuf[gMaxSlots *gMaxChannels+gExtraSize]
DoMyCoincTree(const char *name, const char *title, TTree *tree=0x0)
Base class for a trigger on a data flow.
virtual void Exec(Option_t *option="")
watch the current frame
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual void SetBranches()
virtual void Exec(Option_t *option="")
watch the current frame
virtual Double_t GetZ() const
virtual UShort_t GetNbGamma() const =0
To get the current number of gammas in the stack.
DoMyRawAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
SharedFP * fFrame
main frame i.e. event:data:psa
virtual void Exec(Option_t *option="")
watch the current frame
Concrete implementation of a tracked Hit.
virtual void SetBranches()
virtual ADF::DFTrigger * GetTrigger() const
To know the trigger in which the frame to be watched is embedded.
*********************************** EventPSAWatcher Class **************************************/// ...
virtual Double_t GetY() const
virtual Hit * GetHit(UShort_t)=0
To get back a particular Hit (already on the stack !)
virtual void Exec(Option_t *option="")
watch the current frame
virtual Hit * GetHit(UInt_t i=0) const =0
Get Hit number i of the track (already added with NewHit !!)
Base Watcher working for any kind of Trackek Frame (Frame interface) and.
virtual void GetXYZ(Double_t &x, Double_t &y, Double_t &z) const
virtual void Exec(Option_t *option="")
watch the current frame
TTree * GetTree()
to get the current Tree
static VertexBuilder * theCurrentVertexBuilder()
to get the current VertexWatcher (for other watchers) i.e. the last one registered.