//fAnalyzerPtr(0),
fEMCALConstants(NULL),
hList(0),
- fChannelEMap(0), fChannelTMap(0), fChannelETMap(0), h2DTRU(0), h2DSTU(0),
+ fChannelEMap(0), fChannelTMap(0), fChannelETMap(0), fCellVsEne(0),
fClusterReaderPtr(0)
{
hList = new TObjArray;
+ // channel histograms
fChannelEMap = new TProfile2D *[fCaloConstants->GetNMODULES()];
fChannelTMap = new TProfile2D *[fCaloConstants->GetNMODULES()];
fChannelETMap = new TH2F *[fCaloConstants->GetNMODULES()];
- h2DTRU = new TH2I ("h2DTRU","",24,0,24,4,0,4);
- hList->Add(h2DTRU);
+ // cluster histograms
+ fCellVsEne = new TH2F *[fCaloConstants->GetNMODULES()];
+
+ // fCellVsClus = new TH1F ("fCellVsClus","",100,0,50);
+ //hList->Add(fCellVsClus);
- h2DSTU = new TH2I ("h2DSTU","",24,0,24,4,0,4);
- hList->Add(h2DSTU);
-
for (int i=0; i<fCaloConstants->GetNMODULES(); i++) {
sprintf(title, "E(X vs Z): SM %d ", i);
sprintf(id, "fChannelEMap%d", i);
fChannelETMap[i] = new TH2F(id,title,100 ,0, 50, 100, 0, 500);
hList->Add(fChannelETMap[i]);
+
+ sprintf(title, "(Cell vs Energy): SM %d ", i);
+ sprintf(id, "fCellVsEne%d", i);
+ fCellVsEne[i] = new TH2F(id,title,50 ,0, 50, 10, 0, 10);
+
+ hList->Add(fCellVsEne[i]);
+
}
} else {
// stuff to handle clusters here
- fClusterReaderPtr->SetMemory(caloClusterHeaderPtr);
- cout << "FROM HISTOMAKER WE HAVE THE CLUSTER POINTER: " << caloClusterHeaderPtr << endl;
+ fClusterReaderPtr->SetMemory(caloClusterHeaderPtr);
+ cout << "FROM HISTOMAKER: CLUSTER POINTER IS NON ZERO: " << caloClusterHeaderPtr << endl;
+ int numcl = 0 ;
+
while((caloClusterStructPtr = fClusterReaderPtr->NextCluster()) != 0)
+
{
cout << "cluster type: " << caloClusterStructPtr->fClusterType << endl;
cout << " COORDINATES FROM HISTOMAKER: " <<
" fX:" << caloClusterStructPtr->fGlobalPos[0] <<
" fY:" << caloClusterStructPtr->fGlobalPos[1] <<
- " fZ:" << caloClusterStructPtr->fGlobalPos[2] << endl;
+ " fZ:" << caloClusterStructPtr->fGlobalPos[2] <<
+ " fModule: " << caloClusterStructPtr->fModule <<
+ " fCell: " << caloClusterStructPtr->fNCells <<
+ " fEnergy " << caloClusterStructPtr->fEnergy << endl;
+ fCellVsEne[caloClusterStructPtr->fModule-1]->Fill(caloClusterStructPtr->fNCells, caloClusterStructPtr->fEnergy);
+
+ numcl++;
UShort_t *idArrayPtr = new UShort_t[caloClusterStructPtr->fNCells];
Double32_t *ampFracArrayPtr = new Double32_t[caloClusterStructPtr->fNCells];
nClusters++;
}
+
+ cout << " from histo maker -----------> while ran " << numcl << " times." << endl;
}
// begin scan channel data and fill histograms
- fShmPtr->SetMemory(channelDataHeader);
- currentchannel = fShmPtr->NextChannel();
+ if (channelDataHeader) {
+
+ fShmPtr->SetMemory(channelDataHeader);
- while(currentchannel != 0) {
-
- fMapperPtr->ChannelId2Coordinate(currentchannel->fChannelID, coord);
+ currentchannel = fShmPtr->NextChannel();
- cout << " from histo maker ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " << currentchannel->fEnergy << endl;
- cout << " fX: " << coord.fX << " fZ: " << coord.fZ << endl;
-
- fChannelTMap[coord.fModuleId]->Fill( coord.fZ, coord.fX , currentchannel->fTime);
- fChannelEMap[coord.fModuleId]->Fill( coord.fZ, coord.fX , currentchannel->fEnergy);
- fChannelETMap[coord.fModuleId]->Fill(currentchannel->fEnergy, currentchannel->fTime);
-
- currentchannel = fShmPtr->NextChannel(); // Get the next channel
+ while(currentchannel != 0) {
+ fMapperPtr->ChannelId2Coordinate(currentchannel->fChannelID, coord);
+
+ cout << " from histo maker ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " << currentchannel->fEnergy << endl;
+ cout << " fX: " << coord.fX << " fZ: " << coord.fZ << endl;
+ cout << " channel ID: " << currentchannel->fChannelID << endl;
+
+ fChannelTMap[coord.fModuleId]->Fill( coord.fZ, coord.fX , currentchannel->fTime);
+ fChannelEMap[coord.fModuleId]->Fill( coord.fZ, coord.fX , currentchannel->fEnergy);
+ fChannelETMap[coord.fModuleId]->Fill(currentchannel->fEnergy, currentchannel->fTime);
+
+ currentchannel = fShmPtr->NextChannel(); // Get the next channel
+
+ }
}
-
return (0);
}
UInt_t specification = 0;
- AliHLTCaloChannelDataHeaderStruct* tmpChannelData = 0;
-
- AliHLTCaloClusterHeaderStruct *caloClusterHeaderPtr = 0;
-
for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
+
+ AliHLTCaloClusterHeaderStruct *caloClusterHeaderPtr = 0;
+ AliHLTCaloChannelDataHeaderStruct* tmpChannelData = 0;
+
iter = blocks+ndx;
- if (fBeVerbose) {
- PrintComponentDataTypeInfo(iter->fDataType);
- cout << "\nI-RAWHISTOMAKERCOMPONENT: verbose mode enabled: " << fBeVerbose << endl;
- }
-
+ if (fBeVerbose)
+ PrintComponentDataTypeInfo(iter->fDataType);
+
- if(iter->fDataType == kAliHLTDataTypeCaloCluster)
- {
-
- cout << "\nI-RAWHISTOMAKERCOMPONENT: cluster data handling HERE !" << endl;
-
- //specification |= iter->fSpecification;
- caloClusterHeaderPtr = reinterpret_cast<AliHLTCaloClusterHeaderStruct*>(iter->fPtr);
- cout << " --------------------> cluster pointer here !!!!!!!! ->>>>>>>>>>>>>>>>>>>>>: " << caloClusterHeaderPtr << endl;
- }
-
- else
-
- {
-
- if (fBeVerbose)
- HLTWarning("\nI-RAWHISTOMAKERCOMPONENT: Data block does not contain clusters\n");
- else
- HLTDebug("\nI-RAWHISTOMAKERCOMPONENT: Data block does not contain clusters\n");
-
- // continue;
-
- }
-
-
if (iter->fDataType == AliHLTEMCALDefinitions::fgkChannelDataType)
{
-
tmpChannelData = reinterpret_cast<AliHLTCaloChannelDataHeaderStruct*>(iter->fPtr);
- cout << " --------------------> channel pointer here !!!!!!!! ->>>>>>>>>>>>>>>>>>>>>: " << tmpChannelData << endl;
-
+
if (fBeVerbose)
- HLTWarning ("\nI-RAWHISTOMAKERCOMPONENT: reading channel number %d\n",tmpChannelData->fNChannels);
-
-
+ printf ("\nI-RAWHISTOMAKERCOMPONENT: Number of active channels in block: %d\n",tmpChannelData->fNChannels);
+
}
-
+
+ else if (iter->fDataType == kAliHLTDataTypeCaloCluster)
+ caloClusterHeaderPtr = reinterpret_cast<AliHLTCaloClusterHeaderStruct*>(iter->fPtr);
+
else
{
if (fBeVerbose)
- HLTWarning("\nI-RAWHISTOMAKERCOMPONENT: Data block does not contain signal amplitude\n");
+ HLTWarning("\nI-RAWHISTOMAKERCOMPONENT: Data block does not of channel or cluster type \n");
else
- HLTDebug("\nI-RAWHISTOMAKERCOMPONENT: Data block does not contain signal amplitude\n");
-
+ HLTDebug("\nI-RAWHISTOMAKERCOMPONENT: Data block does not of channel or cluster type \n");
continue;
- }
+ }
specification |= iter->fSpecification;
}
+
fLocalEventCount++;
TFile rootHistFile(fRootFileName,"recreate");
if (fLocalEventCount%fPushFraction == 0) {
if (fBeVerbose)
- cout << "I-RAWHISTOMAKERCOMPONENT: pushback done at " << fLocalEventCount << " events " << endl;
+ cout << "\nI-RAWHISTOMAKERCOMPONENT: pushback done at " << fLocalEventCount << " events " << endl;
PushBack(fRawHistoMakerPtr->GetHistograms(), kAliHLTDataTypeTObjArray | kAliHLTDataOriginEMCAL , specification);
}