32 #include "TApplication.h"
53 if (plane != NULL )plane->
print();
64 Info(
"process",
"Event %ld",
nEvents);
72 Int_t nCl = clArray->GetEntries();
89 for(Int_t i = 0; i<nTr; i++){
91 Double_t pX = tr->
GetPx();
92 Double_t pY = tr->
GetPy();
93 Double_t pZ = tr->
GetPz();
94 Double_t x0 = tr->
GetX0();
95 Double_t y0 = tr->
GetY0();
100 Double_t thetaSim[2];
101 thetaSim[0] = -TMath::ATan(pY/pZ);
102 thetaSim[1] = -TMath::ATan(pX/pZ);
104 rhoSim[0] = -((511./2. - 61.3)*TMath::Tan(thetaSim[0]) - y0 - 5.5)*TMath::Cos(thetaSim[0]);
105 rhoSim[1] = -((511./2. - 61.3)*TMath::Tan(thetaSim[1]) - x0 - 5.8)*TMath::Cos(thetaSim[1]);
107 for(Int_t icl = 0; icl<nCl; icl++){
112 Double_t xCl = -1.0, zCl = -1.0 , delta = -1.0;
113 Double_t qCl = cluster->
GetQ();
118 delta = zCl - (rhoSim[plane]/TMath::Sin(thetaSim[plane]) - (xCl - 144.)/TMath::Tan(thetaSim[plane]) + 511/2);
124 delta = xCl - (rhoSim[plane]/TMath::Cos(thetaSim[plane]) - (zCl - 511/2)*TMath::Tan(thetaSim[plane]) + 144);
130 delta = xCl - (rhoSim[plane]/TMath::Cos(thetaSim[plane]) - (zCl - 511/2)*TMath::Tan(thetaSim[plane]) + 144);
134 if(cluster->
GetWidth() < 3)
continue;
135 Bool_t separators = (TMath::Abs(xCl - 94) <= 7) || (TMath::Abs(xCl - 194) <= 7);
137 (TMath::Abs(xCl - 28) <= 6) ||
138 (TMath::Abs(xCl - 61) <= 6) ||
139 (TMath::Abs(xCl - 127) <= 6) ||
140 (TMath::Abs(xCl - 160) <= 6) ||
141 (TMath::Abs(xCl - 226) <= 6) ||
142 (TMath::Abs(xCl - 259) <= 6);
146 Bool_t spaceCut = !separators && !(plane==0 && GemSectors) && xCl>25 && xCl<263;
147 Bool_t angleCut = TMath::Cos(thetaSim[plane])>0.5;
149 angleCut = TMath::Cos(thetaSim[plane])>0.5 && TMath::Cos(thetaSim[plane])<0.8;
170 const Int_t nTr = trArray->GetEntries();
172 Info(
"process",
"nTr = %d",nTr);
175 Double_t angle[2], xstart[2], zstart[2];
177 for(Int_t itr = 0; itr<nTr; itr++){
183 xstart[plane] = track->
GetX0();
190 Info(
"process",
"angles = %g %g",angle[0],angle[1]);
201 for(Int_t icl = 0; icl<nCl; icl++){
205 Double_t xCl = -1.0, zCl = -1.0, delta = -1.0;
206 Double_t qCl = cluster->
GetQ();
210 delta = zCl - zstart[plane] - (xCl - xstart[plane])/angle[plane];
215 delta = xCl - xstart[plane] - (zCl - zstart[plane])*angle[plane];
218 xCl = cluster->
GetX();
219 zCl = cluster->
GetZ();
220 delta = (xCl - xstart[plane] - (zCl - zstart[plane])*angle[plane])/TMath::Sqrt(1+angle[plane]*angle[plane]);
223 Info(
"process",
"%g %g %g",xCl,zCl,delta);
225 if(cluster->
GetWidth() < 3)
continue;
228 Bool_t separators = (TMath::Abs(xCl - 94) <= 7) || (TMath::Abs(xCl - 194) <= 7);
230 (TMath::Abs(xCl - 28) <= 6) ||
231 (TMath::Abs(xCl - 61) <= 6) ||
232 (TMath::Abs(xCl - 127) <= 6) ||
233 (TMath::Abs(xCl - 160) <= 6) ||
234 (TMath::Abs(xCl - 226) <= 6) ||
235 (TMath::Abs(xCl - 259) <= 6);
258 Bool_t spaceCut = !separators && !(plane==0 && GemSectors) && xCl>25 && xCl<263;
260 Bool_t angleCut = TMath::Abs(angle[plane])<1;
262 angleCut = TMath::Abs(angle[plane])>0.1 && TMath::Abs(angle[plane])<1;
287 for(Int_t i = 0; i<nTr; i++){
289 Double_t pX = tr->
GetPx();
290 Double_t pY = tr->
GetPy();
291 Double_t pZ = tr->
GetPz();
296 Double_t thetaSim[2];
297 thetaSim[0] = -TMath::ATan(pY/pZ);
298 thetaSim[1] = -TMath::ATan(pX/pZ);
318 hCompLength->Fill(TMath::Abs(TMath::Cos(angle[0])*TMath::Cos(angle[1])),pZ);
332 for(Int_t i = 0; i<200; i++){
411 hAngle =
new TH1F(
"hAngle",
"map",200,-10,10);
412 hResAngleX =
new TH1F(
"hResAngleX",
";#sigma(#theta_{X})",1000,-TMath::Pi()/10,TMath::Pi()/10);
413 hResAngleY =
new TH1F(
"hResAngleY",
";#sigma(#theta_{Y})",1000,-TMath::Pi()/10,TMath::Pi()/10);
414 hAngleX =
new TH1F(
"hAngleX",
";#sigma(#theta_{X})",200,-TMath::Pi(),TMath::Pi());
415 hAngleY =
new TH1F(
"hAngleY",
";#sigma(#theta_{Y})",200,-TMath::Pi(),TMath::Pi());
416 hAngleSimX =
new TH1F(
"hAngleSimX",
";#sigma(#theta_{X})",200,-TMath::Pi(),TMath::Pi());
417 hAngleSimY =
new TH1F(
"hAngleSimY",
";#sigma(#theta_{Y})",200,-TMath::Pi(),TMath::Pi());
418 hAngleSimCutX =
new TH1F(
"hAngleSimCutX",
";#sigma(#theta_{X})",200,-TMath::Pi(),TMath::Pi());
419 hAngleSimCutY =
new TH1F(
"hAngleSimCutY",
";#sigma(#theta_{Y})",200,-TMath::Pi(),TMath::Pi());
422 hResRhoX =
new TH1F(
"hResRhoX",
";#sigma(#rho_{Y})",200,-10,10);
423 hResRhoY =
new TH1F(
"hResRhoY",
";#sigma(#rho_{Y})",200,-10,10);
424 hRhoX =
new TH2F(
"hRhoX",
";#rho_{X};X",2000,-20,20,200,0,20);
425 hRhoY =
new TH2F(
"hRhoY",
";#rho_{Y};Y",2000,-20,20,200,0,20);
427 hCompAngleX =
new TH2F(
"hCompAngleX",
";tan(#alpha_{X});p_{Y}/p_{Z}",2000,-20,20,2000,-20,20);
428 hCompAngleY =
new TH2F(
"hCompAngleY",
";tan(#alpha_{Y});p_{X}/p_{Z}",2000,-20,20,2000,-20,20);
430 hCompLength =
new TH2F(
"hCompLength",
";cos(#alpha_{X})#timescos(#alpha_{Y});1/p_{Z}",100,0,1,100,0,1);
449 const char*
type[3] = {
"Z",
"X",
""};
450 const char* plane[2] = {
"X",
"Y"};
451 for(Int_t i = 0; i<3; i++){
452 for(Int_t j = 0; j<2; j++){
454 hDelta[i][j] =
new TH1F(Form(
"hDelta%s%s",type[i],plane[j]),Form(
";#delta_{%s}",type[i]),1000,-max,max);
456 hDeltaVsA[i][j] =
new TH2F(Form(
"hDelta%svsA%s",type[i],plane[j]),Form(
";Angle;#delta_{%s}",type[i]),100,-TMath::Pi(),TMath::Pi(),1000,-max,max);
457 hDeltaVsT[i][j] =
new TH2F(Form(
"hDelta%svsT%s",type[i],plane[j]),Form(
";T_{drift};#delta_{%s}",type[i]),512,0,512,1000,-max,max);
458 hDeltaVsQ[i][j] =
new TH2F(Form(
"hDelta%svsQ%s",type[i],plane[j]),Form(
";Q_{cl};#delta_{%s}",type[i]),1000,0,10000,1000,-max,max);
459 hDeltaVsX[i][j] =
new TH2F(Form(
"hDelta%svsX%s",type[i],plane[j]),Form(
";Channel;#delta_{%s}",type[i]),288,0,288,1000,-max,max);
460 hDeltaVsXT[i][j] =
new TH3F(Form(
"hDelta%svsXT%s",type[i],plane[j]),Form(
";Channel;T_{drift};#delta_{%s}",type[i]),288,0,288,512,0,512,200,-max,max);
463 hDeltaSim[i][j] =
new TH1F(Form(
"hDeltaSim%s%s",type[i],plane[j]),Form(
";#delta_{%s}",type[i]),1000,-max,max);
465 hDeltaSimVsA[i][j] =
new TH2F(Form(
"hDeltaSim%svsA%s",type[i],plane[j]),Form(
";Angle;#delta_{%s}",type[i]),100,-TMath::Pi(),TMath::Pi(),1000,-max,max);
466 hDeltaSimVsT[i][j] =
new TH2F(Form(
"hDeltaSim%svsT%s",type[i],plane[j]),Form(
";T_{drift};#delta_{%s}",type[i]),512,0,512,1000,-max,max);
467 hDeltaSimVsQ[i][j] =
new TH2F(Form(
"hDeltaSim%svsQ%s",type[i],plane[j]),Form(
";Q_{cl};#delta_{%s}",type[i]),1000,0,10000,1000,-max,max);
468 hDeltaSimVsX[i][j] =
new TH2F(Form(
"hDeltaSim%svsX%s",type[i],plane[j]),Form(
";Channel;#delta_{%s}",type[i]),288,0,288,1000,-max,max);
469 hDeltaSimVsXT[i][j] =
new TH3F(Form(
"hDeltaSim%svsXT%s",type[i],plane[j]),Form(
";Channel;T_{drift};#delta_{%s}",type[i]),288,0,288,512,0,512,200,-max,max);
512 for(Int_t i = 0; i<3; i++){
513 for(Int_t j = 0; j<2; j++){
HarpoRecoEvent * GetRecoEvent()
TH2F * hDeltaSimVsX[3][2]
void Save(char *mode=NULL)
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
Track object, containing position, angle, charge and quality information.
Object containing the reconstruction information for one event (with array of HarpoRecoClusters Harpo...
TH2F * hDeltaSimVsT[3][2]
A class store HARPO row DCC event data and header. End provide access metods to the row data...
Cluster object, containing position, charge and quality information.
TFile * OpenHistFile(const char *ananame)
Dummy analysis to run as test and example. Give basic histograms of the data.
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
TH2F * hDeltaSimVsQ[3][2]
HarpoDetEvent * GetDetEvent(Long_t plane=XDCC)
Data from Keller temperuture and pressure sensors.
TpcSimMCTrack * GetTrack(Int_t i)
TpcSimMCEvent * GetMCEvent()
HarpoEventHeader * GetHeader()
void print()
Overloaded method which do all job.
TH1F * hDelta[3][2]
Redefine empty default.
const ULong_t gkNDetectors
TClonesArray * GetTracksArray()
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
TH2F * hDeltaSimVsA[3][2]
TH3F * hDeltaSimVsXT[3][2]
TClonesArray * GetClustersArray()
R__EXTERN HarpoDetSet * gHDetSet