23 #ifndef _EventPSAWatchers
35 #ifndef ROOT_TGeoMatrix
36 #include "TGeoMatrix.h"
39 #ifndef ROOT_TGToolTip
40 #include "TGToolTip.h"
51 #ifndef ROOT_TObjArray
52 #include "TObjArray.h"
55 #ifndef ROOT_TPaveText
56 #include "TPaveText.h"
59 #ifndef ROOT_TPolyLine
60 #include "TPolyLine.h"
85 if ( !Watcher::GetFromTrigger(trigger,
"event:data:psa", fFrame) )
99 {
delete fPSAFrame; fPSAFrame = 0x0; }
105 return fFrame != 0x0;
111 if ( fFrame && fFrame->IsValid() ) {
112 fFrame->GetFrame()->Scan();
113 return fFrame->GetFrame()->GetNbSubFrame();
123 if ( !(which < GetNbFramePSA()) ) {
125 printf(
"EventPSAWatcher::GetDataPSA %d %d \n",which,GetNbFramePSA());
129 if ( !fFrame->GetFrame()->LinkSubFrame(which,fPSAFrame) ) {
131 printf(
"EventPSAWatcher::GetDataPSA cannot LinkSubFrame \n");
135 if( fPSAFrame->Read() == 0 ) {
137 printf(
"EventPSAWatcher::GetDataPSA cannot Read \n");
141 return GetDataPointer<PSAInterface>(fPSAFrame);
156 fSpectraDoppler(180),
160 fCoreCommonDoppler(0x0),
166 fSpectra.SetOwner(
false); fSpectraDoppler.SetOwner(
false);
170 if ( fVertexBuilder == 0x0 )
171 std::cout <<
"Should not be NULL " <<
std::endl;
175 if ( gSystem->AccessPathName(
"CrystalPositionLookUpTable") ) {
176 if ( gSystem->AccessPathName(
"CrystalPositionLookUpTable.dat") ) {
177 fLog <<
error <<
" CrystalPositionLookUpTable required " <<
nline;
180 fLog <<
info <<
" Ge positions extracted from CrystalPositionLookUpTable.dat " <<
nline;
181 fTrans->ReadTransformations(
"CrystalPositionLookUpTable.dat");
185 fLog <<
info <<
" Ge positions extracted from CrystalPositionLookUpTable.dat " <<
nline;
186 fTrans->ReadTransformations(
"CrystalPositionLookUpTable");
189 for (UInt_t i = 0u; i < gNbCrys; i++ ) {
191 TString
tmp; TH1F *h;
193 tmp = Form(
"Crystal_%d",i);
194 h = MakeTH1<TH1F>(tmp.Data(),
"Core energy of the crystal", 4096,0,4096);
197 tmp = Form(
"Crystal_track_%d",i);
198 h = MakeTH1<TH1F>(tmp.Data(),
"Core energy of the crystal", 4096,0,4096);
199 fSpectraDoppler.Add ( h ) ;
202 fCoreCommon = MakeTH1<TH1F>(
"CoreCommon",
"Core common spectrum",8192,0,4096);
203 fSumSpectra = MakeTH1<TH1F>(
"SumSpectra",
"Sum of all spectra",8192,0,4096);
204 fGxG = MakeTH2<TH2F>(
"GxG",
"Gamma Gamma Matrix",4096,0,4096,4096,0,4096);
205 fDistri = MakeTH1<TH1F>(
"CrystalDistri",
"Distribution of the crystal fired",180,0,180);
206 fPosXYZ = MakeTH3<TH3F>(
"PosXYZ",
"Distribution of hits in Space",100,-200,200,100,-200,200,100,-400,0);
210 fPosXYZ_Ta = MakeTH3<TH3F>(
"PosXYZ_Ta",
"Distribution of hits in Space with Target hit",200,-400,400,200,-400,400,200,-400,400);
214 fGxT = MakeTH2<TH2F>(
"GxT",
"Gamma Time Matrix",4096,0,4096,300,0,300);
216 fCoreCommonDoppler = MakeTH1<TH1F>(
"DCoreCommon",
"Core common spectrum with doppler correction",8192,0,4096);
217 fGxGDoppler = MakeTH2<TH2F>(
"DGxG",
"Gamma Gamma Matrix with doppler correction",4096,0,4096,4096,0,4096);
219 fFold = MakeTH1<TH1F>(
"Fold",
"Crystal Fold distributions",10,0,10);
233 Double_t px, py, pz, dx, dy, dz;
239 Double_t x = hit->
GetX() - px;
240 Double_t y = hit->
GetY() - py;
241 Double_t z = hit->
GetZ() - pz;
243 Double_t dd = x*x + y*y + z*z;
245 Double_t cosTheta = (x*dx + y*dy + z*dz)/::sqrt(dd);
246 e = VertexInterface::DopplerCorrection(e,beta,gamma,cosTheta);
257 c->Divide(4,4,0.001,0.001);
263 for(
int i=0 ; i<
fDistri->GetNbinsX() ; i++)
265 if(
fDistri->GetBinContent(i+1))
273 c =
NewCanvas(Form(
"HitSpectra_%d_%d",PadNbr+1,PadNbr+16));
274 c->Divide(4,4,0.001,0.001);
279 TCanvas *OverImposedCore =
NewCanvas(
"OverImposedCore");
280 OverImposedCore->cd();
281 bool FirstHist =
true;
282 for(
int i=0 ; i<
fDistri->GetNbinsX() ; i++)
296 TCanvas *GlobalSpectra =
NewCanvas(
"GlobalSpectra");
297 GlobalSpectra->Divide(1,2,0.001,0.001);
298 GlobalSpectra->cd(1);
301 TPad *pad =
new TPad(
"Crystal fold",
"Pad for Crystal fold distribution",0.7,0.6,1,1);
306 GlobalSpectra->cd(2);
313 Double_t xLocal, yLocal, zLocal, xGlobal, yGlobal, zGlobal;
TrackedHitImp<EHit,EHit> gamma; Float_t gg[150], ggdc[150];
327 fFold->Fill(nb_frames);
329 double SumEnergy = 0.;
331 for(UInt_t i = 0u; i <nb_frames; i++) {
334 gg[i] = data->
GetE();
337 h->Fill(data->
GetE());
341 SumEnergy += data->
GetE();
348 Double_t max_e = 0.0;
354 for (UShort_t j = 0u; j < nHits; ++j) {
358 pHit->
GetXYZ(xLocal, yLocal, zLocal);
364 fPosXYZ->Fill(xGlobal, yGlobal, zGlobal);
367 if ( pHit->
GetE() > max_e ) {
368 gamma.
SetXYZ(xGlobal, yGlobal, zGlobal);
369 max_e = pHit->
GetE();
380 else ggdc[i] = gg[i];
385 for(UInt_t i = 0u; i <nb_frames; i++) {
386 for(UInt_t j = i+1; j <nb_frames; j++) {
399 Float_t HitDisplay3D::fgMetric = 10.;
417 TTask::SetActive(active);
418 AgataEventDisplay::Instance()->Reset();
427 AgataEventDisplay::SetDefaultAgataPath(agataPathFile);
428 AgataEventDisplay::Instance()->BuildDefaultGeometry();
429 AgataEventDisplay::Instance()->ShowDisplay();
445 TTask::SetActive(
false);
449 static UInt_t evtNbOld = 0;
453 if (evtNb == evtNbOld)
463 for (UShort_t j = 0u; j < nHits; ++j) {
466 Float_t xLocal = pHit->
GetX();
467 Float_t yLocal = pHit->
GetY();
468 Float_t zLocal = pHit->
GetZ();
470 Float_t xGlobal, yGlobal, zGlobal;
471 fTrans->
Local2Global(pHit->
GetID(), xLocal, yLocal, zLocal, xGlobal, yGlobal, zGlobal);
474 std::cout <<
"Global " << xGlobal <<
" " << yGlobal <<
" " << zGlobal <<
std::endl;
475 std::cout <<
"Local " << xLocal <<
" " << yLocal <<
" " << zLocal <<
" " << pHit->
GetE() <<
std::endl;
477 hit->
SetX(xGlobal/fgMetric);
478 hit->
SetY(yGlobal/fgMetric);
479 hit->
SetZ(zGlobal/fgMetric);
492 const Double_t RateDisplay::fgkDRho = 3.;
493 const Double_t RateDisplay::fgkRho1 = 5.;
494 const Double_t RateDisplay::fgkRho2 = 80.;
495 const Double_t RateDisplay::fgkDRange = 400.;
496 const Int_t RateDisplay::fgkNofPoints = 5;
497 const Int_t RateDisplay::fgkNofSectors = 6;
498 const Int_t RateDisplay::fgkNofSlices = 6;
499 const Int_t RateDisplay::fgkNofCrystals = 60;
500 const Int_t RateDisplay::fgkNDivX = 5;
501 const Int_t RateDisplay::fgkNDivY = 3;
506 fSectorList(new TObjArray(fgkNofSectors*fgkNofCrystals)),
507 fLabelList(new TObjArray(fgkNofCrystals)),
508 fRateList(new TObjArray(fgkNofSectors*fgkNofCrystals)),
516 fTimer(new TTimer()),
518 fDepthText(new TLatex()),
519 fBox(new TBox(0, fgkDRange, 0, fgkDRange)),
520 fInfoTip(new TGToolTip(fBox,
"", 350))
524 fSectorList->SetOwner(
true);
525 fLabelList->SetOwner(
true);
526 fRateList->SetOwner(
true);
529 for (Int_t i = 0; i < fgkNofSlices+1; ++i) {
530 fCountArray[i] =
new TArrayI(fgkNofSectors*fgkNofCrystals);
531 fCountArray[i]->Reset();
534 fCountMax =
new TArrayI(fgkNofCrystals);
538 for (Int_t j = 0; j < fgkNDivY; ++j)
539 for (Int_t i = 0; i < fgkNDivX; ++i) {
546 fHistoCntCrystal = MakeTH1<TH1I>(
"HistoCntCrystal",
"Number of counts per crystal", fgkNofCrystals, 0, fgkNofCrystals) ;
548 for (Int_t i = 0; i < fgkNofCrystals; ++i) {
549 for (Int_t j = 0; j < fgkNofSectors; ++j) {
550 for (Int_t k = 0; k < fgkNofSlices; ++k) {
551 Int_t
id = i*fgkNofSectors*fgkNofSlices+j*fgkNofSlices + k;
552 fHistoCntSlice[id] = MakeTH1<TH1I>(Form(
"%s%d_%d_%d",
"fHistoCntSlice", i,j, k),
553 "Number of counts per sector and per slice", fMaxCycle+1, 0, fMaxCycle);
554 fHistoCntSlice[id]->SetLineStyle(k+1);
555 fHistoCntSlice[id]->SetLineColor(j+1);
556 fHistoCntSlice[id]->SetLineWidth(2);
561 fTimer->Connect(
"Timeout()",
"RateDisplay",
this,
"UpdateCanvas()");
576 for (Int_t i = 0; i < fgkNofSlices+1; ++i)
577 delete fCountArray[i];
588 GetDataPointer<PSAInterface>(
fPSAFrame)->Global();
589 fCrysID = glob->
Get<UShort_t>(
"CrystalID");
590 fCoreE1 = glob->
Get<Float_t>(
"CoreE1");
599 return Watcher::Zero(opt1, opt2);
606 TVirtualPad* pad = TVirtualPad::Pad();
609 if (eventType == kMouseMotion) {
610 fLastX = eventX; fLastY = eventY;
613 fLastX = eventX; fLastY = eventY;
614 if ( select->InheritsFrom(
"TPolyLine") && select->GetUniqueID() != 0) {
615 fInfoTip->SetText(Form(
"Counts: %d", select->GetUniqueID()));
616 fInfoTip->Show(fLastX, fLastY);
633 if ( !c->HasConnection(
"ProcessedEvent(Int_t, Int_t, Int_t, TObject*)") ) {
634 c->Connect(
"ProcessedEvent(Int_t, Int_t, Int_t, TObject*)",
637 "HandleMovement(Int_t, Int_t, Int_t, TObject*)");
640 gPad->Range(-fgkDRange/2, -fgkDRange/2, fgkDRange/2+(fgkNDivX-1)*fgkDRange, fgkDRange/2+(fgkNDivY-1)*fgkDRange);
647 gPad->SetEditable(
false);
651 if (tmp.BeginsWith(
"h") ) {
652 c->SetWindowSize(fgkDRange*fgkNDivX,fgkDRange*fgkNDivY);
653 c->Divide(fgkNDivX, fgkNDivY*3);
655 for (Int_t i = 0; i < fgkNofCrystals; ++i) {
657 for (Int_t j = 0; j < fgkNofSectors; ++j) {
658 for (Int_t k = 0; k < fgkNofSlices; ++k) {
659 Int_t
id = i*fgkNofSectors*fgkNofSlices+j*fgkNofSlices + k;
660 if (j == 0 && k == 0)
661 fHistoCntSlice[id]->Draw();
663 fHistoCntSlice[id]->Draw(
"SAME");
669 fTimer->Start(fRefresh*1000);
675 static Int_t depth = 0;
678 if (depth == fgkNofSlices+1) {
705 for (Int_t s = 0; s < fgkNofSectors; ++s) {
706 tmpID = fCrysID->
Get()*fgkNofSectors + s;
707 tmp = fCountArray[0]->At(tmpID)+1;
708 if (fCoreE1->
Get() > 0) {
709 fCountArray[0]->AddAt(tmp, tmpID);
710 if (tmp > fCountCoreMax)
714 fHistoCntCrystal->Fill(fCrysID->
Get());
721 for (Int_t j = 0; j < data->
GetNbHits(); ++j) {
726 tmpID = fCrysID->
Get()*fgkNofSectors + sectorID;
727 tmp = fCountArray[depthID]->At(tmpID)+1;
729 Int_t histoID = fCrysID->
Get()*fgkNofSectors*fgkNofSlices + sectorID*fgkNofSlices + (depthID-1);
730 fHistoCntSlice[histoID]->Fill(fCurrentCycle, tmp);
732 fCountArray[depthID]->AddAt(tmp, tmpID);
734 if ( tmp > fCountMax->At(fCrysID->
Get()) )
735 fCountMax->AddAt(tmp, fCrysID->
Get());
737 if (tmp > fCountMaxAll)
742 printf(
"hit %d with pos (%f, %f, %f)\n", j, pHit->
GetX(), pHit->
GetY(), pHit->
GetZ());
743 printf(
"Count %d for crystal %d depth %d and sector %d max %d\n",
744 fCountArray[depthID]->At(tmpID), fCrysID->
Get(), depthID, sectorID, fCountMax->At(fCrysID->
Get()));
754 TPaveText* pave = 0x0;
757 Double_t dxPave = 10;
758 Double_t dyPave = 10;
761 Double_t yPos = 2*TMath::Sin(TMath::Pi()/6)*(fgkRho2+3*fgkDRho);
764 xPave = xPos+xOffset-0.8*fgkRho2;
765 yPave = yPos+yOffset+fgkRho2;
766 pave =
new TPaveText(xPave-dxPave,yPave-dyPave, xPave+dxPave, yPave+dyPave);
768 pave->AddText(Form(
"%d", (fSectorList->GetEntries()-1)/fgkNofSectors));
769 fLabelList->Add(pave);
771 xPos = -TMath::Cos(TMath::Pi()/6)*(fgkRho2+3*fgkDRho);
772 yPos = -TMath::Sin(TMath::Pi()/6)*(fgkRho2+3*fgkDRho);
775 xPave = xPos+xOffset-0.8*fgkRho2;
776 yPave = yPos+yOffset+fgkRho2;
777 pave =
new TPaveText(xPave-dxPave,yPave-dyPave, xPave+dxPave, yPave+dyPave);
778 pave->SetOption(
"l");
779 pave->AddText(Form(
"%d", (fSectorList->GetEntries()-1)/fgkNofSectors));
780 fLabelList->Add(pave);
782 xPos = TMath::Cos(TMath::Pi()/6)*(fgkRho2+3*fgkDRho);
783 yPos = -TMath::Sin(TMath::Pi()/6)*(fgkRho2+3*fgkDRho);
786 xPave = xPos+xOffset+0.8*fgkRho2;
787 yPave = yPos+yOffset+fgkRho2;
788 pave =
new TPaveText(xPave-dxPave,yPave-dyPave, xPave+dxPave, yPave+dyPave);
789 pave->SetOption(
"r");
790 pave->AddText(Form(
"%d", (fSectorList->GetEntries()-1)/fgkNofSectors));
791 fLabelList->Add(pave);
797 TPolyLine* detectorLine = 0x0;
799 Double_t x[fgkNofPoints];
800 Double_t y[fgkNofPoints];
802 Double_t offset = TMath::Pi()/6.;
803 Double_t dPhi = TMath::Pi()/3.;
805 for (Int_t i = 0; i < fgkNofSectors; ++i) {
806 Double_t angle = dPhi*i + offset;
807 Double_t shiftX = fgkDRho*TMath::Cos(angle+dPhi/2.);
808 Double_t shiftY = fgkDRho*TMath::Sin(angle+dPhi/2.);
810 x[0] = x[4] = fgkRho1*TMath::Cos(angle) + shiftX;
811 y[0] = y[4] = fgkRho1*TMath::Sin(angle) + shiftY;
812 x[1] = fgkRho2*TMath::Cos(angle) + shiftX;
813 y[1] = fgkRho2*TMath::Sin(angle) + shiftY;
815 angle = dPhi*(i+1) + offset;
816 x[2] = fgkRho2*TMath::Cos(angle) + shiftX;
817 y[2] = fgkRho2*TMath::Sin(angle) + shiftY;
819 x[3] = fgkRho1*TMath::Cos(angle) + shiftX;
820 y[3] = fgkRho1*TMath::Sin(angle) + shiftY;
822 for (Int_t j = 0; j < fgkNofPoints; ++j) {
827 detectorLine =
new TPolyLine(fgkNofPoints,x,y);
828 detectorLine->SetLineWidth(1);
829 detectorLine->SetLineStyle(2);
830 fSectorList->Add(detectorLine);
837 TPolyLine* rateLine = 0x0;
839 for (Int_t iCrystal = 0; iCrystal < fSectorList->GetEntries(); ++iCrystal) {
841 if (iCrystal/fgkNofSectors % 3 == 0)
843 if (iCrystal/fgkNofSectors % 3 == 1)
845 if (iCrystal/fgkNofSectors % 3 == 2)
848 rateLine =
new TPolyLine(fgkNofPoints);
849 rateLine->SetLineColor(2);
850 rateLine->SetLineWidth(1);
851 rateLine->SetFillColor(col);
852 rateLine->SetOption(
"f");
853 fRateList->Add(rateLine);
862 fTimer->Start(r*1000);
871 if (d > 6 || d < 0)
return;
880 TPolyLine* rateLine = 0x0;
881 TPolyLine* detectorLine = 0x0;
886 Double_t x[fgkNofPoints];
887 Double_t y[fgkNofPoints];
889 for (Int_t iCrystal = 0; iCrystal < fSectorList->GetEntries()/fgkNofSectors; ++iCrystal) {
896 max = fCountMax->At(iCrystal);
899 if (max == 0)
continue;
901 for (Int_t iSector = 0; iSector < fgkNofSectors; ++iSector) {
902 detectorLine =
static_cast<TPolyLine*
> ( fSectorList->At(iCrystal*fgkNofSectors + iSector) );
903 rateLine =
static_cast<TPolyLine*
> ( fRateList->At(iCrystal*fgkNofSectors + iSector) );
905 Double_t x1 = (detectorLine->GetX()[1] + detectorLine->GetX()[2])/2.;
906 Double_t y1 = (detectorLine->GetY()[1] + detectorLine->GetY()[2])/2.;
908 Double_t x2 = (detectorLine->GetX()[0] + detectorLine->GetX()[3])/2.;
909 Double_t y2 = (detectorLine->GetY()[0] + detectorLine->GetY()[3])/2.;
914 Double_t rateRatio = 1.;
917 rateRatio = (Double_t)fCountArray[fDepth]->At(iCrystal*fgkNofSectors + iSector)/max*0.85;
919 rateRatio = (Double_t)fCountArray[fDepth]->At(iCrystal*fgkNofSectors + iSector)/fCountCoreMax*0.85;
922 printf(
"count %d ratio %lf for sector %d and crystal %d\n",
923 fCountArray[fDepth]->At(iCrystal*fgkNofSectors + iSector), rateRatio,
927 for (Int_t j = 0; j < fgkNofPoints; ++j) {
928 x[j] = (detectorLine->GetX()[j] - xm)* rateRatio + xm;
929 y[j] = (detectorLine->GetY()[j] - ym)* rateRatio + ym;
932 rateLine->SetPolyLine(fgkNofPoints, x, y,
"f");
933 rateLine->SetUniqueID(fCountArray[fDepth]->At(iCrystal*fgkNofSectors + iSector));
939 fDepthText->SetTextSize(0.04);
940 fDepthText->SetText(-fgkDRange/2+20, -fgkDRange/2+20, Form(
"Depth: %d", fDepth));
951 for (Int_t i = 0; i < fgkNofSlices+1; ++i)
952 fCountArray[i]->
Reset();
virtual void SetDepth(Int_t depth=1, Bool_t stop=true)
Set depth.
AgataEventContainer class that contains agata event to be displayed.
virtual void Exec(Option_t *option="")
watch the current frame
virtual Bool_t IsValid() const
true if it is a valid pointer
void SetActive(Bool_t active=true)
Toggle active task.
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 void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
virtual void DoCanvas(TCanvas *canvas, Option_t *option)
To be overwritten by real implementation if a canvas is produced.
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.
printf("******************************************************************** \n")
UInt_t GetNbFramePSA()
number of PSA Frames extracted from the current event
virtual Double_t GetY() const
TCanvas * NewCanvas(Option_t *)
It creates a new embedded canvas.
static MainFrameFactory & theMainFactory()
the main (global) keyfactory
LogMessage & error(LogMessage &)
RateDisplay(const Char_t *name, const Char_t *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
virtual Frame * New(const FactoryItem &key_item, const FactoryItem &frame_item)
just a frame
TH1 * fCoreCommon
Sum of all core spectra (without Doppler correction)
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) ...
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
AgataEventDisplay a class to work on a specific event display.
TH1F * fDistri
Crystal fold.
virtual Double_t GetE(UInt_t=0u) const =0
to get the energy associated to the core
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
virtual Double_t GetE() const
virtual Int_t GetUID() const =0
to get the crystal ID
virtual void SetZ(Float_t z)
virtual DFAgent * GetDFAgent()=0
to get the Data Flow Agent in charge of knowing the structure of the DF
virtual ~HitsSpectra()
******************************************************************************************/// ...
virtual void Exec(Option_t *option="")
watch the current frame
virtual Double_t GetT(UInt_t=0u) const =0
to get the time associated to the core
LogMessage & nline(LogMessage &)
virtual Double_t GetX() const
void AddRates()
Add polyline rate object list.
TObjArray fSpectra
Core energy for any crystal.
virtual Double_t GetE() const
static ConfAgent * theGlobalAgent(std::string="Agata")
to get the global agent
virtual void SetY(Float_t y)
AgataGeometryTransformer * fTrans
Base class for a Global Object.
virtual Bool_t IsNormByAll()
return normalization
virtual Double_t GetBeta(Double_t=0.0) const =0
get recoil velocity
void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject *select)
Handle Movement.
TObjArray fSpectraDoppler
void UpdateRates()
Update rates.
Frame * fPSAFrame
current PSA frame to help decoding one by one
virtual void SetE(Float_t e)
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
virtual UInt_t GetEventNumber() const =0
To get the event number encoded.
HitsSpectra(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
*/
Base class for version numbers.
void AddCristals(Double_t xPos=0, Double_t yPos=0)
Add cluster at a given position to list.
virtual Frame * GetInputFrame(UInt_t which=0u)=0
to get back the frames that define this trigger
virtual Double_t GetZ() const
header file for AgataKeyFactory.cpp
Show rates (counts) per Crystal.
virtual void SetX(Float_t x)
Setter position & energy.
void AddCluster(Double_t xOffset=0, Double_t yOffset=0)
Add sectors for a cluster to list.
virtual void Zero(Option_t *hname="pool", Option_t *binning="")
Zero.
void UpdateCanvas()
Update canvas.
virtual Data_T Get() const
Get the data.
void SetItem(const Char_t *whichfactory, const Char_t *whichitem, Version itemversion, Short_t factversion=-1, void *ptr=0x0)
to change an item
virtual void SetXYZ(Double_t x, Double_t y, Double_t z)
virtual void SetE(Double_t e)
void FillHits(Option_t *type="Agata")
Fill Event.
It is a hit associated to a list of Hits.
HitDisplay3D(const char *name, const char *type, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
StdHit * NewHit(Option_t *type="Agata")
add current hit (added to current hit list)
virtual Double_t GetX() const
FactoryItem WhichKnownKey(const FactoryItem &kit, const FactoryItem &fit, PF_FactoryItemChange kch=ChangeOfVersion, PF_FactoryItemChange fch=ChangeOfVersion) const
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
header file for DFAgent.cpp
PSAInterface * GetDataPSA(UInt_t which)
To get one by one the PSA Frames in one event (It fills fFramePSA). Read has beed called ! ...
virtual Double_t GetGamma(Double_t=0.0) const
ClassImp(EventPSAWatcher)
*********************************** HitsSpectra Class **************************************/// ...
virtual Int_t GetID(Int_t which_id=0) const
get crystal/segment id. if which_id > 0, get crystal ID.
virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex)
Do Doppler taking into account additionnal offset of the agata position (see SetAgataOffset) ...
Base class for a trigger on a data flow.
ADF::LogMessage & endl(ADF::LogMessage &log)
TH1 * fCoreCommonDoppler
Sum of all core spectra (with Doppler correction)
virtual void Exec(Option_t *option="")
watch the current frame
virtual Double_t GetZ() const
const NamedItem< Data_t > * Get(const char *name)
to get a given item (reading mode only !!)
SharedFP * fFrame
main frame i.e. event:data:psa
Concrete implementation of a tracked Hit.
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 !)
FactoryItem WhichKnownFrame(const FactoryItem &kit, const FactoryItem &fit, PF_FactoryItemChange kch=ChangeOfVersion, PF_FactoryItemChange fch=ChangeOfVersion) const
To get the exact definition of a key and a Frame.
virtual void ShowEve(const Char_t *agataPathFile)
show eve event display
void SetRefresh(Long_t r)
Set Refresh.
virtual void GetXYZ(Double_t &x, Double_t &y, Double_t &z) const
Int_t GetNofEvents() const
get Number of events
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.