3 #include "AliAnalysisTaskEMCALPi0PbPb.h"
6 #include <TClonesArray.h>
11 #include <TLorentzVector.h>
13 #include "AliAODEvent.h"
14 #include "AliAODVertex.h"
15 #include "AliAnalysisManager.h"
16 #include "AliAnalysisTaskEMCALClusterizeFast.h"
17 #include "AliCentrality.h"
18 #include "AliEMCALGeoUtils.h"
19 #include "AliESDEvent.h"
20 #include "AliESDVertex.h"
23 ClassImp(AliAnalysisTaskEMCALPi0PbPb)
25 //________________________________________________________________________
26 AliAnalysisTaskEMCALPi0PbPb::AliAnalysisTaskEMCALPi0PbPb(const char *name)
27 : AliAnalysisTaskSE(name),
63 fHClustEccentricity(0),
66 fHClustEnergySigma(0x0),
67 fHClustSigmaSigma(0x0),
68 fHClustNCellEnergyRatio(0x0),
79 DefineInput(0, TChain::Class());
80 DefineOutput(1, TList::Class());
81 fBranchNames="ESD:AliESDRun.,AliESDHeader.,PrimaryVertex.,SPDVertex.,TPCVertex.,EMCALCells. "
82 "AOD:header,vertices,emcalCells";
85 //________________________________________________________________________
86 AliAnalysisTaskEMCALPi0PbPb::~AliAnalysisTaskEMCALPi0PbPb()
90 delete fOutput; fOutput = 0;
91 delete fPtRanges; fPtRanges = 0;
92 delete fGeom; fGeom = 0;
98 //________________________________________________________________________
99 void AliAnalysisTaskEMCALPi0PbPb::UserCreateOutputObjects()
101 // Create user objects here.
103 fOutput = new TList();
107 TFile *f = OpenFile(1);
109 fNtuple = new TNtuple(Form("nt%.0fto%.0f",fCentFrom,fCentTo),"nt",
110 "run:evt:cent:pt:e:emax:n:db:disp:mn:ms:chi:cpv:ecc:sig:eta:phi");
114 TH1::SetDefaultSumw2(kTRUE);
115 TH2::SetDefaultSumw2(kTRUE);
116 fHCuts = new TH1F("hEventCuts","",4,0.5,4.5);
117 fHCuts->GetXaxis()->SetBinLabel(1,"All (PS)");
118 fHCuts->GetXaxis()->SetBinLabel(2,Form("%s: %.0f-%.0f",fCentVar.Data(),fCentFrom,fCentTo));
119 fHCuts->GetXaxis()->SetBinLabel(3,"QFlag");
120 fHCuts->GetXaxis()->SetBinLabel(4,Form("zvtx: %.0f-%.0f",fVtxZMin,fVtxZMax));
121 fOutput->Add(fHCuts);
122 fHVertexZ = new TH1F("hVertexZBeforeCut","",100,-25,25);
123 fHVertexZ->SetXTitle("z [cm]");
124 fOutput->Add(fHVertexZ);
125 fHVertexZ2 = new TH1F("hVertexZAfterCut","",100,-25,25);
126 fHVertexZ2->SetXTitle("z [cm]");
127 fOutput->Add(fHVertexZ2);
128 fHCent = new TH1F("hCentBeforeCut","",101,-1,100);
129 fHCent->SetXTitle(fCentVar.Data());
130 fOutput->Add(fHCent);
131 fHCentQual = new TH1F("hCentAfterCut","",101,-1,100);
132 fHCentQual->SetXTitle(fCentVar.Data());
133 fOutput->Add(fHCentQual);
135 // histograms for cells
136 fHColuRow = new TH2F*[4];
137 fHColuRowE = new TH2F*[4];
138 fHCellMult = new TH1F*[4];
139 for (Int_t i = 0; i<4; ++i) {
140 fHColuRow[i] = new TH2F(Form("hColRow_Mod%d",i),"",49,0,49,25,0,25);
141 fHColuRow[i]->SetTitle(Form("Module %d: Occupancy", i));
142 fHColuRow[i]->SetXTitle("col (i#eta)");
143 fHColuRow[i]->SetYTitle("row (i#phi)");
144 fHColuRowE[i] = new TH2F(Form("hColRowE_Mod%d", i),"",49,0,49,25,0,25);
145 fHColuRowE[i]->SetTitle(Form("Module %d: Cell energy",i));
146 fHColuRowE[i]->SetXTitle("col (i#eta)");
147 fHColuRowE[i]->SetYTitle("row (i#phi)");
148 fHCellMult[i] = new TH1F(Form("hCellMult_Mod%d",i),"",1000,0,1000);
149 fHCellMult[i]->SetTitle(Form("Module %d: Cell multiplicity",i));
150 fHCellMult[i]->SetXTitle("# of cells");
151 fOutput->Add(fHColuRow[i]);
152 fOutput->Add(fHColuRowE[i]);
153 fOutput->Add(fHCellMult[i]);
155 fHCellE = new TH1F("hCellE","",150,0.,15.);
156 fHCellE->SetXTitle("E_{cell} [GeV]");
157 fOutput->Add(fHCellE);
158 fHCellH = new TH1F ("fHCellHighestE","",150,0.,15.);
159 fHCellH->SetXTitle("E^{max}_{cell} [GeV]");
160 fOutput->Add(fHCellH);
161 fHCellM = new TH1F ("fHCellMeanEperHitCell","",250,0.,2.5);
162 fHCellM->SetXTitle("#LT E_{cell}#GT [GeV]");
163 fOutput->Add(fHCellM);
164 fHCellM2 = new TH1F ("fHCellMeanEperAllCells","",250,0.,1);
165 fHCellM2->SetXTitle("1/N_{cells} #Sigma E_{cell} [GeV]");
166 fOutput->Add(fHCellM2);
168 // histograms for clusters
169 fHClustEccentricity = new TH1F("hClustEccentricity","",100,-0.1,1.1);
170 fHClustEccentricity->SetXTitle("#epsilon_{C}");
171 fOutput->Add(fHClustEccentricity);
172 fHClustEtaPhi = new TH2F("hClustEtaPhi","",500,-0.8,0.8,500,1.2,2.2);
173 fHClustEtaPhi->SetXTitle("#eta");
174 fHClustEtaPhi->SetYTitle("#varphi");
175 fOutput->Add(fHClustEtaPhi);
176 fHClustEnergyPt = new TH2F("hClustEnergyPt","",250,0,50,250,0,50);
177 fHClustEnergyPt->SetXTitle("E [GeV]");
178 fHClustEnergyPt->SetYTitle("p_{T} [GeV/c]");
179 fOutput->Add(fHClustEnergyPt);
180 fHClustEnergySigma = new TH2F("hClustEnergySigma","",100,0,100,500,0,50);
181 fHClustEnergySigma->SetXTitle("E_{C} * #sigma_{max} [GeV*cm]");
182 fHClustEnergySigma->SetYTitle("E_{C} [GeV]");
183 fOutput->Add(fHClustEnergySigma);
184 fHClustSigmaSigma = new TH2F("hClustSigmaSigma","",500,0,50,500,0,50);
185 fHClustSigmaSigma->SetXTitle("#lambda_{0} [cm]");
186 fHClustSigmaSigma->SetYTitle("#sigma_{max} [cm]");
187 fOutput->Add(fHClustSigmaSigma);
188 fHClustNCellEnergyRatio = new TH2F("hClustNCellEnergyRatio","",27,-0.5,26.5,101,-0.05,1.05);
189 fHClustNCellEnergyRatio->SetXTitle("N_{cells}");
190 fHClustNCellEnergyRatio->SetYTitle("E^{max}_{cell}/E_{clus}");
191 fOutput->Add(fHClustNCellEnergyRatio);
193 // histograms for pion candidates
194 fHPionEtaPhi = new TH2F("hPionEtaPhi","",100,-0.8,0.8,100,1.2,2.2);
195 fHPionEtaPhi->SetXTitle("#eta_{#gamma#gamma}");
196 fHPionEtaPhi->SetYTitle("#varphi_{#gamma#gamma}");
197 fOutput->Add(fHPionEtaPhi);
198 fHPionMggPt = new TH2F("hPionMggPt","",1000,0,2,100,0,20.0);
199 fHPionMggPt->SetXTitle("M_{#gamma#gamma} [GeV/c^{2}]");
200 fHPionMggPt->SetYTitle("p_{T}^{#gamma#gamma} [GeV/c]");
201 fOutput->Add(fHPionMggPt);
202 fHPionMggAsym = new TH2F("hPionMggAsym","",1000,0,2,100,0,1);
203 fHPionMggAsym->SetXTitle("M_{#gamma#gamma} [GeV/c^{2}]");
204 fHPionMggAsym->SetYTitle("Z_{#gamma#gamma} [GeV]");
205 fOutput->Add(fHPionMggAsym);
206 fHPionMggDgg = new TH2F("hPionMggDgg","",1000,0,2,100,0,10);
207 fHPionMggDgg->SetXTitle("M_{#gamma#gamma} [GeV/c^{2}]");
208 fHPionMggDgg->SetYTitle("opening angle [grad]");
209 fOutput->Add(fHPionMggDgg);
210 const Int_t nbins = 20;
211 Double_t xbins[nbins] = {0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,6,7,8,9,10,12.5,15,20,25,50};
212 fPtRanges = new TAxis(nbins-1,xbins);
213 for (Int_t i = 0; i<=nbins; ++i) {
214 fHPionInvMasses[i] = new TH1F(Form("hPionInvMass%d",i),"",1000,0,2);
215 fHPionInvMasses[i]->SetXTitle("M_{#gamma#gamma} [GeV/c^{2}]");
217 fHPionInvMasses[i]->SetTitle(Form("0 < p_{T}^{#gamma#gamma} <%.1f",xbins[0]));
219 fHPionInvMasses[i]->SetTitle(Form("p_{T}^{#gamma#gamma} > 50"));
221 fHPionInvMasses[i]->SetTitle(Form("%.1f < p_{T}^{#gamma#gamma} <%.1f",xbins[i-1],xbins[i]));
222 fOutput->Add(fHPionInvMasses[i]);
225 PostData(1, fOutput);
228 //________________________________________________________________________
229 void AliAnalysisTaskEMCALPi0PbPb::UserExec(Option_t *)
231 // Called for each event.
236 AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager();
237 fEsdEv = dynamic_cast<AliESDEvent*>(InputEvent());
239 am->LoadBranch("AliESDRun.");
240 am->LoadBranch("AliESDHeader.");
242 fAodEv = dynamic_cast<AliAODEvent*>(InputEvent());
243 am->LoadBranch("header");
246 if (!fGeom) { // set misalignment matrices (stored in first event)
247 fGeom = new AliEMCALGeoUtils("EMCAL_FIRSTYEARV1","EMCAL");
249 for (Int_t i=0; i<4; ++i)
250 fGeom->SetMisalMatrix(fEsdEv->GetESDRun()->GetEMCALMatrix(i),i);
252 for (Int_t i=0; i<4; ++i)
253 fGeom->SetMisalMatrix(fAodEv->GetHeader()->GetEMCALMatrix(i),i);
255 fGeom->GetEMCGeometry();
261 const AliCentrality *centP = InputEvent()->GetCentrality();
262 Double_t cent = centP->GetCentralityPercentileUnchecked(fCentVar);
264 if (cent<fCentFrom||cent>fCentTo)
270 if (centP->GetQuality()>0)
274 fHCentQual->Fill(cent);
277 // count number of accepted events
281 am->LoadBranch("PrimaryVertex.");
282 am->LoadBranch("SPDVertex.");
283 am->LoadBranch("TPCVertex.");
285 fAodEv = dynamic_cast<AliAODEvent*>(InputEvent());
286 am->LoadBranch("vertices");
289 const AliVVertex *vertex = InputEvent()->GetPrimaryVertex();
293 fHVertexZ->Fill(vertex->GetZ());
295 if(vertex->GetZ()<fVtxZMin||vertex->GetZ()>fVtxZMax)
299 fHVertexZ2->Fill(vertex->GetZ());
301 fRecPoints = 0; // will be set if fClusName is given and AliAnalysisTaskEMCALClusterizeFast is used
302 fEsdClusters = 0; // will be set if ESD input used and if fRecPoints are not set of if clusters are attached
303 fEsdCells = 0; // will be set if ESD input used
304 fAodClusters = 0; // will be set if AOD input used and if fRecPoints are not set of if clusters are attached
305 // or if fClusName is given and AliAnalysisTaskEMCALClusterizeFast in AOD output mode
306 fAodCells = 0; // will be set if AOD input used
308 // deal with special output from AliAnalysisTaskEMCALClusterizeFast first
309 Bool_t clusattached = 0;
310 Bool_t recalibrated = 0;
311 if (1 && !fClusName.IsNull()) {
312 AliAnalysisTaskEMCALClusterizeFast *cltask = 0;
313 TObjArray *ts = am->GetTasks();
314 cltask = dynamic_cast<AliAnalysisTaskEMCALClusterizeFast*>(ts->FindObject(fClusName));
315 if (cltask && cltask->GetClusters()) {
316 fRecPoints = const_cast<TObjArray*>(cltask->GetClusters());
317 clusattached = cltask->GetAttachClusters();
318 if (cltask->GetCalibData()!=0)
319 recalibrated = kTRUE;
322 if (1 && AODEvent() && !fClusName.IsNull()) {
323 TList *l = AODEvent()->GetList();
324 TClonesArray *clus = 0;
326 clus = dynamic_cast<TClonesArray*>(l->FindObject(fClusName));
331 if (fEsdEv) { // ESD input mode
332 if (1 && (!fRecPoints||clusattached)) {
334 am->LoadBranch("CaloClusters");
335 TList *l = fEsdEv->GetList();
336 TClonesArray *clus = 0;
338 clus = dynamic_cast<TClonesArray*>(l->FindObject("CaloClusters"));
344 am->LoadBranch("EMCALCells.");
345 fEsdCells = fEsdEv->GetEMCALCells();
347 } else if (fAodEv) { // AOD input mode
348 if (1 && (!fAodClusters || clusattached)) {
350 am->LoadBranch("caloClusters");
351 TList *l = fAodEv->GetList();
352 TClonesArray *clus = 0;
354 clus = dynamic_cast<TClonesArray*>(l->FindObject("caloClusters"));
360 am->LoadBranch("emcalCells");
361 fAodCells = fAodEv->GetEMCALCells();
364 AliFatal("Impossible to not have either pointer to ESD or AOD event");
368 AliDebug(2,Form("fRecPoints set: %p", fRecPoints));
369 AliDebug(2,Form("fEsdClusters set: %p", fEsdClusters));
370 AliDebug(2,Form("fEsdCells set: %p", fEsdCells));
371 AliDebug(2,Form("fAodClusters set: %p", fAodClusters));
372 AliDebug(2,Form("fAodCells set: %p", fAodCells));
376 ClusterAfterburner();
382 PostData(1, fOutput);
385 //________________________________________________________________________
386 void AliAnalysisTaskEMCALPi0PbPb::Terminate(Option_t *)
388 // Terminate called at the end of analysis.
391 TFile *f = OpenFile(1);
396 AliInfo(Form("\nAccepted %lld events", fNEvs));
399 //________________________________________________________________________
400 void AliAnalysisTaskEMCALPi0PbPb::FillCellHists()
402 // Fill histograms related to cell properties.
404 AliVCaloCells *cells = fEsdCells;
409 Int_t cellModCount[4] = {0,0,0,0};
410 Double_t cellMaxE = 0;
411 Double_t cellMeanE = 0;
412 Int_t ncells = cells->GetNumberOfCells();
416 for (Int_t i = 0; i<ncells; ++i ) {
417 Int_t absID = TMath::Abs(cells->GetCellNumber(i));
418 Double_t cellE = cells->GetAmplitude(i);
419 fHCellE->Fill(cellE);
424 Int_t iSM=-1, iTower=-1, nIphi=-1, nIeta=-1;
425 Bool_t ret = fGeom->GetCellIndex(absID, iSM, iTower, nIphi, nIeta);
427 AliError(Form("Could not get cell index for %d", absID));
431 Int_t iPhi=-1, iEta=-1;
432 fGeom->GetCellPhiEtaIndexInSModule(iSM, iTower, nIphi, nIeta, iPhi, iEta);
433 fHColuRow[iSM]->Fill(iEta,iPhi,1);
434 fHColuRowE[iSM]->Fill(iEta,iPhi,cellE);
436 fHCellH->Fill(cellMaxE);
438 fHCellM->Fill(cellMeanE);
439 fHCellM2->Fill(cellMeanE*ncells/24/48/4); //hard-coded but there is a way to figure out from geometry
440 for (Int_t i=0; i<4; ++i)
441 fHCellMult[i]->Fill(cellModCount[i]);
445 //________________________________________________________________________
446 void AliAnalysisTaskEMCALPi0PbPb::FillClusHists()
448 // Fill histograms related to cluster properties.
449 Double_t clusterEcc = 0;
451 Double_t vertex[3] = {0,0,0};
452 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
454 TObjArray *clusters = fEsdClusters;
456 clusters = fAodClusters;
459 TLorentzVector clusterVec;
460 Int_t nclus = clusters->GetEntries();
461 for(Int_t i = 0; i<nclus; ++i) {
462 AliVCluster *clus = static_cast<AliVCluster*>(clusters->At(i));
465 if (!clus->IsEMCAL())
467 clus->GetMomentum(clusterVec,vertex);
468 Double_t maxAxis = 0, minAxis = 0;
469 GetSigma(clus,maxAxis,minAxis);
471 clusterEcc = TMath::Sqrt(1.0 - minAxis*minAxis/(maxAxis*maxAxis));
473 fHClustEccentricity->Fill(clusterEcc);
474 fHClustEtaPhi->Fill(clusterVec.Eta(),clusterVec.Phi());
475 fHClustEnergyPt->Fill(clusterVec.E(),clusterVec.Pt());
476 fHClustEnergySigma->Fill(clus->E()*maxAxis,clus->E());
477 fHClustSigmaSigma->Fill(max(clus->GetM02(),clus->GetM20()),clus->E()*maxAxis);
478 fHClustNCellEnergyRatio->Fill(clus->GetNCells(),GetMaxCellEnergy(clus)/clus->E());
481 vals[0] = InputEvent()->GetRunNumber();
482 vals[1] = (((UInt_t)InputEvent()->GetOrbitNumber() << 12) | (UInt_t)InputEvent()->GetBunchCrossNumber());
485 vals[2] = InputEvent()->GetCentrality()->GetCentralityPercentileUnchecked(fCentVar);
486 vals[3] = clusterVec.Pt();
487 vals[4] = clusterVec.E();
488 vals[5] = GetMaxCellEnergy(clus);
489 vals[6] = clus->GetNCells();
490 vals[7] = clus->GetDistanceToBadChannel();
491 vals[8] = clus->GetDispersion();
492 vals[9] = clus->GetM20();
493 vals[10] = clus->GetM02();
494 vals[11] = clus->Chi2();
495 vals[12] = clus->GetEmcCpvDistance();
496 vals[13] = clusterEcc;
498 vals[15] = clusterVec.Eta();
499 vals[16] = clusterVec.Phi();
506 //________________________________________________________________________
507 void AliAnalysisTaskEMCALPi0PbPb::FillPionHists()
509 // Fill histograms related to pions.
511 Double_t vertex[3] = {0,0,0};
512 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
514 TObjArray *clusters = fEsdClusters;
516 clusters = fAodClusters;
519 TLorentzVector clusterVec1;
520 TLorentzVector clusterVec2;
521 TLorentzVector pionVec;
523 Int_t nclus = clusters->GetEntries();
524 for (Int_t i = 0; i<nclus; ++i) {
525 AliVCluster *clus1 = static_cast<AliVCluster*>(clusters->At(i));
528 if (!clus1->IsEMCAL())
530 if (clus1->E()<0.010)
532 if (clus1->GetNCells()<fNminCells)
534 clus1->GetMomentum(clusterVec1,vertex);
535 for (Int_t j = i+1; j<nclus; ++j) {
536 AliVCluster *clus2 = static_cast<AliVCluster*>(clusters->At(j));
539 if (!clus2->IsEMCAL())
541 if (clus2->E()<0.010)
543 if (clus2->GetNCells()<fNminCells)
545 clus2->GetMomentum(clusterVec2,vertex);
546 pionVec = clusterVec1 + clusterVec2;
547 Double_t pionZgg = TMath::Abs(clusterVec1.E()-clusterVec2.E())/pionVec.E();
548 Double_t pionOpeningAngle = clusterVec1.Angle(clusterVec2.Vect());
549 if (pionZgg < fAsymMax) {
550 fHPionEtaPhi->Fill(pionVec.Eta(),pionVec.Phi());
551 fHPionMggPt->Fill(pionVec.M(),pionVec.Pt());
552 fHPionMggAsym->Fill(pionVec.M(),pionZgg);
553 fHPionMggDgg->Fill(pionVec.M(),pionOpeningAngle);
554 Int_t bin = fPtRanges->FindBin(pionVec.Pt());
555 fHPionInvMasses[bin]->Fill(pionVec.M());
562 //________________________________________________________________________
563 void AliAnalysisTaskEMCALPi0PbPb::ClusterAfterburner()
567 AliVCaloCells *cells = fEsdCells;
574 Int_t ncells = cells->GetNumberOfCells();
578 Double_t cellMeanE = 0, cellSigE = 0;
579 for (Int_t i = 0; i<ncells; ++i ) {
580 Double_t cellE = cells->GetAmplitude(i);
582 cellSigE += cellE*cellE;
586 cellSigE -= cellMeanE*cellMeanE;
589 cellSigE = TMath::Sqrt(cellSigE / ncells);
591 Double_t subE = cellMeanE - 7*cellSigE;
595 for (Int_t i = 0; i<ncells; ++i) {
597 Double_t amp=0,time=0;
598 if (!cells->GetCell(i, id, amp, time))
603 cells->SetCell(i, id, amp, time);
606 TObjArray *clusters = fEsdClusters;
608 clusters = fAodClusters;
613 Int_t nclus = clusters->GetEntries();
614 for (Int_t i = 0; i<nclus; ++i) {
615 AliVCluster *clus = static_cast<AliVCluster*>(clusters->At(i));
616 Int_t nc = clus->GetNCells();
619 UShort_t ids[100] = {0};
620 Double_t fra[100] = {0};
621 for (Int_t j = 0; j<nc; ++j) {
622 Short_t id = TMath::Abs(clus->GetCellAbsId(j));
623 Double_t cen = cells->GetCellAmplitude(id);
631 clusters->RemoveAt(i);
634 for (Int_t j = 0; j<nc2; ++j) {
636 Double_t cen = cells->GetCellAmplitude(id);
640 AliAODCaloCluster *aodclus = dynamic_cast<AliAODCaloCluster*>(clus);
643 aodclus->SetNCells(nc2);
644 aodclus->SetCellsAmplitudeFraction(fra);
645 aodclus->SetCellsAbsId(ids);
648 clusters->Compress();
651 //________________________________________________________________________
652 Double_t AliAnalysisTaskEMCALPi0PbPb::GetMaxCellEnergy(AliVCluster *cluster)
654 // Get maximum energy of attached cell.
657 Int_t ncells = cluster->GetNCells();
659 for (Int_t i=0; i<ncells; i++) {
660 Double_t e = fEsdCells->GetCellAmplitude(TMath::Abs(cluster->GetCellAbsId(i)));
665 for (Int_t i=0; i<ncells; i++) {
666 Double_t e = fAodCells->GetCellAmplitude(TMath::Abs(cluster->GetCellAbsId(i)));
674 //________________________________________________________________________
675 void AliAnalysisTaskEMCALPi0PbPb::GetSigma(AliVCluster *cluster, Double_t& sigmaMax, Double_t &sigmaMin)
677 // Calculate the (E) weighted variance along the longer (eigen) axis.
679 sigmaMax = 0; // cluster variance along its longer axis
680 sigmaMin = 0; // cluster variance along its shorter axis
681 Double_t Ec = cluster->E(); // cluster energy
682 Double_t Xc = 0 ; // cluster first moment along X
683 Double_t Yc = 0 ; // cluster first moment along Y
684 Double_t Sxx = 0 ; // cluster second central moment along X (variance_X^2)
685 Double_t Sxy = 0 ; // cluster second central moment along Y (variance_Y^2)
686 Double_t Syy = 0 ; // cluster covariance^2
688 AliVCaloCells *cells = fEsdCells;
695 Int_t ncells = cluster->GetNCells();
700 for(Int_t j=0; j<ncells; ++j) {
701 Int_t id = TMath::Abs(cluster->GetCellAbsId(j));
702 fGeom->GetGlobal(id,pos);
703 Double_t cellen = cells->GetCellAmplitude(id);
704 Xc += cellen*pos.X();
705 Yc += cellen*pos.Y();
706 Sxx += cellen*pos.X()*pos.X();
707 Syy += cellen*pos.Y()*pos.Y();
708 Sxy += cellen*pos.X()*pos.Y();
718 sigmaMax = (Sxx + Syy + TMath::Sqrt((Sxx-Syy)*(Sxx-Syy)+4.0*Sxy*Sxy))/2.0;
719 sigmaMax = TMath::Sqrt(sigmaMax);
720 sigmaMin = TMath::Abs(Sxx + Syy - TMath::Sqrt((Sxx-Syy)*(Sxx-Syy)+4.0*Sxy*Sxy))/2.0;
721 sigmaMin = TMath::Sqrt(sigmaMin);