22 manyZigs = MANYZIGZAGS;
25 correctedcentroid = 0;
27 if (RecalibrateCharge) FixTheCharges();
29 Precalc_PHI = GetPHI();
30 Precalc_R = manyZigs[0]->RCenter();
48 for(
int i=0;
i<manyZigs.size();
i++)
50 den += manyZigs[
i]->Q();
60 cout <<
"ABlob:: Error: Blob has zero total charge...no Z centroid" << endl;
65 for(
int i=0;
i<manyZigs.size();
i++)
67 num += manyZigs[
i]->Q() * manyZigs[
i]->ZCenter();
78 cout <<
"ABlob:: Error: Blob has zero total charge...no Phi centroid" << endl;
85 for(
int i=0;
i<manyZigs.size();
i++)
87 num += manyZigs[
i]->Q() * manyZigs[
i]->PCenter();
98 double Maxphi = -9999;
104 if (phi < Minphi) Minphi =
phi;
105 if (phi > Maxphi) Maxphi =
phi;
109 int NBINS = int( (Maxphi - Minphi)/dPhi + 1.5 );
110 double left = Minphi - 0.5*dPhi;
111 double right = Maxphi + 0.5*dPhi;
113 BlobPos =
new TH1D(
"BlobPos",
"BlobPos", NBINS, left, right);
114 BlobSigma =
new TH1D(
"BlobSigma",
"BlobSigma", 250, 0.0, 8.0
E-3);
115 BlobFit =
new TF1(
"BlobFit",
"[0]*exp(-(x-[1])*(x-[1])/(2*[2]*[2]))", left, right);
121 for(
int i=0;
i<manyZigs.size();
i++)
123 double phi = manyZigs[
i]->PCenter();
124 double Q = manyZigs[
i]->Q();
134 double max =
BlobPos->GetMaximum();
135 double mean = manyZigs[0]->PCenter();
136 double sigma = 0.003;
137 if (sigma < dPhi/3.0) sigma = dPhi/3.0;
138 if (sigma > 5.0*dPhi) sigma = 5.0*dPhi;
142 BlobFit->SetParameter(2,sigma);
144 BlobFit->SetParLimits(0, max/2.0, 3.0*max);
145 BlobFit->SetParLimits(1, mean-1.0*dPhi, mean+1.0*dPhi);
146 BlobFit->SetParLimits(2, 0.0007, 0.0055);
152 return BlobFit->GetParameter(1);;
160 double X = CentroidX();
161 double Y = CentroidY();
163 TMarker* ablob =
new TMarker(X,Y,shape);
165 ablob->SetMarkerSize(1);
166 ablob->SetMarkerColor(6);
178 cout <<
" \tR:" << CentroidR();
179 cout <<
" \tP:" << CentroidP();
210 double Reftime = maxT();
211 double Mintime = Reftime - 2.0;
212 double Maxtime = Reftime + 2.0;
214 for(
int i=0;
i<manyZigs.size();
i++)
216 manyZigs[
i]->DetermineQ(Mintime,Maxtime);