-
-
+// $Id$
//**************************************************************************
//* This file is property of and copyright by the ALICE HLT Project *
//* ALICE Experiment at CERN, All rights reserved. *
AliHLTITSClusterFinderSPDComponent::AliHLTITSClusterFinderSPDComponent()
:
- fNModules(240),
+ fNModules(240/*AliITSDetTypeRec::fgkDefaultNModulesSPD*/),
fClusterFinder(NULL),
fRawReader(NULL),
fDettype(NULL),
fClusters(NULL),
- fcal(NULL),
fgeom(NULL),
- fgeomInit(NULL){
- //fRawReaderOff(NULL),
- //fRawStream(NULL),
- //fNModules(AliITSgeomTGeo::GetNModules()),
- //fNModules(AliITSDetTupeRec::fgkDefaultNModulesSPD),
-
-
-
+ fgeomInit(NULL),
+ fSeg(NULL)
+{
// see header file for class documentation
// or
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+ // AliITSDetTypeRec::fgkDefaultNModulesSPD private for the moment
+// if (AliITSDetTypeRec::fgkDefaultNModulesSPD!=240) {
+// HLTWarning("Number of modules has changed (AliITSDetTypeRec::fgkDefaultNModulesSPD)");
+// }
}
AliHLTITSClusterFinderSPDComponent::~AliHLTITSClusterFinderSPDComponent() {
fClusters[iModule] = NULL;
}
- fcal = new AliITSCalibrationSPD();
//fgeomInit = new AliITSInitGeometry(kvSPD02,2);
fgeomInit = new AliITSInitGeometry(kvPPRasymmFMD,2);
fgeom = fgeomInit->CreateAliITSgeom();
//set dettype
fDettype = new AliITSDetTypeRec();
fDettype->SetITSgeom(fgeom);
- for (Int_t iModule = 0; iModule < fNModules; iModule++) {
- fDettype->SetCalibrationModel(iModule,fcal);
- }
+ fDettype->SetReconstructionModel(0,fClusterFinder);
+ fDettype->SetDefaultClusterFindersV2(kTRUE);
+ fDettype->GetCalibration();
+ fSeg = new AliITSsegmentationSSD();
+ fDettype->SetSegmentationModel(0,fSeg);
fClusterFinder = new AliITSClusterFinderV2SPD(fDettype);
+ fClusterFinder->InitGeometry();
if ( fRawReader )
return EINPROGRESS;
delete fClusterFinder;
fClusterFinder = NULL;
+ if ( fDettype )
+ delete fDettype;
+ fDettype = NULL;
+
+ for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ if (fClusters[iModule]) delete fClusters[iModule];
+ fClusters[iModule] = NULL;
+ }
+
+ if ( fgeomInit )
+ delete fgeomInit;
+ fgeomInit = NULL;
+
return 0;
}
DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSPD).c_str());
// -- Check for the correct data type
- if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSPD) ) //Add SPD to data origin????????
+ if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSPD) )
continue;
- // -- Set RawReader
- //fRawReader->SetMemory( (UChar_t*) iter->fPtr, iter->fSize );
-
// -- Get equipment ID out of specification
AliHLTUInt32_t spec = iter->fSpecification;
}
Int_t id = 0;
- for ( Int_t ii = 1; ii < 20 ; ii++ ) { //number of ddl's
+ for ( Int_t ii = 0; ii < 20 ; ii++ ) { //number of ddl's
if ( spec & 0x00000001 ) {
id += ii;
break;
}
// -- Set equipment ID to the raw reader
-
+
if(!fRawReader->AddBuffer((UChar_t*) iter->fPtr, iter->fSize, id)){
HLTWarning("Could not add buffer");
}
fClusterFinder->RawdataToClusters(fRawReader,fClusters);
/*
+ Float_t xyz[3];
+ filebuf fb;
+ fb.open ("test.txt",ios::out | ios::app);
+ ostream os(&fb);
for(int i=0;i<fNModules;i++){
if(fClusters[i] != NULL){
- for(int j=0;j<fClusters[i]->GetEntries();j++){
+ for(int j=0;j<fClusters[i]->GetEntries();j++){
AliITSRecPoint *recpoint = (AliITSRecPoint*) fClusters[i]->At(j);
- cout<<"Cluster: X: "<<recpoint->GetX()<<" Y: "<<recpoint->GetY()<<" Z: "<<recpoint->GetZ()<<endl;
+ recpoint->GetGlobalXYZ(xyz);
+ os<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<endl;
}
}
}
*/
PushBack(*fClusters,kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification);
-
- /*
+
+ /*
+ TClonesArray *clustersOut = new TClonesArray();
+
for(int i=0;i<fNModules;i++){
if(fClusters[i] != NULL){
- PushBack(fClusters[i],kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification);
+ for(int j=0;j<fClusters[i]->GetEntriesFast();j++) {
+ clustersOut->Add(&fClusters[i][j]);
+ //PushBack(fClusters[i],kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification);
}
+ }
+ }
+
+ PushBack(clustersOut,kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification);
+
+ Float_t xyz2[3];
+ filebuf fb2;
+ fb2.open ("test2.txt",ios::out | ios::app);
+ ostream os2(&fb2);
+ for(int j=0;j<clustersOut->GetEntriesFast();j++){
+ AliITSRecPoint *recpoint = (AliITSRecPoint*) clustersOut->At(j);
+ recpoint->GetGlobalXYZ(xyz2);
+ os2<<xyz2[0]<<" "<<xyz2[1]<<" "<<xyz2[2]<<endl;
}
- */
- /*
- for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ clustersOut->Clear();
+ delete clustersOut;
+ */
+ for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ if(fClusters[iModule]){delete fClusters[iModule];}
fClusters[iModule] = NULL;
}
- */
+
fRawReader->ClearBuffers();
} // for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) {
-
+//-*- Mode: C++ -*-
+// $Id$
#ifndef ALIHLTITSCLUSTERFINDERSPDCOMPONENT_H
#define ALIHLTITSCLUSTERFINDERSPDCOMPONENT_H
#include "AliITSCalibrationSPD.h"
#include "AliITSgeom.h"
#include "AliITSInitGeometry.h"
+#include "AliITSsegmentationSSD.h"
/**
* @class AliHLTITSClusterFinderSPDComponent
TClonesArray** fClusters; //!transient
- AliITSCalibrationSPD* fcal; //!transient
-
AliITSgeom* fgeom; //!transient
AliITSInitGeometry* fgeomInit; //!transient
+
+ AliITSsegmentationSSD* fSeg; //!transient
- ClassDef(AliHLTITSClusterFinderSPDComponent, 0)
+ ClassDef(AliHLTITSClusterFinderSPDComponent, 1)
};
#endif
-
-
+// $Id$
//**************************************************************************
//* This file is property of and copyright by the ALICE HLT Project *
//* ALICE Experiment at CERN, All rights reserved. *
AliHLTITSClusterFinderSSDComponent::AliHLTITSClusterFinderSSDComponent()
:
- fNModules(1698),
+ fNModules(1698/*AliITSDetTypeRec::fgkDefaultNModulesSSD*/),
fClusterFinder(NULL),
fRawReader(NULL),
fDettype(NULL),
fClusters(NULL),
- fcal(NULL),
fgeom(NULL),
- fgeomInit(NULL){
- //fRawReaderOff(NULL),
- //fRawStream(NULL),
- //fNModules(AliITSgeomTGeo::GetNModules()),
- //fNModules(AliITSDetTupeRec::fgkDefaultNModulesSSD),
-
-
-
+ fgeomInit(NULL),
+ fSeg(NULL)
+{
+
// see header file for class documentation
// or
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+ // AliITSDetTypeRec::fgkDefaultNModulesSPD private for the moment
+// if (AliITSDetTypeRec::fgkDefaultNModulesSSD!=1698) {
+// HLTWarning("Number of modules has changed (AliITSDetTypeRec::fgkDefaultNModulesSSD)");
+// }
}
AliHLTITSClusterFinderSSDComponent::~AliHLTITSClusterFinderSSDComponent() {
fClusters[iModule] = NULL;
}
- fcal = new AliITSCalibrationSSD();
//fgeomInit = new AliITSInitGeometry(kvSSD02,2);
fgeomInit = new AliITSInitGeometry(kvPPRasymmFMD,2);
fgeom = fgeomInit->CreateAliITSgeom();
//set dettype
fDettype = new AliITSDetTypeRec();
fDettype->SetITSgeom(fgeom);
- for (Int_t iModule = 0; iModule < fNModules; iModule++) {
- fDettype->SetCalibrationModel(iModule,fcal);
- }
-
+ fDettype->SetReconstructionModel(2,fClusterFinder);
+ fDettype->SetDefaultClusterFindersV2(kTRUE);
+ fSeg = new AliITSsegmentationSSD();
+ fSeg->Init();
+ fDettype->SetSegmentationModel(2,fSeg);
+ fDettype->GetCalibration();
+
fClusterFinder = new AliITSClusterFinderV2SSD(fDettype);
-
+ fClusterFinder->InitGeometry();
+
if ( fRawReader )
return EINPROGRESS;
Int_t AliHLTITSClusterFinderSSDComponent::DoDeinit() {
// see header file for class documentation
-
+
if ( fRawReader )
delete fRawReader;
fRawReader = NULL;
-
+
+ if ( fDettype )
+ delete fDettype;
+ fDettype = NULL;
+
if ( fClusterFinder )
delete fClusterFinder;
fClusterFinder = NULL;
+
+ for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ delete fClusters[iModule];
+ fClusters[iModule] = NULL;
+ }
+
+ if ( fgeomInit )
+ delete fgeomInit;
+ fgeomInit = NULL;
return 0;
}
DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSSD).c_str());
// -- Check for the correct data type
- if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSSD) ) //Add SSD to data origin????????
+ if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSSD) )
continue;
- // -- Set RawReader
- //fRawReader->SetMemory( (UChar_t*) iter->fPtr, iter->fSize );
-
// -- Get equipment ID out of specification
AliHLTUInt32_t spec = iter->fSpecification;
HLTDebug("The Spec is to high for ITS SSD");
}
- Int_t id = 0; //what should be here, 512???
- for ( Int_t ii = 1; ii < 16 ; ii++ ) { //number of ddl's
+ Int_t id = 512;
+ for ( Int_t ii = 0; ii < 16 ; ii++ ) {
if ( spec & 0x00000001 ) {
id += ii;
break;
}
spec = spec >> 1 ;
}
-
+
// -- Set equipment ID to the raw reader
if(!fRawReader->AddBuffer((UChar_t*) iter->fPtr, iter->fSize, id)){
fClusterFinder->RawdataToClusters(fRawReader,fClusters);
- /*
+ Float_t xyz[3];
+ filebuf fb;
+ fb.open ("test.txt",ios::out | ios::app);
+ ostream os(&fb);
for(int i=0;i<fNModules;i++){
if(fClusters[i] != NULL){
- for(int j=0;j<fClusters[i]->GetEntries();j++){
+ for(int j=0;j<fClusters[i]->GetEntries();j++){
AliITSRecPoint *recpoint = (AliITSRecPoint*) fClusters[i]->At(j);
- cout<<"Cluster: X: "<<recpoint->GetX()<<" Y: "<<recpoint->GetY()<<" Z: "<<recpoint->GetZ()<<endl;
+ recpoint->GetGlobalXYZ(xyz);
+ os<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<endl;
}
}
}
- */
-
+
PushBack(*fClusters,kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSSD,iter->fSpecification);
/*
}
}
*/
-
- /*
- for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+
+ for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ if(fClusters[iModule]){delete fClusters[iModule];}
fClusters[iModule] = NULL;
}
- */
+
fRawReader->ClearBuffers();
} // for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) {
-
+//-*- Mode: C++ -*-
+// $Id$
#ifndef ALIHLTITSCLUSTERFINDERSSDCOMPONENT_H
#define ALIHLTITSCLUSTERFINDERSSDCOMPONENT_H
#include "AliITSCalibrationSSD.h"
#include "AliITSgeom.h"
#include "AliITSInitGeometry.h"
+#include "AliITSsegmentationSSD.h"
/**
* @class AliHLTITSClusterFinderSSDComponent
TClonesArray** fClusters; //!transient
- AliITSCalibrationSSD* fcal; //!transient
-
AliITSgeom* fgeom; //!transient
AliITSInitGeometry* fgeomInit; //!transient
+
+ AliITSsegmentationSSD* fSeg; //!transient
- ClassDef(AliHLTITSClusterFinderSSDComponent, 0)
+ ClassDef(AliHLTITSClusterFinderSSDComponent, 1)
};
#endif
-
+// $Id$
//aliroot -b -q rec-spd-cluster.C | tee rec-spd-cluster.log
void rec_spd_cluster(const char* input="./", char* opt="")
//
// define the analysis chain to be run
//
-
- int minddl=0x00000000;
- int maxddl=0x00040000;
-
- int ddl=0;
+
+ int minddl=0;
+ int maxddl=19;
+ int spec=0x1;
int ddlno=0;
TString dummyInput="";
- for(int ddl=minddl;ddl<=maxddl;){
+ for(ddlno=minddl;ddlno<=maxddl;ddlno++){
TString arg, publisher, cf;
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'ITS ' -dataspec 0x%02x%02x%02x%02x -verbose", ddl, 00, 00, 00, 00);
- //arg.Form("-detector ITSSPD -skipempty -datatype 'DDL_RAW ' 'ITS ' -verbose");
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, ddl);
- //arg.Form("-detector ITSSPD -datatype 'DDL_RAW ' 'ISPD ' -skipempty -dataspec 0x%08x -verbose",ddl);
- arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, ddl);
- publisher.Form("DP_%d", ddl);
+
+ arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, spec);
+ publisher.Form("DP_%d", ddlno);
AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
- cf.Form("CF_%d",ddl);
+ cf.Form("CF_%d",ddlno);
AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSPD", publisher.Data(), "");
if (dummyInput.Length()>0) dummyInput+=" ";
dummyInput+=cf;
- ddlno++;
- if(ddl==0x0000000){ddl++;}else{ddl = ddl << 1;}
+ spec=spec<<1;
}
//add dummy
-
+// $Id$
//aliroot -b -q rec-spd-cluster.C | tee rec-spd-cluster.log
void rec_ssd_cluster(const char* input="./", char* opt="")
// define the analysis chain to be run
//
- int minddl=0x00000000;
- int maxddl=0x00004000;
-
- int ddl=0;
+ int minddl=512;
+ int maxddl=527;
+ int spec=0x1;
int ddlno=0;
TString dummyInput="";
- for(int ddl=minddl;ddl<=maxddl;){
+ for(ddlno=minddl;ddlno<=maxddl;ddlno++){
TString arg, publisher, cf;
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'ITS ' -dataspec 0x%02x%02x%02x%02x -verbose", ddl, 00, 00, 00, 00);
- //arg.Form("-detector ITSSPD -skipempty -datatype 'DDL_RAW ' 'ITS ' -verbose");
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
- //arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, ddl);
- //arg.Form("-detector ITSSPD -datatype 'DDL_RAW ' 'ISPD ' -skipempty -dataspec 0x%08x -verbose",ddl);
- arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISSD ' -dataspec 0x%08x -verbose",ddlno, ddl);
- publisher.Form("DP_%d", ddl);
+
+ arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISSD ' -dataspec 0x%08x -verbose",ddlno, spec);
+ publisher.Form("DP_%d", ddlno);
AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
- cf.Form("CF_%d",ddl);
+ cf.Form("CF_%d",ddlno);
AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSSD", publisher.Data(), "");
if (dummyInput.Length()>0) dummyInput+=" ";
dummyInput+=cf;
- ddlno++;
- if(ddl==0x0000000){ddl++;}else{ddl = ddl << 1;}
+ spec=spec<<1;
}
//add dummy