54 if (plane != NULL )plane->
print();
62 Int_t test = eventselection();
64 fEvt->GetHeader()->SetEvAnaStatus(test);
65 Info(
"process",
"********** EvAnaStatus = %d *********",test);
74 if(!fEvt->GetRecoEvent())
return 0;
77 TVector3 pgamma = TVector3(fDx,fDy,1).Unit();
78 TVector3 ppola = (TVector3(0,1,0).Cross(pgamma)).Unit();
83 Double_t zStart[2] = {1000,1000};
85 Int_t nCl = clArray->GetEntries();
86 for(Int_t iCl = 0; iCl<nCl; iCl++){
89 if(cl->
GetZ()<zStart[plane]){
91 zStart[plane] = cl->
GetZ();
99 Double_t fTstart = 90;
100 Double_t fTend = 430;
102 for(Int_t plane = 0; plane<2; plane++){
106 if ( m == NULL )
continue;
109 Double_t qTotBefore = 0;
110 Double_t qTotAfter = 0;
111 for(Int_t j=0;j<
NCHAN;j++){
112 for(Int_t i=0;i<
NADC;i++){
115 if(i< fTstart ) qTotBefore += q;
116 if( i >fTend) qTotAfter += q;
117 if(i>=fTstart && i<=fTend) qTotIn += q;
120 if(qTotBefore>fThr || qTotAfter>fThr)
126 Int_t nV = vArray->GetEntries();
127 for(Int_t iV = 0; iV<nV; iV++){
136 Double_t u1u2 = (p1.Unit()).Dot(p2.Unit());
137 Double_t thetapm=TMath::ACos(u1u2);
139 TVector3 ppola2 = ppola.Cross(pgamma);
140 TVector3 pPlus = TVector3(p1.Dot(pgamma.Unit()),p1.Dot(ppola.Unit()),p1.Dot(ppola2.Unit()));
141 TVector3 pMinus = TVector3(p2.Dot(pgamma.Unit()),p2.Dot(ppola.Unit()),p2.Dot(ppola2.Unit()));
142 Double_t omegapm = atan2((pPlus.Px()*pMinus.Py() - pMinus.Px()*pPlus.Py()),
143 (pPlus.Px()*pMinus.Pz() - pMinus.Px()*pPlus.Pz()));
145 TVector3 psum = p1 + p2;
146 if(!(z0>120 && z0<350 && !(z0>255 && z0<270) && x0>5 && x0<283 && y0>5 && y0<283))
148 if(TMath::Abs(x0-142-fDx*z0)>20)
continue;
149 if(TMath::Abs(y0-150-fDy*z0)>20)
continue;
150 Info(
"eventselection",
"X: %g, Y: %g, Z: %g",x0,y0,z0);
152 Info(
"eventselection",
"omega (thetapm == 0): %g %g %g",x0,y0,z0);
154 if(thetapm>=fThetaMax)
continue;
155 if(thetapm<=fThetaMin)
continue;
157 Info(
"eventselection",
"omega: %g, theta: %g (%g, %g, %g)",omegapm, thetapm,p1.Mag(),p2.Mag(),u1u2);
222 UInt_t ysize = 10*ysize2;
223 TGTransientFrame*
main =
new TGTransientFrame(gClient->GetRoot(), fMain, xsize, ysize);
224 main->Connect(
"CloseWindow()",
"HarpoRecoMonitorGui", main,
"CloseWindow()");
225 main->DontCallClose();
228 main->SetCleanup(kDeepCleanup);
230 TGVerticalFrame* frame =
new TGVerticalFrame(main,xsize,ysize,kVerticalFrame);
233 TGLayoutHints* fLayout1 =
new TGLayoutHints(kLHintsLeft ,5,5,5,5);
234 TGLayoutHints* fLayout2 =
new TGLayoutHints(kLHintsRight ,5,5,5,5);
235 TGLayoutHints* fLayout3 =
new TGLayoutHints(kLHintsTop | kLHintsExpandX ,5,5,5,5);
236 TGLayoutHints* fLayout4 =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,5,5,5,5);
244 TGLabel* fAnalysisLabel =
new TGLabel(frame,
"Template analysis");
247 TGHorizontalFrame* DxFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
248 TGLabel* DxLabel =
new TGLabel(DxFrame,
"fDx");
249 fChooseDx =
new TGNumberEntry(DxFrame);
250 fChooseDx->SetNumber(fDx);
251 TGHorizontalFrame* DyFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
252 TGLabel* DyLabel =
new TGLabel(DyFrame,
"fDy");
253 fChooseDy =
new TGNumberEntry(DyFrame);
254 fChooseDy->SetNumber(fDy);
255 TGHorizontalFrame* ThetaMinFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
256 TGLabel* ThetaMinLabel =
new TGLabel(ThetaMinFrame,
"fThetaMin");
257 fChooseThetaMin =
new TGNumberEntry(ThetaMinFrame);
258 fChooseThetaMin->SetNumber(fThetaMin);
259 TGHorizontalFrame* ThetaMaxFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
260 TGLabel* ThetaMaxLabel =
new TGLabel(ThetaMaxFrame,
"fThetaMax");
261 fChooseThetaMax =
new TGNumberEntry(ThetaMaxFrame);
262 fChooseThetaMax->SetNumber(fThetaMax);
264 main->AddFrame(frame,fLayout4);
265 frame->AddFrame(fAnalysisLabel,fLayout3);
266 frame->AddFrame(DxFrame,fLayout3);
267 DxFrame->AddFrame(DxLabel,fLayout1);
268 DxFrame->AddFrame(fChooseDx,fLayout2);
269 frame->AddFrame(DyFrame,fLayout3);
270 DyFrame->AddFrame(DyLabel,fLayout1);
271 DyFrame->AddFrame(fChooseDy,fLayout2);
272 frame->AddFrame(ThetaMinFrame,fLayout3);
273 ThetaMinFrame->AddFrame(ThetaMinLabel,fLayout1);
274 ThetaMinFrame->AddFrame(fChooseThetaMin,fLayout2);
275 frame->AddFrame(ThetaMaxFrame,fLayout3);
276 ThetaMaxFrame->AddFrame(ThetaMaxLabel,fLayout1);
277 ThetaMaxFrame->AddFrame(fChooseThetaMax,fLayout2);
283 TGTextButton* setConf =
new TGTextButton(frame,
"Save Config",
id);
284 setConf->Associate(fMain);
286 frame->AddFrame(setConf,fLayout3);
288 main->MapSubwindows();
300 if(!fChooseDx)
return;
302 fDx = fChooseDx->GetNumber();
303 fDy = fChooseDy->GetNumber();
304 fThetaMin = fChooseThetaMin->GetNumber();
305 fThetaMax = fChooseThetaMax->GetNumber();
Int_t eventselection()
Redefine empty default.
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
int main(int argc, char **argv)
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
Object containing the reconstruction information for one event (with array of HarpoRecoClusters Harpo...
void Save(char *mode=NULL)
Dummy analysis to run as test and example. Give basic histograms of the data.
Cluster object, containing position, charge and quality information.
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
void ConfigFrame(TGMainFrame *fMain, Int_t id)
Redefine empty default.
void print()
Overloaded method which do all job.
TClonesArray * GetVertex3DArray()
const ULong_t gkNDetectors
TClonesArray * GetClustersArray()
R__EXTERN HarpoDetSet * gHDetSet
3D vertex object, containing position, angle and associated 2D vertexes, and quality info ...