1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 //_________________________________________________________________________
18 // This analysis provides a new list of clusters to be used in other analysis
20 // Author: Gustavo Conesa Balbastre,
21 // Adapted from analysis class from Deepa Thomas
24 //_________________________________________________________________________
28 #include "TRefArray.h"
29 #include "TClonesArray.h"
31 #include "TGeoManager.h"
33 #include "TInterpreter.h"
35 // --- AliRoot Analysis Steering
36 #include "AliAnalysisTask.h"
37 #include "AliAnalysisManager.h"
38 #include "AliESDEvent.h"
39 #include "AliGeomManager.h"
40 #include "AliVCaloCells.h"
41 #include "AliAODCaloCluster.h"
42 #include "AliCDBManager.h"
43 #include "AliCDBStorage.h"
44 #include "AliCDBEntry.h"
46 #include "AliVEventHandler.h"
47 #include "AliAODInputHandler.h"
50 #include "AliEMCALRecParam.h"
51 #include "AliEMCALAfterBurnerUF.h"
52 #include "AliEMCALGeometry.h"
53 #include "AliEMCALClusterizerNxN.h"
54 #include "AliEMCALClusterizerv1.h"
55 #include "AliEMCALRecPoint.h"
56 #include "AliEMCALDigit.h"
57 #include "AliCaloCalibPedestal.h"
58 #include "AliEMCALCalibData.h"
59 #include "AliEMCALRecoUtils.h"
61 #include "AliAnalysisTaskEMCALClusterize.h"
63 ClassImp(AliAnalysisTaskEMCALClusterize)
65 //________________________________________________________________________
66 AliAnalysisTaskEMCALClusterize::AliAnalysisTaskEMCALClusterize(const char *name)
67 : AliAnalysisTaskSE(name)
68 , fGeom(0), fGeomName("EMCAL_FIRSTYEARV1"), fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
69 , fCalibData(0), fPedestalData(0), fOCDBpath("raw://")
70 , fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
71 , fRecParam(0), fClusterizer(0), fUnfolder(0), fJustUnfold(kFALSE)
72 , fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters"), fFillAODFile(kTRUE)
73 , fRun(-1), fRecoUtils(0), fConfigName(""), fCellLabels()
77 for(Int_t i = 0; i < 10; i++) fGeomMatrix[i] = 0;
78 for(Int_t j = 0; j < 12672; j++) fCellLabels[j] = -1;
79 fDigitsArr = new TClonesArray("AliEMCALDigit",200);
80 fClusterArr = new TObjArray(100);
81 fCaloClusterArr = new TObjArray(100);
82 fRecParam = new AliEMCALRecParam;
83 fBranchNames = "ESD:AliESDHeader.,EMCALCells.";
84 fRecoUtils = new AliEMCALRecoUtils();
87 //________________________________________________________________________
88 AliAnalysisTaskEMCALClusterize::AliAnalysisTaskEMCALClusterize()
89 : AliAnalysisTaskSE("DefaultAnalysis_AliAnalysisTaskEMCALClusterize")
90 , fGeom(0), fGeomName("EMCAL_FIRSTYEARV1"), fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
91 , fCalibData(0), fPedestalData(0), fOCDBpath("raw://")
92 , fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
93 , fRecParam(0), fClusterizer(0), fUnfolder(0), fJustUnfold(kFALSE)
94 , fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters"), fFillAODFile(kFALSE)
95 , fRun(-1), fRecoUtils(0), fConfigName(""), fCellLabels()
98 for(Int_t i = 0; i < 10; i++) fGeomMatrix[i] = 0;
99 for(Int_t j = 0; j < 24*48*11; j++) fCellLabels[j] = -1;
100 fDigitsArr = new TClonesArray("AliEMCALDigit",200);
101 fClusterArr = new TObjArray(100);
102 fCaloClusterArr = new TObjArray(100);
103 fRecParam = new AliEMCALRecParam;
104 fBranchNames = "ESD:AliESDHeader.,EMCALCells.";
105 fRecoUtils = new AliEMCALRecoUtils();
109 //________________________________________________________________________
110 AliAnalysisTaskEMCALClusterize::~AliAnalysisTaskEMCALClusterize()
115 fDigitsArr->Clear("C");
120 fClusterArr->Delete();
124 if (fCaloClusterArr){
125 fCaloClusterArr->Delete();
126 delete fCaloClusterArr;
129 if(fClusterizer) delete fClusterizer;
130 if(fUnfolder) delete fUnfolder;
131 if(fRecoUtils) delete fRecoUtils;
135 //-------------------------------------------------------------------
136 void AliAnalysisTaskEMCALClusterize::Init()
138 //Init analysis with configuration macro if available
140 if(gROOT->LoadMacro(fConfigName) >=0){
141 printf("Configure analysis with %s\n",fConfigName.Data());
142 AliAnalysisTaskEMCALClusterize *clus = (AliAnalysisTaskEMCALClusterize*)gInterpreter->ProcessLine("ConfigEMCALClusterize()");
143 fGeomName = clus->fGeomName;
144 fLoadGeomMatrices = clus->fLoadGeomMatrices;
145 fOCDBpath = clus->fOCDBpath;
146 fRecParam = clus->fRecParam;
147 fJustUnfold = clus->fJustUnfold;
148 fFillAODFile = clus->fFillAODFile;
149 fRecoUtils = clus->fRecoUtils;
150 fConfigName = clus->fConfigName;
151 fOutputAODBranchName = clus->fOutputAODBranchName;
152 for(Int_t i = 0; i < 10; i++) fGeomMatrix[i] = clus->fGeomMatrix[i] ;
158 //-------------------------------------------------------------------
159 void AliAnalysisTaskEMCALClusterize::UserCreateOutputObjects()
161 // Init geometry, create list of output clusters
163 fGeom = AliEMCALGeometry::GetInstance(fGeomName) ;
165 fOutputAODBranch = new TClonesArray("AliAODCaloCluster", 0);
166 fOutputAODBranch->SetName(fOutputAODBranchName);
167 AddAODBranch("TClonesArray", &fOutputAODBranch);
171 //________________________________________________________________________
172 void AliAnalysisTaskEMCALClusterize::UserExec(Option_t *)
175 // Called for each event
177 //printf("--- Event %d -- \n",(Int_t)Entry());
178 //Remove the contents of output list set in the previous event
179 fOutputAODBranch->Clear("C");
182 AliVEvent * event = 0;
183 AliESDEvent * esdevent = 0;
185 //Check if input event are embedded events
186 //If so, take output event
187 AliAODInputHandler* aodIH = dynamic_cast<AliAODInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
188 if (aodIH && aodIH->GetMergeEvents()) {
189 //printf("AliAnalysisTaskEMCALClusterize::UserExec() - Use embedded events\n");
191 // printf("InputEvent N Clusters %d, N Cells %d\n",InputEvent()->GetNumberOfCaloClusters(),
192 // InputEvent()->GetEMCALCells()->GetNumberOfCells());
193 // printf("OutputEvent N Clusters %d, N Cells %d\n", AODEvent()->GetNumberOfCaloClusters(),
194 // AODEvent()->GetEMCALCells()->GetNumberOfCells());
197 event = InputEvent();
198 esdevent = dynamic_cast<AliESDEvent*>(InputEvent());
202 Error("UserExec","Event not available");
206 //Magic line to write events to AOD file
207 AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(fFillAODFile);
212 //-------------------------------------------------------------------------------------
213 //Set the geometry matrix, for the first event, skip the rest
214 //-------------------------------------------------------------------------------------
216 if(fLoadGeomMatrices){
217 for(Int_t mod=0; mod < (fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
218 if(fGeomMatrix[mod]){
220 fGeomMatrix[mod]->Print();
221 fGeom->SetMisalMatrix(fGeomMatrix[mod],mod) ;
223 fGeomMatrixSet=kTRUE;
226 else if(!gGeoManager){
227 Info("UserExec","Get geo matrices from data");
228 //Still not implemented in AOD, just a workaround to be able to work at least with ESDs
229 if(!strcmp(event->GetName(),"AliAODEvent")) {
231 Warning("UserExec","Use ideal geometry, values geometry matrix not kept in AODs.");
235 Info("UserExec","AliAnalysisTaskEMCALClusterize Load Misaligned matrices.");
236 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event) ;
238 Error("UserExec","This event does not contain ESDs?");
241 for(Int_t mod=0; mod < (fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
243 esd->GetEMCALMatrix(mod)->Print();
244 if(esd->GetEMCALMatrix(mod)) fGeom->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
246 fGeomMatrixSet=kTRUE;
248 }//Load matrices from Data
250 //Recover time dependent corrections, put then in recalibration histograms. Do it once
251 fRecoUtils->SetTimeDependentCorrections(InputEvent()->GetRunNumber());
255 //Get the list of cells needed for unfolding and reclustering
256 AliVCaloCells *cells= event->GetEMCALCells();
257 Int_t nClustersOrg = 0;
258 //-------------------------------------------
259 //---------Unfolding clusters----------------
260 //-------------------------------------------
263 //Fill the array with the EMCAL clusters, copy them
264 for (Int_t i = 0; i < event->GetNumberOfCaloClusters(); i++)
266 AliVCluster *clus = event->GetCaloCluster(i);
268 //printf("Org Cluster %d, E %f\n",i, clus->E());
270 //recalibrate/remove bad channels/etc if requested
271 if(fRecoUtils->ClusterContainsBadChannel(fGeom,clus->GetCellsAbsId(), clus->GetNCells())){
272 //printf("Remove cluster\n");
276 if(fRecoUtils->IsRecalibrationOn()){
277 //printf("Energy before %f ",clus->E());
278 fRecoUtils->RecalibrateClusterEnergy(fGeom, clus, cells);
279 //printf("; after %f\n",clus->E());
281 //Cast to ESD or AOD, needed to create the cluster array
282 AliESDCaloCluster * esdCluster = dynamic_cast<AliESDCaloCluster*> (clus);
283 AliAODCaloCluster * aodCluster = dynamic_cast<AliAODCaloCluster*> (clus);
285 fCaloClusterArr->Add( new AliESDCaloCluster(*esdCluster) );
288 fCaloClusterArr->Add( new AliAODCaloCluster(*aodCluster) );
291 Warning("UserExec()"," - Wrong CaloCluster type?");
297 fUnfolder->UnfoldClusters(fCaloClusterArr, cells);
303 //printf("nClustersOrg %d\n",nClustersOrg);
305 //-------------------------------------------
306 //---------- Recluster cells ----------------
307 //-------------------------------------------
310 //-------------------------------------------------------------------------------------
311 //Transform CaloCells into Digits
312 //-------------------------------------------------------------------------------------
314 //In case of MC, first loop on the clusters and fill MC label to array
315 //.....................................................................
317 // for(Int_t j = 0; j < 24*48*11; j++) {
318 // if(fCellLabels[j]!=-1) printf("Not well initialized cell %d, label %d\n",j,fCellLabels[j]) ;
321 for (Int_t i = 0; i < event->GetNumberOfCaloClusters(); i++)
323 AliVCluster *clus = event->GetCaloCluster(i);
326 Int_t label = clus->GetLabel();
327 UShort_t * index = clus->GetCellsAbsId() ;
328 for(Int_t icell=0; icell < clus->GetNCells(); icell++ ){
329 fCellLabels[index[icell]]=label;
330 //printf("1) absID %d, label %d\n",index[icell], fCellLabels[index[icell]]);
343 Double_t cellAmplitude = 0;
344 Double_t cellTime = 0;
345 Short_t cellNumber = 0;
347 TTree *digitsTree = new TTree("digitstree","digitstree");
348 digitsTree->Branch("EMCAL","TClonesArray", &fDigitsArr, 32000);
351 for (Int_t icell = 0; icell < cells->GetNumberOfCells(); icell++)
353 if (cells->GetCell(icell, cellNumber, cellAmplitude, cellTime) != kTRUE)
360 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
361 fGeom->GetCellIndex(id,imod,iTower,iIphi,iIeta);
362 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
364 //Do not include bad channels found in analysis?
365 if( fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
366 fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi)){
367 fCellLabels[id]=-1; //reset the entry in the array for next event
368 //printf("Remove channel %d\n",id);
373 if(fRecoUtils->IsRecalibrationOn()){
374 //printf("CalibFactor %f times %f for id %d\n",fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi),amp,id);
375 amp *=fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi);
378 //Create the digit, put a fake primary deposited energy to trick the clusterizer when checking the most likely primary
379 new((*fDigitsArr)[idigit]) AliEMCALDigit( fCellLabels[id], fCellLabels[id],id, amp, time,AliEMCALDigit::kHG,idigit, 0, 0, 1);
380 //if(fCellLabels[id]>=0)printf("2) Digit cell %d, label %d\n",id,fCellLabels[id]) ;
381 //else printf("2) Digit cell %d, no label, amp %f \n",id,amp) ;
382 fCellLabels[id]=-1; //reset the entry in the array for next event
384 //AliEMCALDigit *digit = (AliEMCALDigit*) fDigitsArr->New(idigit);
386 //digit->SetAmplitude(amp);
387 //digit->SetTime(time);
388 //digit->SetTimeR(time);
389 //digit->SetIndexInList(idigit);
390 //digit->SetType(AliEMCALDigit::kHG);
392 //printf("Digit: Id %d, amp %f, time %e, index %d\n",id, amp,time,idigit);
396 //Fill the tree with digits
399 //-------------------------------------------------------------------------------------
400 //Do the clusterization
401 //-------------------------------------------------------------------------------------
402 TTree *clustersTree = new TTree("clustertree","clustertree");
404 fClusterizer->SetInput(digitsTree);
405 fClusterizer->SetOutput(clustersTree);
406 fClusterizer->Digits2Clusters("");
408 //-------------------------------------------------------------------------------------
409 //Transform the recpoints into AliVClusters
410 //-------------------------------------------------------------------------------------
412 clustersTree->SetBranchStatus("*",0); //disable all branches
413 clustersTree->SetBranchStatus("EMCALECARP",1); //Enable only the branch we need
415 TBranch *branch = clustersTree->GetBranch("EMCALECARP");
416 branch->SetAddress(&fClusterArr);
419 RecPoints2Clusters(fDigitsArr, fClusterArr, fCaloClusterArr);
422 fClusterizer->Clear();
423 fDigitsArr ->Clear("C");
424 fClusterArr ->Delete(); // Do not Clear(), it leaks, why?
426 clustersTree->Delete("all");
427 digitsTree ->Delete("all");
430 //Recalculate track-matching for the new clusters, only with ESDs
431 if(esdevent)fRecoUtils->FindMatches(esdevent,fCaloClusterArr);
434 //-------------------------------------------------------------------------------------
435 //Put the new clusters in the AOD list
436 //-------------------------------------------------------------------------------------
438 Int_t kNumberOfCaloClusters = fCaloClusterArr->GetEntries();
439 //printf("New clusters %d, Org clusters %d\n",kNumberOfCaloClusters, nClustersOrg);
440 for(Int_t i = 0; i < kNumberOfCaloClusters; i++){
441 AliAODCaloCluster *newCluster = (AliAODCaloCluster *) fCaloClusterArr->At(i);
442 //if(Entry()==0) Info("UserExec","newCluster E %f\n", newCluster->E());
444 //Add matched track, if any, only with ESDs
446 Int_t trackIndex = fRecoUtils->GetMatchedTrackIndex(i);
448 newCluster->AddTrackMatched(event->GetTrack(trackIndex));
450 Info("UserExec","Matched Track index %d to new cluster %d \n",trackIndex,i);
454 //In case of new bad channels, recalculate distance to bad channels
455 if(fRecoUtils->IsBadChannelsRemovalSwitchedOn()){
456 //printf("DistToBad before %f ",newCluster->GetDistanceToBadChannel());
457 fRecoUtils->RecalculateClusterDistanceToBadChannel(fGeom, event->GetEMCALCells(), newCluster);
458 //printf("; after %f \n",newCluster->GetDistanceToBadChannel());
461 // if(newCluster->GetNLabels()>0){
462 // printf("3) MC: N labels %d, label %d ; ", newCluster->GetNLabels(), newCluster->GetLabel() );
463 // UShort_t * newindex = newCluster->GetCellsAbsId() ;
464 // for(Int_t icell=0; icell < newCluster->GetNCells(); icell++ ){
465 // printf("\t absID %d\n",newindex[icell]);
469 // printf("Cluster %d, energy %f\n",newCluster->GetID(),newCluster->E());
471 newCluster->SetID(i);
472 new((*fOutputAODBranch)[i]) AliAODCaloCluster(*newCluster);
476 fCaloClusterArr->Delete(); // Do not Clear(), it leaks, why?
479 //_____________________________________________________________________
480 Bool_t AliAnalysisTaskEMCALClusterize::AccessOCDB()
482 //Access to OCDB stuff
484 AliVEvent * event = InputEvent();
487 Warning("AccessOCDB","Event not available!!!");
491 if (event->GetRunNumber()==fRun)
493 fRun = event->GetRunNumber();
495 if(DebugLevel() > 1 )
496 Info("AccessODCD()"," Begin");
498 fGeom = AliEMCALGeometry::GetInstance(fGeomName);
501 AliCDBManager *cdb = AliCDBManager::Instance();
504 if (fOCDBpath.Length()){
505 cdb->SetDefaultStorage(fOCDBpath.Data());
506 Info("AccessOCDB","Default storage %s",fOCDBpath.Data());
509 cdb->SetRun(event->GetRunNumber());
512 // EMCAL from RAW OCDB
513 if (fOCDBpath.Contains("alien:"))
515 cdb->SetSpecificStorage("EMCAL/Calib/Data","alien://Folder=/alice/data/2010/OCDB");
516 cdb->SetSpecificStorage("EMCAL/Calib/Pedestals","alien://Folder=/alice/data/2010/OCDB");
519 TString path = cdb->GetDefaultStorage()->GetBaseFolder();
523 //Get calibration parameters
526 AliCDBEntry *entry = (AliCDBEntry*)
527 AliCDBManager::Instance()->Get("EMCAL/Calib/Data");
529 if (entry) fCalibData = (AliEMCALCalibData*) entry->GetObject();
533 AliFatal("Calibration parameters not found in CDB!");
535 //Get calibration parameters
538 AliCDBEntry *entry = (AliCDBEntry*)
539 AliCDBManager::Instance()->Get("EMCAL/Calib/Pedestals");
541 if (entry) fPedestalData = (AliCaloCalibPedestal*) entry->GetObject();
545 AliFatal("Dead map not found in CDB!");
547 InitClusterization();
552 //________________________________________________________________________________________
553 void AliAnalysisTaskEMCALClusterize::InitClusterization()
555 //Select clusterization/unfolding algorithm and set all the needed parameters
558 // init the unfolding afterburner
560 fUnfolder = new AliEMCALAfterBurnerUF(fRecParam->GetW0(),fRecParam->GetLocMaxCut());
564 //First init the clusterizer
566 if (fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerv1)
567 fClusterizer = new AliEMCALClusterizerv1 (fGeom, fCalibData, fPedestalData);
568 else if(fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerNxN)
569 fClusterizer = new AliEMCALClusterizerNxN(fGeom, fCalibData, fPedestalData);
570 else if(fRecParam->GetClusterizerFlag() > AliEMCALRecParam::kClusterizerNxN) {
571 AliEMCALClusterizerNxN *clusterizer = new AliEMCALClusterizerNxN(fGeom, fCalibData, fPedestalData);
572 clusterizer->SetNRowDiff(2);
573 clusterizer->SetNColDiff(2);
574 fClusterizer = clusterizer;
576 AliFatal(Form("Clusterizer < %d > not available", fRecParam->GetClusterizerFlag()));
579 //Now set the parameters
580 fClusterizer->SetECAClusteringThreshold( fRecParam->GetClusteringThreshold() );
581 fClusterizer->SetECALogWeight ( fRecParam->GetW0() );
582 fClusterizer->SetMinECut ( fRecParam->GetMinECut() );
583 fClusterizer->SetUnfolding ( fRecParam->GetUnfold() );
584 fClusterizer->SetECALocalMaxCut ( fRecParam->GetLocMaxCut() );
585 fClusterizer->SetTimeCut ( fRecParam->GetTimeCut() );
586 fClusterizer->SetTimeMin ( fRecParam->GetTimeMin() );
587 fClusterizer->SetTimeMax ( fRecParam->GetTimeMax() );
588 fClusterizer->SetInputCalibrated ( kTRUE );
589 fClusterizer->SetJustClusters ( kTRUE );
590 //In case of unfolding after clusterization is requested, set the corresponding parameters
591 if(fRecParam->GetUnfold()){
593 for (i = 0; i < 8; i++) {
594 fClusterizer->SetSSPars(i, fRecParam->GetSSPars(i));
595 }//end of loop over parameters
596 for (i = 0; i < 3; i++) {
597 fClusterizer->SetPar5 (i, fRecParam->GetPar5(i));
598 fClusterizer->SetPar6 (i, fRecParam->GetPar6(i));
599 }//end of loop over parameters
601 fClusterizer->InitClusterUnfolding();
605 //________________________________________________________________________________________
606 void AliAnalysisTaskEMCALClusterize::RecPoints2Clusters(TClonesArray *digitsArr, TObjArray *recPoints, TObjArray *clusArray)
608 // Restore clusters from recPoints
609 // Cluster energy, global position, cells and their amplitude fractions are restored
611 for(Int_t i = 0; i < recPoints->GetEntriesFast(); i++)
613 AliEMCALRecPoint *recPoint = (AliEMCALRecPoint*) recPoints->At(i);
615 const Int_t ncells = recPoint->GetMultiplicity();
616 Int_t ncells_true = 0;
618 // cells and their amplitude fractions
619 UShort_t absIds[ncells];
620 Double32_t ratios[ncells];
622 for (Int_t c = 0; c < ncells; c++) {
623 AliEMCALDigit *digit = (AliEMCALDigit*) digitsArr->At(recPoint->GetDigitsList()[c]);
625 absIds[ncells_true] = digit->GetId();
626 ratios[ncells_true] = recPoint->GetEnergiesList()[c]/digit->GetAmplitude();
628 if (ratios[ncells_true] > 0.001) ncells_true++;
631 if (ncells_true < 1) {
632 Warning("AliAnalysisTaskEMCALClusterize::RecPoints2Clusters", "skipping cluster with no cells");
639 // calculate new cluster position
640 recPoint->EvalGlobalPosition(fRecParam->GetW0(), digitsArr);
641 recPoint->GetGlobalPosition(gpos);
644 // create a new cluster
645 AliAODCaloCluster *clus = new AliAODCaloCluster();
646 clus->SetType(AliVCluster::kEMCALClusterv1);
647 clus->SetE(recPoint->GetEnergy());
648 clus->SetPosition(g);
649 clus->SetNCells(ncells_true);
650 clus->SetCellsAbsId(absIds);
651 clus->SetCellsAmplitudeFraction(ratios);
652 clus->SetDispersion(recPoint->GetDispersion());
653 clus->SetChi2(-1); //not yet implemented
654 clus->SetTOF(recPoint->GetTime()) ; //time-of-flight
655 clus->SetNExMax(recPoint->GetNExMax()); //number of local maxima
657 recPoint->GetElipsAxis(elipAxis);
658 clus->SetM02(elipAxis[0]*elipAxis[0]) ;
659 clus->SetM20(elipAxis[1]*elipAxis[1]) ;
660 clus->SetDistanceToBadChannel(recPoint->GetDistanceToBadTower());
663 Int_t parentMult = 0;
664 Int_t *parentList = recPoint->GetParents(parentMult);
665 clus->SetLabel(parentList, parentMult);
667 clusArray->Add(clus);