/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveEventManager.h"
//
// Missing support for raw-data. For now this is handled individually
// by each sub-detector.
-//
+//
ClassImp(AliEveEventManager)
else
Warning(eH, "Bootstraping of run-loader failed.");
}
-
+
TString esd_path(Form("%s/AliESDs.root", fPath.Data()));
if (gSystem->AccessPathName(esd_path, kReadPermission) == kFALSE)
if (fgAssertESDTree)
{
throw(eH + "ESD not initialized. Its precence was requested.");
- } else {
+ } else {
Warning(eH, "ESD not initialized.");
}
}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_EventAlieve_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
/** @file AliEveHOMERManager.cxx
@author Jochen Thaeder
- @date
+ @date
@brief Manger for HOMER in offline
*/
/*
* ---------------------------------------------------------------------------------
- * Constructor / Destructor
- * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
*/
//##################################################################################
fLibManager(new AliHLTHOMERLibManager),
fXMLFile(xmlFile),
- fXMLParser(NULL),
+ fXMLParser(NULL),
fRootNode(NULL),
fSourceList(NULL),
fReader(NULL),
fReader = NULL;
}
- if ( fXMLParser )
+ if ( fXMLParser )
delete fXMLParser;
fXMLParser = NULL;
/*
* ---------------------------------------------------------------------------------
* Source Handling
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
//##################################################################################
fXMLParser = new TDOMParser();
fXMLParser->SetValidate( kFALSE );
-
+
Int_t iResult = fXMLParser->ParseFile( fXMLFile );
if ( iResult < 0 ) {
iResult = 1;
if ( fSourceList != NULL )
delete fSourceList;
fSourceList = NULL;
-
+
fSourceList = new TList();
fSourceList->SetOwner( kTRUE );
// -- Set ROOT node
fRootNode = fXMLParser->GetXMLDocument()->GetRootNode();
-
+
TXMLNode * node = NULL;
TXMLNode * prevNode = fRootNode->GetChildren();
// -- Find only "Process" nodes, otherwise continue to next node
if ( strcmp( node->GetNodeName(), "Proc" ) != 0 )
continue;
-
+
// -- Get Attributes of current node
TList *attrList = node->GetAttributes();
TXMLAttr *attr = 0;
TIter next(attrList);
-
+
while ( ( attr = (TXMLAttr*)next() ) ) {
-
+
// -- Find "ID" attribute, otherwise continue to next attribute
- if ( strcmp( attr->GetName(), "ID" ) != 0 )
+ if ( strcmp( attr->GetName(), "ID" ) != 0 )
continue;
-
+
TString nodeId( attr->GetValue() );
- // -- Find only TDS processes
+ // -- Find only TDS processes
TObjArray * nodeIdTok = nodeId.Tokenize("_");
for ( Int_t ii=0 ; ii < nodeIdTok->GetEntries() ; ii++ ) {
//##################################################################################
Int_t AliEveHOMERManager::GetTDSAttributes( TXMLNode * xmlNode ) {
// see header file for class documentation
-
+
Int_t iResult = 0;
TXMLNode * attrNode = NULL;
TString xmlHostname = 0;
TString xmlPort = 0;
- TString hostname = 0;
+ TString hostname = 0;
Int_t port = 0;
// -- Get hostname and port from TDS node out of XML
while ( ( attrNode = prevNode->GetNextNode() ) ) {
prevNode = attrNode;
-
+
// -- Get port out of the commandline
if ( strcmp( attrNode->GetNodeName(), "Cmd" ) == 0 ) {
TString cmd( attrNode->GetText() );
-
+
TObjArray * cmdTok = cmd.Tokenize(" ");
xmlPort = ((TObjString*) cmdTok->At(2))->GetString();
- }
+ }
// -- Get hostname
- else if ( strcmp( attrNode->GetNodeName(), "Node" ) == 0 )
+ else if ( strcmp( attrNode->GetNodeName(), "Node" ) == 0 )
xmlHostname = attrNode->GetText();
} // while ( ( attrNode = prevNode->GetNextNode() ) ) {
-
+
// -- Resolve hostname and port information
iResult = ResolveHostPortInformation ( xmlHostname, xmlPort, hostname, port );
if ( iResult == 1 ) {
}
// -- Reset loop to TDS node
- prevNode = xmlNode;
+ prevNode = xmlNode;
// -- Get Sources out of XML, resolve sources, add to sources ListxmlHostname.Data()
while ( ( attrNode = prevNode->GetNextNode() ) ) {
prevNode = attrNode;
-
+
// Find only "Parent" tags, otherwise continue to next tag
- if ( strcmp( attrNode->GetNodeName(), "Parent" ) != 0 )
+ if ( strcmp( attrNode->GetNodeName(), "Parent" ) != 0 )
continue;
TString xmlParent = attrNode->GetText();
-
+
AliHLTHOMERSourceDesc * source = new AliHLTHOMERSourceDesc( hostname, port );
-
+
if ( ResolveSourceInformation( xmlParent, source ) ) {
iResult = 3;
AliError( Form("Error resolving source : %s", xmlParent.Data()) );
-
+
delete source;
}
else {
fSourceList->Add( source );
AliInfo( Form("New Source added : %s", xmlParent.Data()) );
}
-
+
} // while ( ( attrNode = prevNode->GetNextNode() ) ) {
-
+
return iResult;
}
TString nodeName = 0;
while ( ( node = prevNode->GetNextNode() ) && iResult == 1 ) {
prevNode = node;
-
+
// -- Find only "Node" nodes, otherwise continue
if ( strcmp( node->GetNodeName(), "Node" ) != 0 )
continue;
TList *attrList = node->GetAttributes();
TXMLAttr *attr = 0;
TIter next(attrList);
-
+
TString nodeId = 0;
// TString nodeName = 0;
-
+
// Get "nodeID" and "nodeName" of this "Node" node
while ( ( attr = (TXMLAttr*)next() ) ) {
if ( strcmp( attr->GetName(), "ID" ) == 0 )
nodeId = attr->GetValue();
else if ( strcmp( attr->GetName(), "hostname" ) == 0 )
nodeName = attr->GetValue();
- }
+ }
// -- if this is not the correct nodeID continue
if ( nodeId != xmlHostname )
// *** Resolve port
if ( xmlPort.IsDigit() ) {
-
+
if ( nodeName.CompareTo("feptriggerdet") ==0 ){
if ( xmlPort.CompareTo("49152") == 0 ){
port = 58140;
} else if ( xmlPort.CompareTo("49153") == 0 ){
port = 58141;
- }
+ }
} else if ( nodeName.CompareTo("fepfmdaccorde") == 0 ){
if ( xmlPort.CompareTo("49152") == 0 ){
port = 58144;
} else if ( xmlPort.CompareTo("49153") == 0 ){
port = 58145;
- }
+ }
} else if ( nodeName.CompareTo("feptpcao15") == 0 ){
if ( xmlPort.CompareTo("49152") == 0 ){
port = 50340;
// *** Summary
if ( !iResult ) {
- AliInfo( Form("%s:%i resolved out of %s:%s", hostname.Data(), port, xmlHostname.Data(), xmlPort.Data()) );
+ AliInfo( Form("%s:%i resolved out of %s:%s", hostname.Data(), port, xmlHostname.Data(), xmlPort.Data()) );
}
return iResult;
return iResult;
}
-
+
TObjArray * parentTokens = xmlParent.Tokenize("_");
-
+
Int_t nEntries = parentTokens->GetEntries();
-
+
TString detector = ((TObjString*) parentTokens->At(0) )->GetString();
TString subDetector = "";
TString subSubDetector = "";
TString name = ((TObjString*) parentTokens->At(1) )->GetString();
TString objName = "";
-
- if ( nEntries == 3 )
- subDetector = ((TObjString*) parentTokens->At(2) )->GetString();
+
+ if ( nEntries == 3 )
+ subDetector = ((TObjString*) parentTokens->At(2) )->GetString();
else if ( nEntries == 4 ) {
- subDetector = ((TObjString*) parentTokens->At(2) )->GetString();
- subSubDetector = ((TObjString*) parentTokens->At(3) )->GetString();
+ subDetector = ((TObjString*) parentTokens->At(2) )->GetString();
+ subSubDetector = ((TObjString*) parentTokens->At(3) )->GetString();
}
-
+
// -- Corecct TPC subdetector, because in we have somtimes "A","C"
if ( ! detector.CompareTo("TPC") ) {
if ( subDetector.BeginsWith('A') ) {
objName = "";
dataType = "DDL_RAW";
specification = 0;
- }
+ }
// **** TPC ****
else if ( detector == "TPC" ) {
-
+
if ( name == "CalibPedestal" ) {
objName = "AliTPCCalibPedestal";
dataType = "HIS_CAL";
specification = 0;
}
else if ( name == "CalibPulser" ) {
- objName = "AliTPCCalibPulser";
+ objName = "AliTPCCalibPulser";
dataType = "HIS_CAL";
specification = 0;
}
else if ( name == "CF" || name == "RelayCF" ) {
- objName = "AliHLTTPCClusterDataFormat";
+ objName = "AliHLTTPCClusterDataFormat";
dataType = "CLUSTERS";
specification = 0;
}
else if ( name == "ESDConv" ) {
- objName = "AliESDEvent";
+ objName = "AliESDEvent";
dataType = "ESD_TREE";
specification = 0;
}
else if ( detector == "MUON" ) {
} // else if ( detector == "MUON" ) {
-
+
// -- Fill object
source->SetSourceName( name, objName );
source->SetSourceType( specification, dataType );
AliInfo( Form("Set Source %s , Type %s, ClassName %s .", name.Data(), dataType.Data(), objName.Data()) );
- AliInfo( Form(" Detector %s , SubDetector : %s, SubSubDetector %s .",
+ AliInfo( Form(" Detector %s , SubDetector : %s, SubSubDetector %s .",
detector.Data(), subDetector.Data(), subSubDetector.Data()) );
return iResult;
/*
* ---------------------------------------------------------------------------------
* Connection Handling
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
//##################################################################################
Int_t AliEveHOMERManager::ConnectHOMER(){
// see header file for class documentation
- Int_t iResult = 0;
+ Int_t iResult = 0;
// -- Check if already connected and state has not changed
if ( fStateHasChanged == kFALSE && IsConnected() ) {
AliInfo( Form("No need for reconnection.") );
return iResult;
}
-
+
// -- If already connected, disconnect before connect
- if ( IsConnected() )
+ if ( IsConnected() )
DisconnectHOMER();
// *** Create the Readoutlist
UInt_t sourceCount = 0;
CreateReadoutList( sourceHostnames, sourcePorts, sourceCount );
-
+
if ( sourceCount == 0 ) {
AliError(Form("No sources selected, aborting.") );
return iResult;
}
// *** Connect to data sources
-
+
if ( !fReader ) {
- if ( fLibManager )
+ if ( fLibManager )
fReader = fLibManager->OpenReader( sourceCount, sourceHostnames, sourcePorts );
}
-
+
iResult = fReader->GetConnectionStatus();
-
- if ( iResult ) {
- // -- Connection failed
-
+
+ if ( iResult ) {
+ // -- Connection failed
+
UInt_t ndx = fReader->GetErrorConnectionNdx();
-
+
if ( ndx < sourceCount ) {
- AliError( Form("Error : Error establishing connection to TCP source %s:%hu: %s (%d)",
+ AliError( Form("Error : Error establishing connection to TCP source %s:%hu: %s (%d)",
sourceHostnames[ndx], sourcePorts[ndx], strerror(iResult), iResult) );
}
else {
fLibManager->DeleteReader( fReader );
fReader = NULL;
- }
+ }
else {
// -- Connection ok - set reader
- fConnected = kTRUE;
-
+ fConnected = kTRUE;
+
AliInfo( Form("Connection established") );
}
-
+
delete[] sourceHostnames;
delete[] sourcePorts;
-
+
// -- Get next event
if ( ! iResult )
NextEvent();
-
+
return iResult;
}
fStateHasChanged = kTRUE;
fConnected = kFALSE;
-
+
AliInfo( Form("Connection closed") );
return;
TIter next( fSourceList );
while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! source->IsSelected() )
+ if ( ! source->IsSelected() )
continue;
-
+
Bool_t exists = kFALSE;
// -- Loop over existing entries and check if entry is already in readout list
break;
}
}
-
+
// -- Add new entires to readout list
if ( ! exists ) {
sourcePorts[sourceCount] = source->GetPort();
/*
* ---------------------------------------------------------------------------------
* AliEveEventManager Handling
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
//##################################################################################
Int_t AliEveHOMERManager::NextEvent(){
// see header file for class documentation
-
+
Int_t iResult = 0;
-
+
if ( !fReader || ! IsConnected() ) {
AliWarning( Form( "Not connected yet." ) );
return 1;
}
-
+
// -- Read next event data and error handling for HOMER (error codes and empty blocks)
while( 1 ) {
iResult = fReader->ReadNextEvent( 20000000 /*timeout in us*/);
-
+
if ( iResult == 111 || iResult == 32 || iResult == 6 ) {
Int_t ndx = fReader->GetErrorConnectionNdx();
AliError( Form("Error, No Connection to source %d: %s (%d)", ndx, strerror(iResult), iResult) );
-
+
return 2;
}
else if ( iResult == 110 ) {
Int_t ndx = fReader->GetErrorConnectionNdx();
AliError( Form("Timout occured, reading event from source %d: %s (%d)", ndx, strerror(iResult), iResult) );
- return 3;
+ return 3;
}
else if ( iResult == 56) {
Int_t ndx = fReader->GetErrorConnectionNdx();
AliError( Form("Error reading event from source %d: %s (%d) -- IRESULTRY", ndx, strerror(iResult), iResult) );
- continue;
+ continue;
}
else if ( iResult ) {
Int_t ndx = fReader->GetErrorConnectionNdx();
}
} // while( 1 ) {
- if ( iResult )
+ if ( iResult )
return iResult;
// -- Fill block list
while ( iter != NULL ){
-
+
// -- Create new block
- AliHLTHOMERBlockDesc * block = new AliHLTHOMERBlockDesc( GetBlk(), GetBlkSize(), GetBlkOrigin(),
+ AliHLTHOMERBlockDesc * block = new AliHLTHOMERBlockDesc( GetBlk(), GetBlkSize(), GetBlkOrigin(),
GetBlkType(), GetBlkSpecification() );
-
+
// -- Check sources list if block is requested
if ( CheckIfRequested( block ) )
- fBlockList->Add( block );
- else
+ fBlockList->Add( block );
+ else
delete block;
-
+
iter = GetNextBlk();
-
+
} // while ( iter != NULL ){
-
+
return iResult;
}
/*
* ---------------------------------------------------------------------------------
* BlockHandling
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
//##################################################################################
// see header file for class documentation
void* data = NULL;
-
+
if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
+ AliError( Form("Not connected yet.") );
}
else {
- if ( ( ndx ) < (Int_t) fNBlks )
+ if ( ( ndx ) < (Int_t) fNBlks )
data = (void*) fReader->GetBlockData( ndx );
}
ULong_t length = 0;
if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
+ AliError( Form("Not connected yet.") );
}
else {
- if ( ( ndx ) < (Int_t) fNBlks )
+ if ( ( ndx ) < (Int_t) fNBlks )
length = (ULong_t) fReader->GetBlockDataLength( ndx );
}
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
+ AliError( Form("Not connected yet.") );
return origin;
}
// -- Check block index
if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return origin;
+ AliError( Form("Block index %d out of range.", ndx ) );
+ return origin;
}
// -- Get origin
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
+ AliError( Form("Not connected yet.") );
return type;
}
// -- Check blockk index
if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return type;
+ AliError( Form("Block index %d out of range.", ndx ) );
+ return type;
}
// -- Get type
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
+ AliError( Form("Not connected yet.") );
return spec;
}
// -- Check blockk index
if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return spec;
+ AliError( Form("Block index %d out of range.", ndx ) );
+ return spec;
}
-
+
spec = (ULong_t) fReader->GetBlockDataSpec( ndx );
return spec;
// see header file for class documentation
Bool_t requested = kFALSE;
-
+
AliHLTHOMERSourceDesc * source= NULL;
-
+
// -- Read all sources and check if they should be read out
TIter next( fSourceList );
while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! source->IsSelected() )
+ if ( ! source->IsSelected() )
continue;
if ( source->GetDetector().CompareTo( block->GetDetector() ) )
if ( source->GetSubDetector().Atoi() != block->GetSubDetector().Atoi() )
continue;
-
+
if ( ! block->HasSubSubDetectorRange() ) {
-
+
// if ( source->GetSubSubDetector().Atoi() != block->GetSubSubDetector().Atoi() )
// continue;
-
+
} // if ( ! block->HasSubSubDetectorRange ) {
} // if ( ! block->HasSubDetectorRange ) {
-
+
requested = kTRUE;
-
+
} // while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
-
+
if ( requested) {
- AliInfo( Form("Block requested : %s - %s : %s/%s -> %s ", block->GetDetector().Data(), block->GetDataType().Data(),
+ AliInfo( Form("Block requested : %s - %s : %s/%s -> %s ", block->GetDetector().Data(), block->GetDataType().Data(),
block->GetSubDetector().Data(), block->GetSubSubDetector().Data(), block->GetClassName().Data() ) );
}
else
// see header file for class documentation
TList* srcList = GetSourceList();
-
+
AliHLTHOMERSourceDesc *desc = 0;
TIter next(srcList);
-
+
while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! desc->GetClassName().CompareTo( objectName ) )
+ if ( ! desc->GetClassName().CompareTo( objectName ) )
desc->Select();
}
}
// see header file for class documentation
TList* srcList = GetSourceList();
-
+
AliHLTHOMERSourceDesc *desc = 0;
TIter next(srcList);
-
+
while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
if ( ! desc->GetDataType().CompareTo( "DDL_RAW" ) ) {
desc->Select();
// see header file for class documentation
TList* srcList = GetSourceList();
-
+
AliHLTHOMERSourceDesc *desc = 0;
TIter next(srcList);
-
+
while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
if ( ! desc->GetDataType().CompareTo( "CLUSTERS" ) ) {
desc->Select();
// see header file for class documentation
TList* srcList = GetSourceList();
-
+
AliHLTHOMERSourceDesc *desc = 0;
TIter next(srcList);
-
+
while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
if ( ! desc->GetDataType().CompareTo( "ESD_TREE" ) ) {
desc->Select();
AliHLTHOMERBlockDesc *desc = 0;
TIter next(blockList);
-
+
while ( ( desc = (AliHLTHOMERBlockDesc*)next() ) ) {
if ( ! desc->IsTObject() )
continue;
-
+
Int_t sectorTPC = 0;
if ( desc->GetSubSubDetector().Atoi() <= 1 ) {
else {
sectorTPC = 36 + desc->GetSubDetector().Atoi();
}
-
+
if ( ! objectName.CompareTo( desc->GetClassName() ) ){
//
if ( ! objectName.CompareTo( "AliTPCCalibPedestal" ) ) {
AliTPCCalROC* calROC = NULL;
-
+
AliTPCCalibPedestal * cal = (AliTPCCalibPedestal*) desc->GetTObject();
if ( cal == NULL ) {
cout << "error 1" << endl;
continue;
}
-
+
cal->Analyse();
calROC = cal->GetCalRocRMS(sectorTPC);
cout << "error 2" << endl;
continue;
}
-
+
calROC->SetName(Form("RMS_ROC%d", sectorTPC));
fTPCPre->AddComponent((TObject*) calROC );
cout << "error 3" << endl;
continue;
}
-
+
calROC->SetName(Form("Pedestal_ROC%d", sectorTPC));
cout << "added" << endl;
AliTPCCalibPulser * cal = (AliTPCCalibPulser*) desc->GetTObject();
cal->Analyse();
-
+
calROC = cal->GetCalRocT0(sectorTPC);
calROC->SetName(Form("T0_ROC%d", sectorTPC));
fTPCPre->AddComponent((TObject*) calROC );
calROC->SetName(Form("Outliers_ROC%d", sectorTPC));
fTPCPre->AddComponent((TObject*) calROC );
}
-
+
*/
//
// AliTPCCalibCE
AliTPCCalibPulser * cal = (AliTPCCalibPulser*) desc->GetTObject();
cal->Analyse();
-
+
calROC = cal->GetCalRocT0(sectorTPC);
calROC->SetName(Form("T0_ROC%d", sectorTPC));
fTPCPre->AddComponent((TObject*) calROC );
}
*/
} // if ( ! objectName.CompareTo( desc->GetClassName() ) ) {
-
+
} // while ( ( desc = (AliHLTHOMERBlockDesc*)next() ) ) {
if ( dumpToFile ) {
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
//-*- Mode: C++ -*-
#ifndef ALIEVEHOMERMANGER_H
/** @file AliEveHOMERManager.h
@author Jochen Thaeder
- @date
+ @date
@brief Manager for HOMER in offline
*/
/**
* @class AliEveHOMERManager
- *
+ *
* This class is the main class of the AliEveHOMERManager
* ... more to come
*
/*
* ---------------------------------------------------------------------------------
- * Constructor / Destructor
- * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
*/
- /** constructor
+ /** constructor
* @param argc Number of command line arguments.
* @param argv Array of command line arguments.
*/
- AliEveHOMERManager(TString xmlFile="" );
+ AliEveHOMERManager(TString xmlFile="" );
/** not a valid copy constructor, defined according to effective C++ style */
- AliEveHOMERManager( const AliEveHOMERManager& );
+ AliEveHOMERManager( const AliEveHOMERManager& );
/** not a valid assignment op, but defined according to effective C++ style */
- AliEveHOMERManager& operator=( const AliEveHOMERManager& );
+ AliEveHOMERManager& operator=( const AliEveHOMERManager& );
/** destructor */
virtual ~AliEveHOMERManager();
/*
* ---------------------------------------------------------------------------------
* Source Handling - public
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
-
+
/** Create Sources List from HOMER-Proxy */
Int_t CreateHOMERSourcesList();
* @param source Pointer to AliHLTHOMERSourceDesc object.
* @param state New (selected/not selected) state.
*/
- void SetSourceState( AliHLTHOMERSourceDesc* source, Bool_t state);
+ void SetSourceState( AliHLTHOMERSourceDesc* source, Bool_t state);
/** Get pointer to source List
* @return returns pointer to TList of sources
/*
* ---------------------------------------------------------------------------------
* Connection Handling - public
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
-
+
/** Connect to HOMER sources, out of Readout List, which gets created when state has changed
- * @return 0 on sucess, "HOMER" errors on error
+ * @return 0 on sucess, "HOMER" errors on error
*/
Int_t ConnectHOMER();
/*
* ---------------------------------------------------------------------------------
* AliEveEventManager Handling - public
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
- /** Loads the next AliEveEventManager, after being connected
- * @return 0 on sucess, "HOMER" errors on error
+ /** Loads the next AliEveEventManager, after being connected
+ * @return 0 on sucess, "HOMER" errors on error
*/
Int_t NextEvent();
-
+
/** Get event ID
* @return Returns eventID
*/
/** Dynamic loader manager for the HOMER library */
AliHLTHOMERLibManager* fLibManager; //! transient
-
+
private:
/*
* ---------------------------------------------------------------------------------
* Source Handling - private
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
-
+
/** Get Information out of a TDS process in XML file
* @param xmlNode Pointer to childs of TDS node
- * @return 0 on sucess, > 0 on error
+ * @return 0 on sucess, > 0 on error
*/
Int_t GetTDSAttributes( TXMLNode * xmlNode );
* @param xmlPort Port out of the XML
* @param hostname Return of the hostname
* @param port Return of the port
- * @return 0 on sucess, 1 if hostname couldn't be resolved, 2 if port couldn't be resolved,
+ * @return 0 on sucess, 1 if hostname couldn't be resolved, 2 if port couldn't be resolved,
*/
Int_t ResolveHostPortInformation( TString xmlHostname, TString xmlPort, TString &hostname, Int_t &port );
- /** Resolve information of source
+ /** Resolve information of source
* @param xmlParent ParentString out of the XML
* @param source Return the filled AliHLTHOMERSourceDesc object
* @return 0 on sucess, 1 on error
/*
* ---------------------------------------------------------------------------------
* Connection Handling - private
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
-
- /** Create a readout list for Hostname and ports
+
+ /** Create a readout list for Hostname and ports
* @param socurceHostnames Array of selected hostnames
* @param socurcePorts Array of selected ports
* @param socurceCount Number of selected hostname:port
/* ---------------------------------------------------------------------------------
* Eve AliEveHOMERManager::foo(nt Handling - private
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
-
+
/** Create a TList of blocks, which have been readout */
Int_t CreateBlockList();
/*
* ---------------------------------------------------------------------------------
* Block Handling - private
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
/** Get Number of blocks in current event
* @return returns pointer to blk, 0 if no block present
*/
ULong_t GetBlkSize() { return GetBlkSize( fCurrentBlk ); }
-
+
/** Get origin of block ndx
* @param ndx Block index
* @return origin of block
*/
- TString GetBlkOrigin( Int_t ndx );
-
+ TString GetBlkOrigin( Int_t ndx );
+
/** Get origin of current block
* @param ndx Block index
* @return origin of block
/** Get specification of current block
* @param ndx Block index
* @return specification of block
- */
+ */
ULong_t GetBlkSpecification(){ return GetBlkSpecification( fCurrentBlk ); }
/** Checks if current Block should was requested
/*
* ---------------------------------------------------------------------------------
* Members - private
- * ---------------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------------
*/
// == XML parser ==
TString fXMLFile; // see above
/** XML parser into DOM model */
- TDOMParser* fXMLParser; //! transient
-
+ TDOMParser* fXMLParser; //! transient
+
/** Root node of parsed config file */
- TXMLNode * fRootNode; //! transient
+ TXMLNode * fRootNode; //! transient
// == sources ==
/** List to HOMER sources */
- TList * fSourceList; //! transient
+ TList * fSourceList; //! transient
// == connection ==
-
+
/** Pointer to HOMER reader */
- AliHLTHOMERReader* fReader; //! transient
+ AliHLTHOMERReader* fReader; //! transient
// == blocks ==
/** List to HOMER blocks */
- TList * fBlockList; //! transient
+ TList * fBlockList; //! transient
// == events ==
-
+
/** Number of blockes in current event */
ULong_t fNBlks; // see above
/** Current block in current event */
ULong_t fCurrentBlk; // see above
-
+
// == states ==
/** Shows connection status */
Bool_t fConnected; // see above
- /** Indicates, if a sources have changes,
+ /** Indicates, if a sources have changes,
* so that one has to reconnect .
*/
Bool_t fStateHasChanged; // see above
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveHOMERManagerEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_AliEVEHOMERManagerEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveHOMERSource.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_AliEVEHOMERSource_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveHOMERSourceList.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_AliEVEHOMERSourceList_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include <TMath.h>
// spd lowest resolution
Int_t nx = 8; // fSegSPD->Npx()/8; // 32
Int_t nz = 6; // fSegSPD->Npz()/2; // 128
- fSPDScaleX[1] = Int_t(nx);
- fSPDScaleZ[1] = Int_t(nz);
- fSPDScaleX[2] = Int_t(nx*2);
- fSPDScaleZ[2] = Int_t(nz*2);
- fSPDScaleX[3] = Int_t(nx*3);
- fSPDScaleZ[3] = Int_t(nz*3);
- fSPDScaleX[4] = Int_t(nx*4);
- fSPDScaleZ[4] = Int_t(nz*4);
+ fSPDScaleX[1] = Int_t(nx);
+ fSPDScaleZ[1] = Int_t(nz);
+ fSPDScaleX[2] = Int_t(nx*2);
+ fSPDScaleZ[2] = Int_t(nz*2);
+ fSPDScaleX[3] = Int_t(nx*3);
+ fSPDScaleZ[3] = Int_t(nz*3);
+ fSPDScaleX[4] = Int_t(nx*4);
+ fSPDScaleZ[4] = Int_t(nz*4);
fSDDScaleX[1] = 2;
fSDDScaleZ[1] = 2;
/**************************************************************************/
-AliEveITSDigitsInfo:: ~AliEveITSDigitsInfo()
+AliEveITSDigitsInfo:: ~AliEveITSDigitsInfo()
{
// Destructor.
// Deletes the data-maps and the tree.
for(j = fSSDmap.begin(); j != fSSDmap.end(); ++j)
delete j->second;
- delete fSegSPD; delete fSegSDD; delete fSegSSD;
+ delete fSegSPD; delete fSegSDD; delete fSegSSD;
delete fGeom;
delete fTree;
}
Int_t module = inputSPD.GetModuleID();
Int_t column = inputSPD.GetColumn();
Int_t row = inputSPD.GetRow();
-
+
if (inputSPD.IsNewModule())
{
digits = fSPDmap[module];
fSPDZCoord[0]=fZ1pitchSPD -fHlSPD;
for (m=1; m<fNzSPD; m++) {
Double_t dz=fZ1pitchSPD;
- if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
- m==127 || m==128) dz=fZ2pitchSPD;
+ if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
+ m==127 || m==128) dz=fZ2pitchSPD;
fSPDZCoord[m]=fSPDZCoord[m-1]+dz;
}
-
+
for (m=0; m<fNzSPD; m++) {
Double_t dz=1.*fZ1pitchSPD;
- if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
- m==127 || m==128) dz=1.*fZ2pitchSPD;
+ if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
+ m==127 || m==128) dz=1.*fZ2pitchSPD;
fSPDZCoord[m]-=dz;
}
-
+
// SDD
fSegSDD = new AliITSsegmentationSDD(fGeom);
// given by the AliEveITSModuleSelection object.
Int_t idx0 = 0, idx1 = 0;
- switch(sel->fType)
+ switch(sel->GetType())
{
case 0:
idx0 = 0;
for (Int_t id = idx0; id<idx1; ++id)
{
fGeom->GetModuleId(id, lay, lad, det);
- if (sel->fLayer == lay || sel->fLayer == -1)
+ if (sel->GetLayer() == lay || sel->GetLayer() == -1)
{
// check data from matrix
mx.UnitTrans();
mx.SetBaseVec(1, x[0], x[3], x[6]);
mx.SetBaseVec(2, x[1], x[4], x[7]);
mx.SetBaseVec(3, x[2], x[5], x[8]);
- fGeom->GetTrans(id, x);
+ fGeom->GetTrans(id, x);
mx.SetBaseVec(4, x);
mx.GetPos(v);
- if (v.Phi() <= sel->fMaxPhi && v.Phi() >= sel->fMinPhi &&
- v.Theta() <= sel->fMaxTheta && v.Theta() >= sel->fMinTheta)
+ if (v.Phi() <= sel->GetMaxPhi() && v.Phi() >= sel->GetMinPhi() &&
+ v.Theta() <= sel->GetMaxTheta() && v.Theta() >= sel->GetMinTheta())
{
ids.push_back(id);
}
printf("SPD dimesion of (%d,%d) in pixel(%f,%f)\n", ix, iz, fSegSPD->Dpx(ix), fSegSPD->Dpz(iz));
iz = 32;
printf("SPD dimesion of pixel (%d,%d) are (%f,%f)\n", ix, iz, fSegSPD->Dpx(ix)*0.001, fSegSPD->Dpz(iz)*0.001);
-
+
printf("*********************************************************\n");
printf("SDD module dimension (%f,%f)\n", fSegSDD->Dx()*0.0001, fSegSDD->Dz()*0.0001);
printf("SDD first,last module:: %d,%d\n", fGeom->GetStartSDD(), fGeom->GetLastSDD());
printf("SSD strips in module %d\n", fSegSSD->Npx());
printf("SSD strip sizes are (%f,%f)\n", fSegSSD->Dpx(1), fSegSSD->Dpz(1));
fSegSSD->SetLayer(5); fSegSSD->Angles(ap,an);
- printf("SSD layer 5 stereoP %f stereoN %f angle\n", ap, an);
+ printf("SSD layer 5 stereoP %f stereoN %f angle\n", ap, an);
fSegSSD->SetLayer(6); fSegSSD->Angles(ap,an);
- printf("SSD layer 6 stereoP %f stereoN %f angle\n", ap, an);
+ printf("SSD layer 6 stereoP %f stereoN %f angle\n", ap, an);
}
printf("Z::original (%3f) scaled (%3f, %3f) \n", zo, zn-dpz/2, zn+dpz/2);
printf("X::original (%3f) scaled (%3f, %3f) \n", xo, xn-dpx/2, xn+dpx/2);
printf("%d,%d maped to %d,%d \n", od->GetCoord1(), od->GetCoord2(), i,j );
-*/
+*/
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSDigitsInfo_H
Float_t fMaxPhi; // Max phi.
Float_t fMinTheta; // Min theta.
Float_t fMaxTheta; // Max theta.
-
+
public:
AliEveITSModuleSelection();
virtual ~AliEveITSModuleSelection() {}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveITSModule.h"
{
Float_t dx = info->fSegSPD->Dx()*0.00005;
- Float_t dz = 3.50;
+ Float_t dz = 3.50;
fgSPDFrameBox = new TEveFrameBox();
fgSPDFrameBox->SetAAQuadXZ(-dx, 0, -dz, 2*dx, 2*dz);
if (!fgStaticInitDone) {
InitStatics(fInfo);
-
+
fgSPDFrameBox->IncRefCount(this);
fgSPDPalette->IncRefCount();
-
+
fgSDDFrameBox->IncRefCount(this);
fgSDDPalette->IncRefCount();
TString strSensor = "Sensor";
TString symname;
Int_t id, nsector, nstave, nladder, rest;
-
+
if (fID <= fInfo->fGeom->GetLastSPD())
{
// SPD
SetFrame(fgSPDFrameBox);
SetPalette(fgSPDPalette);
-
+
symname += strLadder;
if (fID < 80)
{
SetName(symname);
fDetID = 0;
fDx = fInfo->fSegSPD->Dx()*0.00005;
- fDz = 3.50;
+ fDz = 3.50;
fDy = fInfo->fSegSPD->Dy()*0.00005;
}
SetFrame(fgSDDFrameBox);
SetPalette(fgSDDPalette);
-
+
symname += strSensor;
if (fID < 324)
{
symname += rest;
SetName(symname);
fDetID = 2;
- fInfo->fSegSSD->SetLayer(fLayer);
+ fInfo->fSegSSD->SetLayer(fLayer);
fDx = fInfo->fSegSSD->Dx()*0.00005;
fDz = fInfo->fSegSSD->Dz()*0.00005;
fDy = fInfo->fSegSSD->Dy()*0.00005;
}
- LoadQuads();
+ LoadQuads();
ComputeBBox();
if (trans)
SetTrans();
TClonesArray *digits = fInfo->GetDigits(fID, fDetID);
Int_t ndigits = digits ? digits->GetEntriesFast() : 0;
- Float_t x, z, dpx, dpz;
+ Float_t x, z, dpx, dpz;
Int_t i, j;
switch(fDetID)
{
case 0: { // SPD
- AliITSsegmentationSPD* seg = fInfo->fSegSPD;
+ AliITSsegmentationSPD* seg = fInfo->fSegSPD;
Reset(kQT_RectangleXZFixedY, kFALSE, 32);
}
case 1: { // SDD
- AliITSsegmentationSDD *seg = fInfo->fSegSDD;
+ AliITSsegmentationSDD *seg = fInfo->fSegSDD;
Reset(kQT_RectangleXZFixedY, kFALSE, 32);
}
case 2: { // SSD
- AliITSsegmentationSSD* seg = fInfo->fSegSSD;
+ AliITSsegmentationSSD* seg = fInfo->fSegSSD;
Reset(kQT_LineXZFixedY, kFALSE, 32);
fHMTrans.SetBaseVec(2, x[1], x[4], x[7]);
fHMTrans.SetBaseVec(3, x[2], x[5], x[8]);
// translation
- fInfo->fGeom->GetTrans(fID, x);
+ fInfo->fGeom->GetTrans(fID, x);
fHMTrans.SetBaseVec(4, x);
}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSModule_H
#define ALIEVE_ITSModule_H
AliEveITSModule& operator=(const AliEveITSModule&); // Not implemented
protected:
- AliEveITSDigitsInfo* fInfo;
+ AliEveITSDigitsInfo* fInfo;
Int_t fID; // Module id
Int_t fDetID; // Detector id (0~SPD, 1~SDD, 2~SSD)
Int_t fLayer;
Int_t fLadder;
Int_t fDet;
-
+
Float_t fDx;
Float_t fDz;
Float_t fDy;
AliEveITSDigitsInfo* GetDigitsInfo() const { return fInfo; }
void SetDigitsInfo(AliEveITSDigitsInfo* info);
-
+
Int_t GetSubDetID() const { return fDetID; }
Int_t GetID() const { return fID; }
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveITSModuleStepper.h"
AliEveITSModuleStepper::AliEveITSModuleStepper(AliEveITSDigitsInfo* di) :
TEveElementList("ITS 2DStore", "AliEveITSModuleStepper", kTRUE),
- fPosition(0),
-
+ fPosition(0),
+
fDigitsInfo(di),
fScaleInfo(0),
if (N != GetNChildren())
{
DestroyElements();
- for (Int_t m=0; m<N; m++)
+ for (Int_t m=0; m<N; m++)
{
AddElement(new AliEveITSScaledModule(m, fDigitsInfo, fScaleInfo));
}
void AliEveITSModuleStepper::SetFirst(Int_t first)
{
Int_t lastpage = fIDs.size()/Nxy();
- if(fIDs.size() % Nxy() ) lastpage++;
-
+ if(fIDs.size() % Nxy() ) lastpage++;
+
Int_t first_lastpage = (lastpage -1)*Nxy();
if(first > first_lastpage) first = first_lastpage;
if(first < 0) first = 0;
}
void AliEveITSModuleStepper::End()
-{
+{
Int_t lastpage = fIDs.size()/Nxy();
- if(fIDs.size() % Nxy() ) lastpage++;
+ if(fIDs.size() % Nxy() ) lastpage++;
fPosition = (lastpage -1)*Nxy();
- fStepper->Reset();
+ fStepper->Reset();
Apply();
}
fSubDet = det;
fIDs.clear();
AliEveITSModuleSelection sel = AliEveITSModuleSelection();
- sel.fType = det; sel.fLayer=layer;
+ sel.SetType (det);
+ sel.SetLayer(layer);
fDigitsInfo->GetModuleIDs(&sel, fIDs);
//in reder menu define a space between left and right pager
fPagerGap = 1.2*TextLength(Form("%d/%d",GetPages(), GetPages()));
{
fIDs.clear();
AliEveITSModuleSelection sel = AliEveITSModuleSelection();
- sel.fMaxTheta = max; sel.fMinTheta=min;
+ sel.SetThetaRange(min, max);
fDigitsInfo->GetModuleIDs(&sel, fIDs);
Start();
}
Int_t AliEveITSModuleStepper::GetCurrentPage()
{
- Int_t idx = fPosition +1;
+ Int_t idx = fPosition +1;
Int_t n = idx/Nxy();
if(idx % Nxy()) n++;
return n;
Int_t AliEveITSModuleStepper::GetPages()
{
- Int_t n = fIDs.size()/Nxy();
- if(fIDs.size() % Nxy()) n++;
+ Int_t n = fIDs.size()/Nxy();
+ if(fIDs.size() % Nxy()) n++;
return n;
}
-
+
/**************************************************************************/
void AliEveITSModuleStepper::Apply()
UInt_t idx = fPosition;
for(List_i childit=fChildren.begin(); childit!=fChildren.end(); ++childit)
{
- if(idx < fIDs.size())
+ if(idx < fIDs.size())
{
AliEveITSScaledModule* mod = dynamic_cast<AliEveITSScaledModule*>(*childit);
- mod->SetID(fIDs[idx], kFALSE);
+ mod->SetID(fIDs[idx], kFALSE);
TEveTrans& tr = mod->RefHMTrans();
tr.UnitTrans();
tr.RotateLF(3,2,TMath::PiOver2());
- tr.RotateLF(1,3,TMath::PiOver2());
+ tr.RotateLF(1,3,TMath::PiOver2());
- // scaling
+ // scaling
Float_t mz, mx;
Float_t* fp = mod->GetFrame()->GetFramePoints();
// switch x,z it will be rotated afterwards
Float_t p[3];
fStepper->GetPosition(p);
tr.SetPos(p[0]+0.5*fStepper->GetDx(), p[1]+0.5*fStepper->GetDy(), p[2]+0.5*fStepper->GetDz());
-
+
if(mod->GetSubDetID() == 2)
mod->SetName(Form("SSD %d", idx));
else if(mod->GetSubDetID() == 1)
gluPickMatrix(rect.X(), rect.Y(), rect.Width(), rect.Height(),
(Int_t*) rnrCtx.GetCamera()->RefViewport().CArr());
}
-
+
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glDisable(GL_CULL_FACE);
glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
RenderMenu();
RenderPalette(fPaletteLength, 1.6*fWWidth, fWHeight*0.6);
glPopMatrix();
glPopAttrib();
-
+
if (lightp) glEnable(GL_LIGHTING);
glMatrixMode(GL_PROJECTION);
if(id > 0) glLoadName(id);
if(id>0 && fWActive == id)
fText->SetTextColor(fWActiveCol);
- else
+ else
fText->SetTextColor(fFontCol);
-
+
if(id>0)
- {
- if(fWActive == id)
+ {
+ if(fWActive == id)
fText->SetTextColor(fWActiveCol);
else
fText->SetTextColor(fFontCol);
RenderFrame(bw,fWHeight*2,id);
glTranslatef( bw, 0, 0);
}
- else
+ else
{
fText->SetTextColor(fFontCol);
fText->PaintGLText(0, txtY, -0.8, string.Data());
UChar_t color[4];
if (fWActive == id)
TEveUtil::TEveUtil::ColorFromIdx(fWActiveCol, color);
- else
+ else
TEveUtil:: TEveUtil::ColorFromIdx(fWCol, color);
glColor4ubv(color);
UChar_t color[4];
if (fWActive == id)
TEveUtil::TEveUtil::ColorFromIdx(fWActiveCol, color);
- else
+ else
TEveUtil::TEveUtil::ColorFromIdx(fWCol, color);
glColor4ubv(color);
Float_t xs = dx/4, ys = dy/4;
if(id == 0) {
glBegin(GL_QUADS);
- glVertex2f(0,ys); glVertex2f(0, ys*3);
+ glVertex2f(0,ys); glVertex2f(0, ys*3);
glVertex2f(dx, ys*3); glVertex2f(dx, ys);
glEnd();
return;
glVertex2f(xs, ys*1.5); glVertex2f(xs*2, ys*0.5); glVertex2f(xs*3, ys*1.5);
break;
}
-
+
default:
break;
}
{
Float_t xs = dx/(p->GetMaxVal() - p->GetMinVal());
Float_t x0 = xs;
- for(Int_t i=p->GetMinVal() + 1; i<p->GetMaxVal(); i++)
+ for(Int_t i=p->GetMinVal() + 1; i<p->GetMaxVal(); i++)
{
glColor4ubv(p->ColorFromValue(i));
glVertex2f(x0, 0);
Float_t H = 1.9*wh*(1+ 2*fWOff);
if(1) {
glBegin(GL_QUADS);
- glVertex3f(-1, -1, 0.1); glVertex3f(-1, -1+H, 0.1);
+ glVertex3f(-1, -1, 0.1); glVertex3f(-1, -1+H, 0.1);
glVertex3f(1 , -1+H, 0.1); glVertex3f( 1, -1 , 0.1);
glEnd();
}
RenderFrame(ww,wh,1);
glTranslatef(soff, 0, 0);
// text info
- {
+ {
const char* txt = Form("%d/%d ", GetCurrentPage(), GetPages());
Float_t dx = (fPagerGap - TextLength(txt))*0.5;
fText->SetTextColor(fFontCol);
RenderSymbol(ww, wh, 4);
RenderFrame(ww,wh,4);
glTranslatef(2*ww, 0, 0);
- glPopMatrix();
+ glPopMatrix();
// scale info
glPushMatrix();
Int_t cnx = 0, cnz = 0;
switch(sm->GetSubDetID())
{
- case 0:
+ case 0:
cnx = di->fSPDScaleX[scale], cnz = di->fSPDScaleZ[scale];
break;
- case 1:
+ case 1:
cnx = di->fSDDScaleX[scale], cnz = di->fSDDScaleZ[scale];
break;
case 2:
glPushMatrix();
glTranslatef(18*ww, 0, 0);
Float_t bs = ww*0.2;
- RenderString("SPD", 8);
+ RenderString("SPD", 8);
glTranslatef(bs, 0, 0);
- RenderString("SDD", 9);
+ RenderString("SDD", 9);
glTranslatef(bs, 0, 0);
RenderString("SSD", 10);
glPopMatrix();
UInt_t idx = fPosition;
for (List_i childit=fChildren.begin(); childit!=fChildren.end(); ++childit)
{
- if(idx < fIDs.size())
- {
+ if(idx < fIDs.size())
+ {
AliEveITSScaledModule* mod = dynamic_cast<AliEveITSScaledModule*>(*childit);
TEveTrans& tr = mod->RefHMTrans();
TString name = Form("%d",mod->GetID());
// Return TRUE if event was handled.
switch (event->fType)
- {
+ {
case kMotionNotify:
{
Int_t item = rec.GetN() < 2 ? -1 : (Int_t)rec.GetItem(1);
case 5:
{
AliEveDigitScaleInfo* si = fScaleInfo;
- if(si->GetScale() < 5)
+ if(si->GetScale() < 5)
{
- si->ScaleChanged(si->GetScale() + 1);
+ si->ScaleChanged(si->GetScale() + 1);
ElementChanged(kTRUE, kTRUE);
}
break;
case 6:
{
AliEveDigitScaleInfo* si = fScaleInfo;
- if(si->GetScale() > 1)
+ if(si->GetScale() > 1)
{
- si->ScaleChanged(si->GetScale() - 1);
+ si->ScaleChanged(si->GetScale() - 1);
ElementChanged(kTRUE, kTRUE);
}
break;
case 8:
DisplayDet(0, -1);
break;
- case 9:
+ case 9:
DisplayDet(1, -1);
break;
- case 10:
+ case 10:
DisplayDet(2, -1);
break;
default:
// Mouse has left the element.
fWActive = -1;
-}
+}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSModuleStepper_H
// palette configuratiom
Float_t fPaletteOffset;
- Float_t fPaletteLength;
+ Float_t fPaletteLength;
- // symbol configuration
- Int_t fWActive;
+ // symbol configuration
+ Int_t fWActive;
Float_t fWWidth;
Float_t fWHeight;
Float_t fWOff; ///offset relative to widget size
- Color_t fWCol;
+ Color_t fWCol;
Int_t fWActiveCol;
Color_t fFontCol;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveITSModuleStepperEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSModuleStepperEditor_H
AliEveITSModuleStepper* fM; // fModel dynamic-casted to AliEveITSModuleStepperEditor
TEveGridStepperSubEditor* fStepper;
-
+
public:
AliEveITSModuleStepperEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
virtual ~AliEveITSModuleStepperEditor();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveITSScaledModule.h"
void AliEveDigitScaleInfo::ScaleChanged(Int_t s)
{
fScale = s;
-
+
AliEveITSScaledModule* sm;
std::list<TEveElement*>::iterator i = fBackRefs.begin();
while (i != fBackRefs.end())
{
fStatType = t;
fSyncPalette = kTRUE;
-
+
AliEveITSScaledModule* sm;
std::list<TEveElement*>::iterator i = fBackRefs.begin();
while (i != fBackRefs.end())
SetOwnIds(kTRUE);
SetDigitsInfo(info);
- SetID(gid);
+ SetID(gid);
fScaleInfo->IncRefCount(this);
}
Int_t scale = fScaleInfo->GetScale() -1;
switch(fDetID)
{
- case 0:
- {
+ case 0:
+ {
// SPD
Reset(kQT_RectangleXZFixedY, kFALSE, 32);
fNCx = fInfo->fSPDScaleX[scale];
fNz = Int_t(fInfo->fSegSPD->Npz()/fNCz);
fNx = Int_t(fInfo->fSegSPD->Npx()/fNCx);
- dpz = 2*fDz/fNz;
+ dpz = 2*fDz/fNz;
dpx = 2*fDx/fNx;
//printf("SPD orig cells (%d, %d) (%d, %d)\n", fInfo->fSegSPD->Npx(), fInfo->fSegSPD->Npz(), Nx, Nz);
i = Int_t((zo+fDz)/dpz);
j = Int_t((od->GetCoord2()*fNx)/fInfo->fSegSPD->Npx());
id = j*fNx + i;
-
+
miter = dmap.find(id);
if(miter == dmap.end())
- {
+ {
dmap[id] = fPlex.Size();
z = dpz*(i) - fDz;
x = dpx*(j) - fDx;
sd = new ScaledDigit(c1, c2);
QuadId(sd);
}
- else
+ else
{
sd = dynamic_cast<ScaledDigit*>(GetId(miter->second));
- if(c1 < sd->min_i)
+ if(c1 < sd->min_i)
sd->min_i = c1;
else if( c1 > sd->max_i)
sd->max_i = c1;
-
- if(c2 < sd->min_j)
+
+ if(c2 < sd->min_j)
sd->min_j = c2;
else if( c2 > sd->max_j)
sd->max_j = c2;
}
-
+
sd->N++;
sd->sum += od->GetSignal();
sd->sqr_sum += od->GetSignal()*od->GetSignal();
}
break;
}
- case 1:
- {
+ case 1:
+ {
// SDD
Reset(kQT_RectangleXZFixedY, kFALSE, 32);
fNCz = fInfo->fSDDScaleZ[scale];
- fNCx = fInfo->fSDDScaleX[scale];
+ fNCx = fInfo->fSDDScaleX[scale];
fNz = Int_t(fInfo->fSegSDD->Npz()/fNCz);
fNx = Int_t(fInfo->fSegSDD->Npx()/fNCx);
dpz = 2*fDz/fNz;
id = j*fNx + i;
c1 = od->GetCoord1(); c2 = od->GetCoord2();
-
+
miter = dmap.find(id);
if(miter == dmap.end())
- {
+ {
dmap[id] = fPlex.Size();
z = dpz*(i) - fDz;
x = dpx*(j) - fDx;
sd = new ScaledDigit(od->GetCoord1(),od->GetCoord2());
QuadId(sd);
}
- else
+ else
{
sd = dynamic_cast<ScaledDigit*>(GetId(miter->second));
- if(c1 < sd->min_i)
+ if(c1 < sd->min_i)
sd->min_i = c1;
else if( c1 > sd->max_i)
sd->max_i = c1;
-
- if(c2 < sd->min_j)
+
+ if(c2 < sd->min_j)
sd->min_j = c2;
else if( c2 > sd->max_j)
sd->max_j = c2;
sd->sqr_sum += od->GetSignal()*od->GetSignal();
}
break;
- }
- case 2:
- {
- // SSD
+ }
+ case 2:
+ {
+ // SSD
Reset(kQT_LineXZFixedY, kFALSE, 32);
- AliITSsegmentationSSD* seg = fInfo->fSegSSD;
+ AliITSsegmentationSSD* seg = fInfo->fSegSSD;
Float_t ap, an; // positive/negative angles -> offsets
seg->Angles(ap, an);
ap = TMath::Tan(ap) * fDz;
an = - TMath::Tan(an) * fDz;
- fNCx = fInfo->fSSDScale[scale];
+ fNCx = fInfo->fSSDScale[scale];
fNz = 1;
fNx = Int_t(fInfo->fSegSSD->Npx()/fNCx);
dpz = 2*fDz/fNz;
AliITSdigitSSD *od=0;
for (Int_t k=0; k<ndigits; k++) {
od=(AliITSdigitSSD*)digits->UncheckedAt(k);
- if(od->GetCoord1() == 1)
+ if(od->GetCoord1() == 1)
i = 1; // p side
- else
+ else
i= -1; // n side
j = Int_t(od->GetCoord2()/fNCx);
c1 = od->GetCoord1(); c2 = od->GetCoord2();
- id = j*i;
+ id = j*i;
miter = dmap.find(id);
ScaledDigit* sd;
if(miter == dmap.end())
- {
+ {
// printf("orig digit %d,%d scaled %d,%d \n",od->GetCoord1(),od->GetCoord2(),i,j);
dmap[id] = fPlex.Size();
z = dpz*(i) - fDz;
sd = new ScaledDigit(c1, c2);
QuadId(sd);
}
- else
+ else
{
- sd = dynamic_cast<ScaledDigit*>(GetId(miter->second));
- if(c1 < sd->min_i)
+ sd = dynamic_cast<ScaledDigit*>(GetId(miter->second));
+ if(c1 < sd->min_i)
sd->min_i = c1;
else if( c1 > sd->max_i)
sd->max_i = c1;
-
- if(c2 < sd->min_j)
+
+ if(c2 < sd->min_j)
sd->min_j = c2;
else if( c2 > sd->max_j)
sd->max_j = c2;
{
if(fScaleInfo->GetSyncPalette()) SyncPalette();
- Int_t N = fPlex.Size();
+ Int_t N = fPlex.Size();
for (Int_t i = 0 ; i< N; i++)
{
ScaledDigit* sd = dynamic_cast<ScaledDigit*>(GetId(i));
/**************************************************************************/
void AliEveITSScaledModule::SyncPalette()
-{
+{
// printf("AliEveITSScaledModule::SyncPalette()\n");
- if(fScaleInfo->GetStatType() == AliEveDigitScaleInfo::ST_Occup)
+ if(fScaleInfo->GetStatType() == AliEveDigitScaleInfo::ST_Occup)
{
// SPD
AliEveITSModule::fgSPDPalette->SetLimits(0, 100);
AliEveITSModule::fgSPDPalette->SetMinMax(0, 100);
-
+
// SDD
AliEveITSModule::fgSDDPalette->SetLimits(0, 100);
AliEveITSModule::fgSDDPalette->SetMinMax(0, 100);
// SPD
AliEveITSModule::fgSPDPalette->SetLimits(0, DI.fSPDHighLim);
AliEveITSModule::fgSPDPalette->SetMinMax(DI.fSPDMinVal, DI.fSPDMaxVal);
-
+
// SDD
AliEveITSModule::fgSDDPalette->SetLimits(0, DI.fSDDHighLim);
AliEveITSModule::fgSDDPalette->SetMinMax(DI.fSDDMinVal, DI.fSDDMaxVal);
printf("%d digits in cell scaleX = %d, scaleZ = %d \n", sd->N, fNCx, fNCz);
Int_t il = 0;
- for(Int_t k=0; k<ndigits; k++)
+ for(Int_t k=0; k<ndigits; k++)
{
AliITSdigit *d = (AliITSdigit*) digits->UncheckedAt(k);
- if(d->GetCoord1()>=sd->min_i && d->GetCoord1()<=sd->max_i &&
- d->GetCoord2()>=sd->min_j && d->GetCoord2()<=sd->max_j)
+ if(d->GetCoord1()>=sd->min_i && d->GetCoord1()<=sd->max_i &&
+ d->GetCoord2()>=sd->min_j && d->GetCoord2()<=sd->max_j)
{
printf("%3d, %3d: %3d", d->GetCoord1(), d->GetCoord2(), d->GetSignal());
printf(" | ");
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSScaledModule_H
AliEveDigitScaleInfo& operator=(const AliEveDigitScaleInfo&); // Not implemented
protected:
- Int_t fScale;
+ Int_t fScale;
Int_t fStatType;
-
+
Bool_t fSyncPalette;
public:
AliEveDigitScaleInfo();
virtual ~AliEveDigitScaleInfo(){}
-
+
Int_t GetScale() { return fScale; }
void ScaleChanged(Int_t s);
ScaledDigit();
ScaledDigit(Int_t di, Int_t dj);
-
+
virtual void Dump() const;
-};
+};
/**************************************************************************/
// AliEveITSScaledModule
{
friend class ITSSDSubEditor;
private:
- map<Int_t, ScaledDigit> fDigitsMap;
-
+ map<Int_t, ScaledDigit> fDigitsMap;
+
AliEveITSScaledModule(const AliEveITSScaledModule&); // Not implemented
AliEveITSScaledModule& operator=(const AliEveITSScaledModule&); // Not implemented
protected:
- Int_t fNx; // per module
+ Int_t fNx; // per module
Int_t fNz;
Int_t fNCx; // per cell
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveITSScaledModuleEditor.h"
//______________________________________________________________________
-// AliEveITSScaledModuleEditor
+// AliEveITSScaledModuleEditor
//
ClassImp(AliEveITSScaledModuleEditor)
fInfoFrame(0),
- fModule(0),
+ fModule(0),
fScale(0),
fStatistic(0),
f->AddFrame(fScale, new TGLayoutHints(kLHintsLeft, 1, 7, 1, 1));
fScale->Associate(f);
fScale->Connect("ValueSet(Long_t)", "AliEveITSScaledModuleEditor", this, "DoScale()");
-
+
TGLabel* lab = new TGLabel(f, "Statistic:");
f->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 2, 1, 2));
fStatistic = new TGComboBox(f);
void AliEveITSScaledModuleEditor::CreateInfoFrame()
{
fInfoFrame = CreateEditorTabSubFrame("Info");
- TGCompositeFrame *title1 = new TGCompositeFrame(fInfoFrame, 145, 10,
- kHorizontalFrame |
- kLHintsExpandX |
- kFixedWidth |
+ TGCompositeFrame *title1 = new TGCompositeFrame(fInfoFrame, 145, 10,
+ kHorizontalFrame |
+ kLHintsExpandX |
+ kFixedWidth |
kOwnBackground);
- title1->AddFrame(new TGLabel(title1, "ScaledDigits Info"),
+ title1->AddFrame(new TGLabel(title1, "ScaledDigits Info"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
title1->AddFrame(new TGHorizontal3DLine(title1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
void AliEveITSScaledModuleEditor::SetModel(TObject* obj)
{
- fModule = dynamic_cast<AliEveITSScaledModule*>(obj);
+ fModule = dynamic_cast<AliEveITSScaledModule*>(obj);
// widgets
fScale->SetIntNumber(fModule->GetScaleInfo()->GetScale());
fStatistic->Select(fModule->GetScaleInfo()->GetStatType(), kFALSE);
- // text info
+ // text info
Int_t cnx, cnz, total;
fModule->GetScaleData(cnx, cnz, total);
fInfoLabel0->SetText(Form("Cell size: Nx=%d Nz=%d", cnx, cnz));
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_ITSScaledModuleEditor_H
AliEveITSScaledModule* fModule; // fModel dynamic-casted to AliEveITSScaledModuleEditor
TGNumberEntry* fScale;
- TGComboBox* fStatistic;
+ TGComboBox* fStatistic;
TGLabel* fInfoLabel0;
TGLabel* fInfoLabel1;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveJetPlane.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_JetPlane_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveJetPlaneEditor.h"
}
void AliEveJetPlaneEditor::DoStaticDataWindow()
-{
+{
printf("\n Soon available ... \n");
if (fgStaticWindow == 0)
fgStaticWindow = new StaticDataWindow(gClient->GetRoot(), this, 400, 200);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_JetPlaneEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveJetPlaneGL.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_JetPlaneGL_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveKineTools.h"
while(iter != cont->EndChildren())
{
- TEveTrack* track = dynamic_cast<TEveTrack*>(*iter);
+ TEveTrack* track = dynamic_cast<TEveTrack*>(*iter);
TParticle* p = stack->Particle(track->GetLabel());
if(p->GetNDaughters()) {
Int_t d0 = p->GetDaughter(0), d1 = p->GetDaughter(1);
- for(int d=d0; d>0 && d<=d1; ++d)
- {
+ for(int d=d0; d>0 && d<=d1; ++d)
+ {
TParticle* dp = stack->Particle(d);
TEvePathMark* pm = new TEvePathMark(TEvePathMark::kDaughter);
pm->fV.Set(dp->Vx(), dp->Vy(), dp->Vz());
- pm->fP.Set(dp->Px(), dp->Py(), dp->Pz());
+ pm->fP.Set(dp->Px(), dp->Py(), dp->Pz());
pm->fTime = dp->T();
track->AddPathMark(pm);
}
{
TEveElement::List_i citer = cont->BeginChildren();
while(citer != cont->EndChildren())
- {
- TEveTrack* track = dynamic_cast<TEveTrack*>(*citer);
+ {
+ TEveTrack* track = dynamic_cast<TEveTrack*>(*citer);
tracks[track->GetLabel()] = track;
if (recurse)
slurp_tracks(tracks, track, recurse);
// Fill map
map<Int_t, TEveTrack*> tracks;
slurp_tracks(tracks, cont, recurse);
-
+
Int_t nPrimaries = (Int_t) treeTR->GetEntries();
TIter next(treeTR->GetListOfBranches());
TBranchElement* el;
TClonesArray* arr = 0;
el->SetAddress(&arr);
- for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++)
+ for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++)
{
el->GetEntry(iPrimPart);
Int_t last_label = -1;
- map<Int_t, TEveTrack*>::iterator iter = tracks.end();
+ map<Int_t, TEveTrack*>::iterator iter = tracks.end();
Int_t Nent = arr->GetEntriesFast();
- for (Int_t iTrackRef = 0; iTrackRef < Nent; iTrackRef++)
+ for (Int_t iTrackRef = 0; iTrackRef < Nent; iTrackRef++)
{
AliTrackReference* atr = (AliTrackReference*)arr->UncheckedAt(iTrackRef);
if (label < 0)
throw(eH + Form("negative label for entry %d in branch %s.",
iTrackRef, el->GetName()));
-
+
if(label != last_label) {
iter = tracks.find(label);
last_label = label;
if (iter != tracks.end()) {
TEvePathMark* pm = new TEvePathMark(isRef ? TEvePathMark::kReference : TEvePathMark::kDecay);
pm->fV.Set(atr->X(),atr->Y(), atr->Z());
- pm->fP.Set(atr->Px(),atr->Py(), atr->Pz());
+ pm->fP.Set(atr->Px(),atr->Py(), atr->Pz());
pm->fTime = atr->GetTime();
TEveTrack* track = iter->second;
track->AddPathMark(pm);
}
- } // loop track refs
+ } // loop track refs
} // loop primaries, clones arrays
delete arr;
} // end loop through top branches
map<Int_t, TEveTrack*> tracks;
slurp_tracks(tracks, cont, recurse);
- // sort
+ // sort
for(map<Int_t, TEveTrack*>::iterator j=tracks.begin(); j!=tracks.end(); ++j)
{
j->second->SortPathMarksByTime();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
-// Tools for import of kinematics.
+// Tools for import of kinematics.
// Preliminary/minimal solution.
#ifndef ALIEVE_KineTools_H
public:
AliEveKineTools();
virtual ~AliEveKineTools(){}
-
+
// data from TreeTR
void SetDaughterPathMarks(TEveElement* cont, AliStack* stack, Bool_t recurse=kFALSE);
void SetTrackReferences (TEveElement* cont, TTree* treeTR=0, Bool_t recurse=kFALSE);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveMUONChamber.h"
#else
BBoxInit();
#endif
-
+
fBBox[0] = - 400.0;
fBBox[1] = + 400.0;
fBBox[2] = - 400.0;
for(Int_t i=0; i<6; ++i) { b3[i] = fBBox[i]; }
Float_t* b4 = fPointSet2.AssertBBox();
for(Int_t i=0; i<6; ++i) { b4[i] = fBBox[i]; }
-
+
}
//______________________________________________________________________
Int_t AliEveMUONChamber::ColorIndex(Int_t val) const
{
//
- // index color
+ // index color
//
if(val < fThreshold) val = fThreshold;
//______________________________________________________________________
AliEveMUONChamberData* AliEveMUONChamber::GetChamberData() const
{
-
+
return fMUONData ? fMUONData->GetChamberData(fChamberID) : 0;
}
fPointSet2.Reset();
AliEveMUONChamberData* data = GetChamberData();
-
+
Float_t *buffer;
Float_t x0, y0, z, w, h, clsq;
Int_t charge, cathode, nDigits, nClusters, nHits, oldSize, ic1, ic2;
Double_t clsX, clsY, clsZ;
Float_t hitX, hitY, hitZ;
-
+
if (data != 0) {
SetupColorArray();
// digits
nDigits = data->GetNDigits();
-
+
for (Int_t id = 0; id < nDigits; id++) {
buffer = data->GetDigitBuffer(id);
z = buffer[4];
charge = (Int_t)buffer[5];
cathode = (Int_t)buffer[6];
-
+
if (charge <= fThreshold) continue;
if (cathode == 0) {
fQuadSet1.AddQuad(x0, y0, z, w, h);
fQuadSet1.QuadColor(ColorIndex(charge));
-
+
}
if (cathode == 1) {
fQuadSet2.AddQuad(x0, y0, z, w, h);
fQuadSet2.QuadColor(ColorIndex(charge));
-
+
}
} // end digits loop
// clusters
-
+
nClusters = data->GetNClusters()/2; // only one cathode plane
oldSize = fPointSet1.GrowFor(nClusters);
ic1 = ic2 = 0;
clsX = (Double_t)buffer[0];
clsY = (Double_t)buffer[1];
clsZ = (Double_t)buffer[2];
- clsq = buffer[3];
+ clsq = buffer[3];
cathode = (Int_t)buffer[4];
if (cathode == 0) {
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONChamber_H
#define ALIEVE_MUONChamber_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveMUONChamberData.h"
sseg = (AliMpSectorSegmentation*)
AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,AliMp::kCath0);
sector = sseg->GetSector();
-
- position = sector->Position();
+
+ position = sector->Position();
dimension = sector->Dimensions(); // half length
-
+
locP[0] = position.Px();
locP[1] = position.Py();
locD[0] = dimension.Px() * 2.;
locD[1] = dimension.Py() * 2.;
-
+
locP[2] = 0.0;
locD[2] = 0.0;
- fgTransformer->Local2Global(detElemId,
- locP[0], locP[1], locP[2],
+ fgTransformer->Local2Global(detElemId,
+ locP[0], locP[1], locP[2],
gloP[0], gloP[1], gloP[2]);
-
+
fgTransformer->Local2Global(detElemId,
- locD[0], locD[1], locD[2],
+ locD[0], locD[1], locD[2],
gloD[0], gloD[1], gloD[2]);
-
- fFrameCoord[fNDetElem][0] = gloP[0];
- fFrameCoord[fNDetElem][1] = gloP[1];
- fFrameCoord[fNDetElem][2] = gloD[0];
- fFrameCoord[fNDetElem][3] = gloD[1];
+
+ fFrameCoord[fNDetElem][0] = gloP[0];
+ fFrameCoord[fNDetElem][1] = gloP[1];
+ fFrameCoord[fNDetElem][2] = gloD[0];
+ fFrameCoord[fNDetElem][3] = gloD[1];
fFrameCoord[fNDetElem][4] = gloP[2]; // Z position
fChamberBox[0] = TMath::Min(fChamberBox[0],gloP[0]-gloD[0]);
fChamberBox[3] = TMath::Max(fChamberBox[3],gloP[1]+gloD[1]);
fChamberBox[4] = TMath::Min(fChamberBox[4],gloP[2]);
fChamberBox[5] = TMath::Max(fChamberBox[5],gloP[2]);
-
+
} else {
// if (!fgSegmentation->HasDE(detElemId)) {
locP[2] = 0.0;
locD[2] = 0.0;
- fgTransformer->Local2Global(detElemId,
- locP[0], locP[1], locP[2],
+ fgTransformer->Local2Global(detElemId,
+ locP[0], locP[1], locP[2],
gloP[0], gloP[1], gloP[2]);
-
+
fgTransformer->Local2Global(detElemId,
- locD[0], locD[1], locD[2],
+ locD[0], locD[1], locD[2],
gloD[0], gloD[1], gloD[2]);
-
- fFrameCoord[fNDetElem][0] = gloP[0];
- fFrameCoord[fNDetElem][1] = gloP[1];
- fFrameCoord[fNDetElem][2] = gloD[0];
- fFrameCoord[fNDetElem][3] = gloD[1];
+
+ fFrameCoord[fNDetElem][0] = gloP[0];
+ fFrameCoord[fNDetElem][1] = gloP[1];
+ fFrameCoord[fNDetElem][2] = gloD[0];
+ fFrameCoord[fNDetElem][3] = gloD[1];
fFrameCoord[fNDetElem][4] = gloP[2]; // Z position
fChamberBox[0] = TMath::Min(fChamberBox[0],gloP[0]);
fChamberBox[3] = TMath::Max(fChamberBox[1],gloD[1]);
fChamberBox[4] = TMath::Min(fChamberBox[4],gloP[2]);
fChamberBox[5] = TMath::Max(fChamberBox[5],gloP[2]);
-
+
}
fNDetElem++;
->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode));
AliMpPad pad = vseg->PadByIndices(AliMpIntPair(ix,iy),kTRUE);
-
+
locP[0] = pad.Position().X();
locP[1] = pad.Position().Y();
locD[0] = pad.Dimensions().X();
locD[1] = pad.Dimensions().Y();
-
+
locP[2] = 0.0;
locD[2] = 0.0;
- fgTransformer->Local2Global(detElemId,
- locP[0], locP[1], locP[2],
+ fgTransformer->Local2Global(detElemId,
+ locP[0], locP[1], locP[2],
gloP[0], gloP[1], gloP[2]);
-
+
gloD[0] = locD[0];
gloD[1] = locD[1];
gloD[2] = gloP[2];
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONChamberData_H
#define ALIEVE_MUONChamberData_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveMUONChamberEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONChamberEditor_H
#define ALIEVE_MUONChamberEditor_H
AliEveMUONChamberEditor(const AliEveMUONChamberEditor&); // Not implemented
AliEveMUONChamberEditor& operator=(const AliEveMUONChamberEditor&); // Not implemented
-
+
protected:
AliEveMUONChamber* fM; // fModel dynamic-casted to AliEveMUONChamberEditor
public:
AliEveMUONChamberEditor(const TGWindow* p = 0,
- Int_t width = 170, Int_t height = 30,
- UInt_t options = kChildFrame,
+ Int_t width = 170, Int_t height = 30,
+ UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
-
+
virtual ~AliEveMUONChamberEditor();
virtual void SetModel(TObject* obj);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
//
if(SetModelCheckClass(obj, AliEveMUONChamber::Class())) {
-
+
fChamber = (AliEveMUONChamber*) fExternalObj;
fQS1.SetModel(&fChamber->fQuadSet1);
fQS2.SetModel(&fChamber->fQuadSet2);
fChamber->UpdateQuads();
fRTS = fChamber->fRTS;
}
-
+
Bool_t hasData = (fChamber->GetChamberData() != 0);
-
+
if(hasData) {
DrawQuads(rnrCtx);
DrawPoints();
-
+
}
DrawChamberFrame();
glLineWidth(1.0);
glColor3f(1.0,1.0,1.0);
-
+
glBegin(GL_LINES);
-
+
// clusters
Int_t clsSize = fChamber->fClusterSize;
if (clsSize > 1) {
for (Int_t i = 0; i < fChamber->fPointSet1.GetN(); i++) {
-
+
fChamber->fPointSet1.GetPoint(i,x,y,z);
glVertex3f(x-clsSize,y+clsSize,z);
glVertex3f(x+clsSize,y-clsSize,z);
-
+
glVertex3f(x-clsSize,y-clsSize,z);
glVertex3f(x+clsSize,y+clsSize,z);
-
+
}
-
+
}
// hits
if (hitSize > 1) {
for (Int_t i = 0; i < fChamber->fPointSet2.GetN(); i++) {
-
+
fChamber->fPointSet2.GetPoint(i,x,y,z);
-
+
glVertex3f(x-hitSize,y,z);
glVertex3f(x+hitSize,y,z);
-
+
glVertex3f(x,y-hitSize,z);
glVertex3f(x,y+hitSize,z);
-
+
}
-
+
}
glEnd();
-
+
}
//______________________________________________________________________
{
//
// draw the chamber frame as GL_LINE_LOOP
- //
+ //
AliEveMUONChamberData* chamberData = fChamber->GetChamberData();
Int_t nDetElem = chamberData->GetNDetElem();
pix[3] = 255;
glColor4ubv(pix);
-
+
for (Int_t id = 0; id < nDetElem; id++) {
frameCoord = chamberData->GetFrameCoord(id);
xRad = frameCoord[2];
yRad = frameCoord[3];
z = frameCoord[4];
-
+
xRad += 0.0;
yRad += 0.0;
glBegin(GL_LINE_LOOP);
glVertex3f(xOrig,yOrig,z);
-
+
Int_t nstep = 100;
Float_t dstep = TMath::Pi()/2.0 / (Float_t)nstep;
Float_t d;
glVertex3f(x,y,z);
}
-
+
glVertex3f(xOrig,yOrig,z);
glEnd();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONChamberGL_H
#define ALIEVE_MUONChamberGL_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
//
// Sources:
//
// Constructor
//
-
+
for (Int_t i = 0; i < 256; i++) {
fTrackList[i] = -1;
}
//______________________________________________________________________
void AliEveMUONData::CreateChamber(Int_t chamber)
{
- //
+ //
// create data for the chamber with id=chamber (0 to 13)
//
//______________________________________________________________________
void AliEveMUONData::DropAllChambers()
{
- //
- // release data from all chambers
+ //
+ // release data from all chambers
//
for (Int_t c = 0; c < 14; ++c) {
AliMUONVClusterStore *clusterStore = AliMUONVClusterStore::Create(*tree);
clusterStore->Clear();
clusterStore->Connect(*tree,kFALSE);
-
+
tree->GetEvent(0);
-
+
AliMUONVCluster *cluster;
Int_t detElemId;
Double_t clsX, clsY, clsZ, charge;
for (Int_t ch = 0; ch < 10; ++ch) {
if (fChambers[ch] == 0) continue;
-
+
TIter next(clusterStore->CreateChamberIterator(ch,ch));
-
+
while ( ( cluster = static_cast<AliMUONVCluster*>(next()) ) ) {
detElemId = cluster->GetDetElemId();
-
+
clsX = cluster->GetX();
clsY = cluster->GetY();
clsZ = cluster->GetZ();
}
delete clusterStore;
-
+
}
//______________________________________________________________________
//______________________________________________________________________
void AliEveMUONData::LoadDigits(TTree* tree)
{
- //
+ //
// load digits from the TreeD
//
AliMUONVDigit* digit;
TIter next(digitStore->CreateIterator());
-
+
Int_t cathode, detElemId, ix, iy, charge, chamber, adc;
-
+
while ( ( digit = static_cast<AliMUONVDigit*>(next() ) ) )
{
cathode = digit->Cathode();
ix = digit->PadX();
iy = digit->PadY();
- detElemId = digit->DetElemId();
+ detElemId = digit->DetElemId();
charge = (Int_t)digit->Charge();
adc = digit->ADC();
chamber = detElemId/100 - 1;
fChambers[chamber]->RegisterDigit(detElemId,cathode,ix,iy,adc);
}
}
-
+
delete digitStore;
}
fgRawReader = new AliRawReaderDate(fileName); // DATE file
}
}
-
+
fgRawReader->RewindEvents();
fgRawReader->Reset();
Int_t iEvent = 0;
- while (fgRawReader->NextEvent())
+ while (fgRawReader->NextEvent())
{
- if (iEvent != gEvent->GetEventId())
+ if (iEvent != gEvent->GetEventId())
{
iEvent++;
continue;
digitMaker.SetMakeTriggerDigits(kTRUE);
AliMUONDigitStoreV1 digitStore;
-
+
digitMaker.Raw2Digits(fgRawReader,&digitStore);
AliMUONVDigit* digit;
TIter next(digitStore.CreateIterator());
-
+
Int_t cathode, detElemId, ix, iy, charge, chamber, adc;
-
+
while ( ( digit = static_cast<AliMUONVDigit*>(next() ) ) )
{
cathode = digit->Cathode();
ix = digit->PadX();
iy = digit->PadY();
- detElemId = digit->DetElemId();
+ detElemId = digit->DetElemId();
charge = (Int_t)digit->Charge();
adc = digit->ADC();
chamber = detElemId/100 - 1;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONData_H
#define ALIEVE_MUONData_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveMUONTrack.h"
cout << " MC track parameters at vertex" << endl;
cout << " -------------------------------------------------------------------------------------" << endl;
cout << " PDG code Vx Vy Vz Px Py Pz " << endl;
-
+
cout << " " <<
- setw(8) << setprecision(0) <<
- fPart->GetPdgCode() << " " <<
- setw(8) << setprecision(3) <<
- fPart->Vx() << " " <<
- setw(8) << setprecision(3) <<
- fPart->Vy() << " " <<
- setw(8) << setprecision(3) <<
- fPart->Vz() << " " <<
- setw(8) << setprecision(3) <<
- fPart->Px() << " " <<
- setw(8) << setprecision(3) <<
- fPart->Py() << " " <<
- setw(8) << setprecision(4) <<
- fPart->Pz() << " " <<
-
+ setw(8) << setprecision(0) <<
+ fPart->GetPdgCode() << " " <<
+ setw(8) << setprecision(3) <<
+ fPart->Vx() << " " <<
+ setw(8) << setprecision(3) <<
+ fPart->Vy() << " " <<
+ setw(8) << setprecision(3) <<
+ fPart->Vz() << " " <<
+ setw(8) << setprecision(3) <<
+ fPart->Px() << " " <<
+ setw(8) << setprecision(3) <<
+ fPart->Py() << " " <<
+ setw(8) << setprecision(4) <<
+ fPart->Pz() << " " <<
+
endl;
-
+
pt = TMath::Sqrt(fPart->Px()*fPart->Px()+fPart->Py()*fPart->Py());
p = TMath::Sqrt(fPart->Px()*fPart->Px()+fPart->Py()*fPart->Py()+fPart->Pz()*fPart->Pz());
-
+
cout << endl;
- cout << " Pt = " <<
+ cout << " Pt = " <<
setw(8) << setprecision(3) <<
pt << " GeV/c" << endl;
-
- cout << " P = " <<
+
+ cout << " P = " <<
setw(8) << setprecision(4) <<
p << " GeV/c" << endl;
-
+
}
//______________________________________________________________________
cout << endl;
cout << " Number of clusters " << fTrack->GetNClusters() << endl;
}
-
+
trackParamAtCluster = fTrack->GetTrackParamAtCluster();
nparam = trackParamAtCluster->GetEntries();
mtp = (AliMUONTrackParam*)trackParamAtCluster->At(i);
- cout <<
- setw(9)<< setprecision(3) <<
- i << " " <<
+ cout <<
+ setw(9)<< setprecision(3) <<
+ i << " " <<
- setw(8) << setprecision(3) <<
- mtp->GetInverseBendingMomentum() << " " <<
+ setw(8) << setprecision(3) <<
+ mtp->GetInverseBendingMomentum() << " " <<
setw(8) << setprecision(3) <<
- mtp->GetBendingSlope()*RADDEG << " " <<
+ mtp->GetBendingSlope()*RADDEG << " " <<
setw(8) << setprecision(3) <<
- mtp->GetNonBendingSlope()*RADDEG << " " <<
+ mtp->GetNonBendingSlope()*RADDEG << " " <<
setw(8) << setprecision(4) <<
- mtp->GetBendingCoor() << " " <<
+ mtp->GetBendingCoor() << " " <<
setw(8) << setprecision(4) <<
- mtp->GetNonBendingCoor() << " " <<
+ mtp->GetNonBendingCoor() << " " <<
setw(10) << setprecision(6) <<
- mtp->GetZ() << " " <<
+ mtp->GetZ() << " " <<
setw(8) << setprecision(4) <<
- mtp->Px() << " " <<
+ mtp->Px() << " " <<
setw(8) << setprecision(4) <<
- mtp->Py() << " " <<
+ mtp->Py() << " " <<
setw(8) << setprecision(4) <<
- mtp->Pz() << " " <<
+ mtp->Pz() << " " <<
setw(8) << setprecision(4) <<
- mtp->P() << " " <<
+ mtp->P() << " " <<
endl;
if (zc < 0.001) zc = 0.0;
cout << " " <<
- setw(8) << setprecision(3) <<
- mtp->GetInverseBendingMomentum() << " " <<
-
setw(8) << setprecision(3) <<
- mtp->GetBendingSlope()*RADDEG << " " <<
-
+ mtp->GetInverseBendingMomentum() << " " <<
+
+ setw(8) << setprecision(3) <<
+ mtp->GetBendingSlope()*RADDEG << " " <<
+
setw(8) << setprecision(3) <<
- mtp->GetNonBendingSlope()*RADDEG << " " <<
-
+ mtp->GetNonBendingSlope()*RADDEG << " " <<
+
setw(8) << setprecision(4) <<
- bc << " " <<
-
+ bc << " " <<
+
setw(8) << setprecision(4) <<
- nbc << " " <<
-
+ nbc << " " <<
+
setw(10) << setprecision(6) <<
- zc << " " <<
-
+ zc << " " <<
+
setw(8) << setprecision(4) <<
- mtp->Px() << " " <<
-
+ mtp->Px() << " " <<
+
setw(8) << setprecision(4) <<
- mtp->Py() << " " <<
-
+ mtp->Py() << " " <<
+
setw(8) << setprecision(4) <<
- mtp->Pz() << " " <<
-
+ mtp->Pz() << " " <<
+
setw(8) << setprecision(4) <<
- mtp->P() << " " <<
-
+ mtp->P() << " " <<
+
endl;
-
+
pt = TMath::Sqrt(mtp->Px()*mtp->Px()+mtp->Py()*mtp->Py());
cout << endl;
- cout << " Pt = " <<
+ cout << " Pt = " <<
setw(8) << setprecision(3) <<
pt << " GeV/c" << endl;
cout << " ESD muon track " << endl;
cout << " -----------------------------------------------------------------------------------------------------------" << endl;
cout << " InvBendMom BendSlope NonBendSlope BendCoord NonBendCoord Z Px Py Pz" << endl;
-
- cout << " " <<
-
- setw(8) << setprecision(4) <<
- mtp->GetInverseBendingMomentum() << " " <<
-
+
+ cout << " " <<
+
+ setw(8) << setprecision(4) <<
+ mtp->GetInverseBendingMomentum() << " " <<
+
setw(8) << setprecision(3) <<
- mtp->GetBendingSlope()*RADDEG << " " <<
-
+ mtp->GetBendingSlope()*RADDEG << " " <<
+
setw(8) << setprecision(3) <<
- mtp->GetNonBendingSlope()*RADDEG << " " <<
-
+ mtp->GetNonBendingSlope()*RADDEG << " " <<
+
setw(8) << setprecision(4) <<
- mtp->GetBendingCoor() << " " <<
-
+ mtp->GetBendingCoor() << " " <<
+
setw(8) << setprecision(4) <<
- mtp->GetNonBendingCoor() << " " <<
-
+ mtp->GetNonBendingCoor() << " " <<
+
setw(10) << setprecision(6) <<
- mtp->GetZ() << " " <<
-
+ mtp->GetZ() << " " <<
+
setw(8) << setprecision(3) <<
- mtp->Px() << " " <<
-
+ mtp->Px() << " " <<
+
setw(8) << setprecision(3) <<
- mtp->Py() << " " <<
-
+ mtp->Py() << " " <<
+
setw(8) << setprecision(3) <<
- mtp->Pz() << " " <<
-
+ mtp->Pz() << " " <<
+
endl;
-
+
pt = TMath::Sqrt(mtp->Px()*mtp->Px()+mtp->Py()*mtp->Py());
-
+
cout << endl;
- cout << " Pt = " <<
+ cout << " Pt = " <<
setw(8) << setprecision(3) <<
pt << " GeV/c" << endl;
-
- cout << " P = " <<
+
+ cout << " P = " <<
setw(8) << setprecision(4) <<
mtp->P() << " GeV/c" << endl;
-
+
AliESDEvent* esd = AliEveEventManager::AssertESD();
-
+
Double_t spdVertexX = 0;
Double_t spdVertexY = 0;
Double_t spdVertexZ = 0;
spdVertexY = spdVertex->GetYv();
spdVertexX = spdVertex->GetXv();
}
-
+
AliESDVertex* esdVertex = (AliESDVertex*) esd->GetPrimaryVertex();
if (esdVertex->GetNContributors()) {
esdVertexZ = esdVertex->GetZv();
esdVertexY = esdVertex->GetYv();
esdVertexX = esdVertex->GetXv();
}
-
+
Float_t t0v = esd->GetT0zVertex();
-
+
cout << endl;
cout << endl;
- cout << "External vertex SPD: " <<
+ cout << "External vertex SPD: " <<
setw(3) <<
spdVertex->GetNContributors() << " " <<
setw(8) << setprecision(3) <<
spdVertexX << " " <<
spdVertexY << " " <<
spdVertexZ << " " << endl;
- cout << "External vertex ESD: " <<
+ cout << "External vertex ESD: " <<
setw(3) <<
esdVertex->GetNContributors() << " " <<
setw(8) << setprecision(3) <<
esdVertexX << " " <<
esdVertexY << " " <<
esdVertexZ << " " << endl;
- cout << "External vertex T0: " <<
+ cout << "External vertex T0: " <<
setw(8) << setprecision(3) <<
t0v << " " << endl;
-
+
}
//______________________________________________________________________
if (fIsMCTrack) {
PrintMCTrackInfo();
}
-
+
if (fIsMUONTrack || fIsRefTrack) {
PrintMUONTrackInfo();
}
-
+
if (fIsESDTrack) {
PrintESDTrackInfo();
}
if (fIsMUONTriggerTrack) {
PrintMUONTriggerTrackInfo();
}
-
+
cout << endl;
cout << endl;
cout << endl;
cout << endl;
cout << "#########################################################################################################################<<<<<" << endl;
cout << endl;
-
+
}
}
Float_t xr[28], yr[28], zr[28];
Float_t xrc[28], yrc[28], zrc[28];
char form[1000];
-
+
TMatrixD smatrix(2,2);
TMatrixD sums(2,1);
TMatrixD res(2,1);
Float_t xRec, xRec0;
Float_t yRec, yRec0;
Float_t zRec, zRec0;
-
+
// middle z between the two detector planes of the trigger chambers
Float_t zg[4] = { -1603.5, -1620.5, -1703.5, -1720.5 };
SetName(form);
SetLineStyle(1);
}
-
- AliMUONTrackParam *trackParam = mtrack->GetTrackParamAtVertex();
+
+ AliMUONTrackParam *trackParam = mtrack->GetTrackParamAtVertex();
xRec0 = trackParam->GetNonBendingCoor();
yRec0 = trackParam->GetBendingCoor();
zRec0 = trackParam->GetZ();
-
+
if (fIsMUONTrack) {
SetPoint(fCount,xRec0,yRec0,zRec0);
fCount++;
}
for (Int_t i = 0; i < 28; i++) xr[i]=yr[i]=zr[i]=0.0;
-
+
Int_t nTrackHits = mtrack->GetNClusters();
-
+
Bool_t hitChamber[14] = {kFALSE};
Int_t iCha;
TClonesArray* trackParamAtCluster = mtrack->GetTrackParamAtCluster();
for (Int_t iHit = 0; iHit < nTrackHits; iHit++){
- trackParam = (AliMUONTrackParam*) trackParamAtCluster->At(iHit);
-
+ trackParam = (AliMUONTrackParam*) trackParamAtCluster->At(iHit);
+
if (iHit == 0) {
if (IsMUONTrack()) {
pt = TMath::Sqrt(trackParam->Px()*trackParam->Px()+trackParam->Py()*trackParam->Py());
xRec = trackParam->GetNonBendingCoor();
yRec = trackParam->GetBendingCoor();
zRec = trackParam->GetZ();
-
+
iCha = AliMUONConstants::ChamberNumber(zRec);
-
+
xr[iHit] = xRec;
yr[iHit] = yRec;
zr[iHit] = zRec;
fCount++;
}
}
-
+
if (!fIsMUONTrack) return;
Int_t nrc = 0;
if (mtrack->GetMatchTrigger() && 1) {
-
+
for (Int_t i = 0; i < nTrackHits; i++) {
if (TMath::Abs(zr[i]) > 1000.0) {
//printf("TEveHit %d x %f y %f z %f \n",iHit,xr[i],yr[i],zr[i]);
nrc++;
}
}
-
+
if (nrc < 2) return;
-
+
// fit x-z
smatrix.Zero();
sums.Zero();
res = smatrix.Invert() * sums;
ax = res(0,0);
bx = res(1,0);
-
+
// fit y-z
smatrix.Zero();
sums.Zero();
res = smatrix.Invert() * sums;
ay = res(0,0);
by = res(1,0);
-
+
Float_t xtc, ytc, ztc;
for (Int_t ii = 0; ii < 4; ii++) {
-
+
ztc = zg[ii];
ytc = ay+by*zg[ii];
xtc = ax+bx*zg[ii];
-
+
//printf("tc: x %f y %f z %f \n",xtc,ytc,ztc);
-
+
SetPoint(fCount,xtc,ytc,ztc);
fCount++;
-
+
}
-
+
} // end match trigger
}
pv[1] = trackParam.Py();
pv[2] = trackParam.Pz();
fP.Set(pv);
-
+
vect[0] = trackParam.GetNonBendingCoor();
vect[1] = trackParam.GetBendingCoor();
vect[2] = trackParam.GetZ();
TParticlePDG *ppdg = fPart->GetPDG(1);
Int_t charge = (Int_t)(ppdg->Charge()/3.0);
-
+
Double_t zMax = -1750.0;
Double_t rMax = 350.0;
Double_t r = 0.0;
trackParamAtCluster = fTrack->GetTrackParamAtCluster();
if (IsMUONTrack()) {
- trackParam = (AliMUONTrackParam*)trackParamAtCluster->At(i1);
+ trackParam = (AliMUONTrackParam*)trackParamAtCluster->At(i1);
charge = (Int_t)TMath::Sign(1.0,trackParam->GetInverseBendingMomentum());
}
if (IsRefTrack()) {
trackParam = fTrack->GetTrackParamAtVertex();
charge = (Int_t)TMath::Sign(1.0,trackParam->GetInverseBendingMomentum());
- trackParam = (AliMUONTrackParam*)trackParamAtCluster->At(i1);
+ trackParam = (AliMUONTrackParam*)trackParamAtCluster->At(i1);
}
-
+
vect[0] = xr[i1];
vect[1] = yr[i1];
vect[2] = zr[i1];
vect[i] = vout[i];
}
}
-
+
}
//______________________________________________________________________
void AliEveMUONTrack::GetField(Double_t *position, Double_t *field)
{
- //
+ //
// returns field components at position, for a give field map
//
field[0] = field[1] = field[2] = 0.0;
return;
}
-
+
// force components
//b[1] = 0.0;
//b[2] = 0.0;
}
//______________________________________________________________________
-void AliEveMUONTrack::OneStepRungekutta(Double_t charge, Double_t step,
+void AliEveMUONTrack::OneStepRungekutta(Double_t charge, Double_t step,
Double_t* vect, Double_t* vout)
{
/// ******************************************************************
Double_t g1, g2, g3, g4, g5, g6, ang2, dxt, dyt, dzt;
Double_t est, at, bt, ct, cba;
Double_t f1, f2, f3, f4, rho, tet, hnorm, hp, rho1, sint, cost;
-
+
Double_t x;
Double_t y;
Double_t z;
-
+
Double_t xt;
Double_t yt;
Double_t zt;
const Int_t kipx = 3;
const Int_t kipy = 4;
const Int_t kipz = 5;
-
+
// *.
// *. ------------------------------------------------------------------
// *.
Double_t h = step;
Double_t rest;
-
+
do {
rest = step - tl;
if (TMath::Abs(h) > TMath::Abs(rest)) h = rest;
h *= khalf;
continue;
}
-
+
xyzt[0] = xt;
xyzt[1] = yt;
xyzt[2] = zt;
h *= khalf;
continue;
}
-
+
xyzt[0] = xt;
xyzt[1] = yt;
xyzt[2] = zt;
if (iter++ > maxit) break;
tl += h;
- if (est < kdlt32)
+ if (est < kdlt32)
h *= 2.;
cba = 1./ TMath::Sqrt(a*a + b*b + c*c);
vout[0] = x;
f4 = TMath::Sqrt(f1*f1+f2*f2+f3*f3);
rho = -f4*pinv;
tet = rho * step;
-
+
hnorm = 1./f4;
f1 = f1*hnorm;
f2 = f2*hnorm;
hxp[0] = f2*vect[kipz] - f3*vect[kipy];
hxp[1] = f3*vect[kipx] - f1*vect[kipz];
hxp[2] = f1*vect[kipy] - f2*vect[kipx];
-
+
hp = f1*vect[kipx] + f2*vect[kipy] + f3*vect[kipz];
rho1 = 1./rho;
g4 = -cost;
g5 = sint;
g6 = cost * hp;
-
+
vout[kix] = vect[kix] + g1*vect[kipx] + g2*hxp[0] + g3*f1;
vout[kiy] = vect[kiy] + g1*vect[kipy] + g2*hxp[1] + g3*f2;
vout[kiz] = vect[kiz] + g1*vect[kipz] + g2*hxp[2] + g3*f3;
-
+
vout[kipx] = vect[kipx] + g4*vect[kipx] + g5*hxp[0] + g6*f1;
vout[kipy] = vect[kipy] + g4*vect[kipy] + g5*hxp[1] + g6*f2;
vout[kipz] = vect[kipz] + g4*vect[kipz] + g5*hxp[2] + g6*f3;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_MUONTrack_H
#define ALIEVE_MUONTrack_H
void MakeRefTrack(AliMUONTrack *mtrack);
void GetField(Double_t *position, Double_t *field);
void Propagate(Float_t *xr, Float_t *yr, Float_t *zr, Int_t i1, Int_t i2);
- void OneStepRungekutta(Double_t charge, Double_t step,
+ void OneStepRungekutta(Double_t charge, Double_t step,
Double_t* vect, Double_t* vout);
Int_t ColorIndex(Float_t val);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEvePMDModule.h"
{
TString smodule = "Module";
smodule+= ism;
-
+
Float_t xism =0, yism = 0;
Float_t dxism =0, dyism = 0;
Int_t xpad = 0, ypad = 0;
Float_t xpos, ypos;
- TClonesArray *digits = new TClonesArray("AliPMDdigit", 0);
+ TClonesArray *digits = new TClonesArray("AliPMDdigit", 0);
TBranch *branch = pmdt->GetBranch("PMDDigit");
branch->SetAddress(&digits);
AliPMDdigit *pmddigit;
- branch->GetEntry(ism);
+ branch->GetEntry(ism);
Int_t nentries = digits->GetLast();
//printf("%d\n", nentries);
for (Int_t ient = 0; ient < nentries+1; ient++)
{
pmddigit = (AliPMDdigit*)digits->UncheckedAt(ient);
-
+
det = pmddigit->GetDetector();
smn = pmddigit->GetSMNumber();
irow = pmddigit->GetRow();
xpad = irow;
ypad = icol;
}
-
+
RectGeomCellPos(smn, xpad, ypad, xpos, ypos);
AddHexagon(xpos, ypos, fgkZpos, fgkRad);
-
+
QuadValue(adc);
-
+
QuadId(new AliPMDdigit(*pmddigit));
// new TNamed(Form("Quad with idx=%d", ient),
// "This title is not confusing."));
for (Int_t ient = 0; ient < nentries; ient++)
{
AliPMDddldata *pmdddl = (AliPMDddldata*)ddlcont->UncheckedAt(ient);
-
+
det = pmdddl->GetDetector();
smn = pmdddl->GetSMN();
if (smn != ism) continue;
xpad = irow;
ypad = icol;
}
-
+
RectGeomCellPos(smn, xpad, ypad, xpos, ypos);
AddHexagon(xpos, ypos, fgkZpos, fgkRad);
-
+
QuadValue(adc);
-
+
QuadId(new AliPMDddldata(*pmdddl));
//new TNamed(Form("Quad with idx=%d", ient),
// "This title is not confusing."));
RefitPlex();
fHMTrans.SetPos(fX, fY, fZ);
-
+
}
// -------------------------------------------------------------------- //
void AliEvePMDModule::RectGeomCellPos(Int_t ism, Int_t xpad, Int_t ypad,
Float_t &xpos, Float_t &ypos)
{
- // This routine finds the cell eta,phi for the new PMD rectangular
+ // This routine finds the cell eta,phi for the new PMD rectangular
// geometry in ALICE
// Authors : Bedanga Mohanty and Dipak Mishra - 29.4.2003
// modified by B. K. Nandi for change of coordinate sys
//
// ism : Serial module number from 0 to 23 for each plane
-
+
// Corner positions (x,y) of the 24 unit moudles in ALICE PMD
const Double_t kXcorner[24] =
-8.9165, 33.7471, //Type-BR
};
-
+
const Double_t kYcorner[24] =
{
86.225, 86.225, 86.225, //Type-A
-35.925, -35.925 //Type-BR
};
-
+
// const Float_t kSqroot3 = 1.732050808; // sqrt(3.);
// const Float_t kCellRadius = 0.25;
-
+
//
//Every even row of cells is shifted and placed
//in geant so this condition
-8.9165, 33.7471, //Type-BR
};
-
+
const Double_t kYcorner[24] =
{
86.225, 86.225, 86.225, //Type-A
dxism = fgkRad*fgkSqRoot3*96.;
dyism = kDia*48. + fgkRad;
}
-
+
}
// -------------------------------------------------------------------- //
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_PMDModule_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEvePMDModuleEditor.h"
{
fInfoFrame = CreateEditorTabSubFrame("Info");
- TGCompositeFrame *title1 = new TGCompositeFrame(fInfoFrame, 145, 10,
- kHorizontalFrame |
- kLHintsExpandX |
- kFixedWidth |
+ TGCompositeFrame *title1 = new TGCompositeFrame(fInfoFrame, 145, 10,
+ kHorizontalFrame |
+ kLHintsExpandX |
+ kFixedWidth |
kOwnBackground);
- title1->AddFrame(new TGLabel(title1, "AliEvePMDModule Info"),
+ title1->AddFrame(new TGLabel(title1, "AliEvePMDModule Info"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
title1->AddFrame(new TGHorizontal3DLine(title1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_PMDModuleEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
//////////////////////////////////////////////////////////////////////////
// //
// The main AliEVE drawing module for the T0 detector //
// //
//////////////////////////////////////////////////////////////////////////
-
+
#include "AliEveEventManager.h"
#include "AliEveT0Module.h"
#include <TStyle.h>
#include <AliRawReaderRoot.h>
#include "AliT0RawReader.h"
#include <AliCDBManager.h>
-#include <AliCDBStorage.h>
+#include <AliCDBStorage.h>
//
// Default constructor
//
-
+
}
/**************************************************************************/
reader->RequireHeader(kTRUE);
AliT0RawReader *start = new AliT0RawReader(reader);
Int_t allData[110][5];
- TRandom r(0);
+ TRandom r(0);
// cout<<ievt<<endl;
TEveRGBAPalette* rawPalette = new TEveRGBAPalette(0, 3000);
rawPalette->SetLimits(1, 3000); // Set proper raw time range.
raw_a->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
TEveQuadSet* raw_c = new AliEveT0Module("T0_RAW_C", 3,digits, start); raw_c->SetPalette(rawPalette);
raw_c->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
- Float_t angle = 2 * TMath::Pi() / 12;
+ Float_t angle = 2 * TMath::Pi() / 12;
start->Next();
for (Int_t i=0; i<110; i++)
{
- for (Int_t iHit=0; iHit<5; iHit++)
+ for (Int_t iHit=0; iHit<5; iHit++)
{
allData[i][iHit]= start->GetData(i,iHit);
if (allData[i][iHit] != 0) cout<<"event"<<ievt<<" i "<< i<<" "<<allData[i][iHit] - allData[0][0]<<endl;
raw_a->RefitPlex();
raw_c->RefitPlex();
-
+
TEveTrans& ta_a = raw_a->RefHMTrans();
ta_a.SetPos(0, 0, 373);
TEveTrans& tc_c = raw_c->RefHMTrans();
/**************************************************************************/
void AliEveT0Module::MakeModules(AliT0digit *digits)
{
- TRandom r(0);
+ TRandom r(0);
TArrayI ADC(24);
TArrayI TDC(24);
-
+
digits->GetQT1(ADC);
digits->GetTimeCFD(TDC);
// printf("%3d\n",besttimeright);
qat->AddHexagon(x, y, r.Uniform(-0.1, 0.1), 1.0);
qat->QuadValue(TDC[i+12]);
// qat->QuadId(new TNamed(Form("Quad with idx=%d", i), "PMT's time in side A."));
-
+
qc->AddHexagon(x, y, r.Uniform(-0.1, 0.1), 1.0);
qc->QuadValue(ADC[i]);
// qc->QuadId(new TNamed(Form("Quad with idx=%d", i), "PMT's amplitude in side C."));
ta.SetPos(0, 0, 373);
TEveTrans& tc = qc->RefHMTrans();
tc.SetPos(0, 0, -69.7);
-
+
TEveTrans& tat = qat->RefHMTrans();
tat.SetPos(0, 0, 373);
TEveTrans& tct = qct->RefHMTrans();
tct.SetPos(0, 0, -69.7);
-
+
gEve->AddElement(qa);
gEve->AddElement(qc);
gEve->AddElement(qat);
printf(" idx=%d, amplitude=%d\n", idx, qb->fValue);
- }
+ }
if (fSigType == 1) {
printf("tdc====================\n");
-
+
Int_t besttimeright = fDigits->BestTimeA();
Int_t besttimeleft = fDigits->BestTimeC();
Int_t meantime = fDigits->MeanTime();
printf("besttimeC=%3d\n",fStart->GetData(52,0)-fStart->GetData(0,0));
printf("meantime=%3d\n",fStart->GetData(49,0)-fStart->GetData(0,0));
printf("amplitude= %3d\n",fStart->GetData(idx+1,0));
-
+
printf(" idx=%d, time %d\n", idx, qb->fValue);
}
if (fSigType == 3) {
printf("besttimeC=%3d\n",fStart->GetData(52,0)-fStart->GetData(0,0));
printf("meantime=%3d\n",fStart->GetData(49,0)-fStart->GetData(0,0));
printf("amplitude= %3d\n",fStart->GetData(idx+13,0));
-
+
printf(" idx=%d, time %d\n", idx, qb->fValue);
}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_T0Module_H
#define ALIEVE_T0Module_H
#include <AliT0digit.h>
#include <AliT0RawReader.h>
-
+
class AliEveT0Module : public TEveQuadSet
{
-
+
AliEveT0Module(const AliEveT0Module&);
AliEveT0Module& operator=(const AliEveT0Module&);
public:
-
+
AliEveT0Module(const Text_t* n="AliEveT0Module", Int_t sigType=0, AliT0digit *digits=0,AliT0RawReader *start=0);
virtual ~AliEveT0Module();
AliT0digit *fDigits;
AliT0RawReader *fStart;
- ClassDef(AliEveT0Module,1);
+ ClassDef(AliEveT0Module,1);
};
/*
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
//
// AliEveTOFDigitsInfo
ClassImp(AliEveTOFDigitsInfo)
- AliEveTOFDigitsInfo::AliEveTOFDigitsInfo():
+ AliEveTOFDigitsInfo::AliEveTOFDigitsInfo():
TObject(),
TEveRefCnt(),
fTree (0),
{}
/* ******************************************************* */
-AliEveTOFDigitsInfo:: ~AliEveTOFDigitsInfo()
+AliEveTOFDigitsInfo:: ~AliEveTOFDigitsInfo()
{
delete fGeom;
void AliEveTOFDigitsInfo::SetTree(TTree* tree)
{
static const TEveException eH("AliEveTOFDigitsInfo::SetTree ");
-
+
if(fGeom == 0) {
fGeom = new AliTOFGeometry();
}
-
+
fTree = tree;
/*
DecRefCount();
for (Int_t digitNumber=0; digitNumber<digitsTOF->GetEntries(); digitNumber++) {
//if (digitNumber==digitsTOF->GetEntries()-1) printf(" Hello 4 -> %3i digit of %i \n", digitNumber+1, digitsTOF->GetEntries());
-
+
digs = (AliTOFdigit*)digitsTOF->UncheckedAt(digitNumber);
vol[0] = digs->GetSector(); // Sector Number (0-17)
//Int_t nSector = 1;
Int_t vol[5] = {nSector,-1,-1,-1,-1};
-
+
for(Int_t iPlate=0; iPlate<fGeom->NPlates(); iPlate++){
vol[1] = iPlate;
if(iPlate==2) nStrips=15;
else nStrips=19;
-
+
for(Int_t iStrip=0; iStrip<nStrips; iStrip++){
vol[2] = iStrip;
-
+
for(Int_t iPadZ=0; iPadZ<fGeom->NpadZ(); iPadZ++){
vol[4] = iPadZ;
for (Int_t ii=0; ii<4; ii++) informations[ii]=-1;
for (Int_t ii=0; ii<3; ii++) dummy[ii]=-1;
for (Int_t ii=0; ii<3; ii++) nDigitsInVolume[ii]=-1;
-
+
}
}
}
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFDigitsInfo_H
#define ALIEVE_TOFDigitsInfo_H
#include <AliTOFGeometry.h>
#include <AliTOFDigitMap.h>
-
+
class AliEveTOFDigitsInfo : public TObject, public TEveRefCnt
{
AliEveTOFDigitsInfo(const AliEveTOFDigitsInfo&); // Not implemented
AliEveTOFDigitsInfo& operator=(const AliEveTOFDigitsInfo&); // Not implemented
-
+
private:
protected:
AliEveTOFDigitsInfo();
virtual ~AliEveTOFDigitsInfo();
-
+
void SetTree(TTree* tree);
void LoadDigits();
TClonesArray* GetDigits(Int_t nSector, Int_t nPlate, Int_t nStrip);
TClonesArray* GetDigits(Int_t nSector);
void GetDigits();
-
+
ClassDef(AliEveTOFDigitsInfo, 1);
}; // endclass AliEveTOFDigitsInfo
-
+
#endif
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTOFDigitsInfoEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFDigitsInfoEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTOFSector.h"
//fgTOFsectorPalette = new TEveRGBAPalette(0, 2048); // TOT
fgTOFsectorPalette = new TEveRGBAPalette(0, 8192/*1024*/); // TDC
- fgTOFsectorPalette->SetLimits(0, 8192);
+ fgTOFsectorPalette->SetLimits(0, 8192);
fgStaticInitDone = kTRUE;
}
//fFrame = fgTOFsectorFrameBox;
//fPalette = fgTOFsectorPalette;
- LoadQuads();
+ LoadQuads();
ComputeBBox();
SetTrans();
for (Int_t digitNumber=0; digitNumber<digitsTOFnew->GetEntries(); digitNumber++) {
//if (digitNumber==digitsTOF->GetEntries()-1) printf(" Hello 4 -> %3i digit of %i \n", digitNumber+1, digitsTOF->GetEntries());
-
+
digs = (AliTOFdigit*)digitsTOFnew->UncheckedAt(digitNumber);
if (digs->GetSector()!=fSectorID) continue;
for (Int_t ii=0; ii<fTOFarray->GetEntries(); ii++) {
tofDigit = (AliTOFdigit*)fTOFarray->UncheckedAt(ii);
-
+
if (fPlateFlag[tofDigit->GetPlate()]) {
vol[1] = tofDigit->GetPlate();
(Float_t)coord[1][0], (Float_t)coord[1][1], (Float_t)coord[1][2],
(Float_t)coord[2][0], (Float_t)coord[2][1], (Float_t)coord[2][2],
(Float_t)coord[3][0], (Float_t)coord[3][1], (Float_t)coord[3][2]};
-
+
AddQuad(vertices);
//AddQuad((Float_t*)coord);
//AddQuad(coord[0], coord[1], coord[2], 2.5, 3.5);
//QuadValue((Int_t)tot);
QuadValue((Int_t)tdc);
QuadId(tofDigit);
-
+
//}
} // closed if control on plates switched on
} // closed loop on TOF sector digits
RefitPlex();
fTOFarray = 0x0;
-
+
}
/* ************************************************************ */
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFSector_H
#define ALIEVE_TOFSector_H
#include <AliTOFGeometry.h>
-
+
class AliEveTOFSector : public TEveQuadSet
-
+
{
AliEveTOFSector(const AliEveTOFSector&); // Not implemented
AliEveTOFSector& operator=(const AliEveTOFSector&); // Not implemented
-
+
//Int_t fSectorID;
private:
void LoadQuads();
-
+
protected:
-
+
AliTOFGeometry *fTOFgeometry;
-
+
TClonesArray *fTOFarray;
TTree *fTOFtree;
-
+
Int_t fSector;
//Int_t fPlate;
//Int_t fStrip;
-
+
Float_t fDx;
Float_t fDy;
Float_t fDz;
///////////////////////////////
- Bool_t fAutoTrans;
- Int_t fMinTime;
+ Bool_t fAutoTrans;
+ Int_t fMinTime;
Int_t fMaxTime;
Short_t fThreshold;
Int_t fMaxVal;
- Int_t fSectorID;
+ Int_t fSectorID;
Bool_t *fPlateFlag;
Bool_t fPlateFlag0;
Bool_t fPlateFlag2;
Bool_t fPlateFlag3;
Bool_t fPlateFlag4;
-
+
Color_t fFrameColor;
Bool_t fRnrFrame;
-
+
TGeoManager *fGeoManager;
-
- public:
+
+ public:
// Bool_t fAutoTrans;
-
+
virtual void InitModule();
- virtual void SetTrans();
+ virtual void SetTrans();
AliEveTOFSector(const Text_t* n="AliEveTOFSector", const Text_t* t=0);
AliEveTOFSector(TGeoManager *localGeoManager, Int_t nSector);
-
+
AliEveTOFSector(TGeoManager *localGeoManager, Int_t nSector,
TClonesArray *tofArray);
AliEveTOFSector(TGeoManager *localGeoManager,
Int_t nSector, TTree *tofTree);
virtual ~AliEveTOFSector();
-
+
static Bool_t fgStaticInitDone;
static void InitStatics();
Int_t GetSectorID() const {return fSectorID;};
virtual void DigitSelected(Int_t idx);
///////////////////////////////////////////
-
+
void SetPlate(Int_t nPlate, Bool_t r);
static TEveFrameBox *fgTOFsectorFrameBox;
static TEveRGBAPalette *fgTOFsectorPalette;
ClassDef(AliEveTOFSector, 1);
- };
+ };
#endif
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTOFSectorEditor.h"
//
ClassImp(AliEveTOFSectorEditor)
-
+
AliEveTOFSectorEditor::AliEveTOFSectorEditor(const TGWindow *p, Int_t width, Int_t height,
UInt_t options, Pixel_t back) :
TGedFrame(p, width, height, options | kVerticalFrame, back),
// fTime (0)
// Initialize widget pointers to 0
//{
-
+
/*
fHMTrans = new TEveTransSubEditor(this);
fHMTrans->Connect("UseTrans()", "AliEveTPCSectorVizEditor", this, "Update()");
fHMTrans->Connect("TransChanged()", "AliEveTPCSectorVizEditor", this, "Update()");
AddFrame(fHMTrans, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
-
+
MakeTitle("AliEveTPCSectorViz");*/
{
-
+
fPlate = new TGCheckButton*[5];
for (Int_t ii=0; ii<5; ii++) fPlate[ii] = new TGCheckButton;
-
+
//fPriority = 40;
- MakeTitle("AliEveTOFSector");
+ MakeTitle("AliEveTOFSector");
fSectorID = new TEveGValuator(this, "SectorID", 110, 0);
fSectorID->SetLabelWidth(60);
fSectorID->AddFrame(fAutoTrans, new TGLayoutHints(kLHintsLeft, 12, 0, 1, 0));
fAutoTrans->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoAutoTrans()");
AddFrame(fSectorID, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
-
+
// Create widgets
// fXYZZ = new TGSomeWidget(this, ...);
// AddFrame(fXYZZ, new TGLayoutHints(...));
fThreshold->Connect("ValueSet(Double_t)",
"AliEveTOFSectorEditor", this, "DoThreshold()");
AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
-
+
fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
fMaxVal->SetNELength(4);
fMaxVal->SetLabelWidth(60);
fMaxVal->Connect("ValueSet(Double_t)",
"AliEveTOFSectorEditor", this, "DoMaxVal()");
AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
-
+
}
/**************************************************************************/
/*
void AliEveTOFSectorEditor::DoTime()
-{
+{
fM->SetMinTime((Int_t) fTime->GetMin());
fM->SetMaxTime((Int_t) fTime->GetMax());
Update();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFSectorEditor_H
class TEveGDoubleValuator;
class TEveTransSubEditor;
-
+
class AliEveTOFSector;
-
+
class AliEveTOFSectorEditor : public TGedFrame
{
//private:
protected:
AliEveTOFSector* fM; // fModel dynamic-casted to AliEveTOFSectorEditor
-
+
TEveGValuator* fSectorID;
-
+
TGCheckButton* fAutoTrans;
TGCheckButton** fPlate;
TGCheckButton* fPlate4;
TEveGValuator* fThreshold;
- TEveGValuator* fMaxVal;
+ TEveGValuator* fMaxVal;
// Declare widgets
// TGSomeWidget* fXYZZ;
-
+
public:
AliEveTOFSectorEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
virtual ~AliEveTOFSectorEditor();
-
+
virtual void SetModel(TObject* obj);
void DoSectorID();
- void DoAutoTrans();
+ void DoAutoTrans();
void DoPlate0();
void DoPlate1();
void DoPlate2();
// Declare callback/slot methods
// void DoXYZZ();
-
+
ClassDef(AliEveTOFSectorEditor, 0); // Editor for AliEveTOFSector
}; // endclass AliEveTOFSectorEditor
-
+
#endif
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTOFStrip.h"
fDx(0), fDz(0),
fGeoManager(localGeoManager)
{
-
+
//if (!fGeoManager) printf("ERROR: no TGeo\n");
InitModule();
//fFrame = fgTOFstripFrameBox;
//fPalette = fgTOFstripPalette;
- LoadQuads();
+ LoadQuads();
ComputeBBox();
SetTrans();
}
RefitPlex();
-
+
}
/* ************************************************************ */
fGeoManager->cd(path);
TGeoHMatrix global = *fGeoManager->GetCurrentMatrix();
Double_t *rotMat = global.GetRotationMatrix();
-
+
/*
// ok till 19 April 2007
fHMTrans.SetBaseVec(1, rotMat[0], rotMat[1], rotMat[2]);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFStrip_H
#define ALIEVE_TOFStrip_H
private:
void LoadQuads();
-
+
protected:
virtual void InitModule();
virtual void SetTrans();
static TEveRGBAPalette* fgTOFstripPalette;
ClassDef(AliEveTOFStrip, 1);
-};
+};
#endif
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTOFStripEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TOFStripEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCData.h"
// load time: use SetLoadThreshold(thresh) and SetLoadPedestal(ped).
//
// For raw-data (loaded using LoadRaw) pedestals can be calculated
-// automatically per pad. Use SetAutoPedestal(kTRUE) to activate it.
+// automatically per pad. Use SetAutoPedestal(kTRUE) to activate it.
// You might still want to set load threshold (default iz zero).
//
AliSimDigits digit, *digitPtr = &digit;
tree->GetBranch("Segment")->SetAddress(&digitPtr);
-
+
Int_t sector, row, pad, curPad;
Short_t time, signal;
Bool_t inFill = kFALSE;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCData_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCLoader.h"
fReader->Select("TPC");
fData->DropAllSectors();
- fData->LoadRaw(input, kTRUE, kTRUE);
+ fData->LoadRaw(input, kTRUE, kTRUE);
}
void AliEveTPCLoader::NextEvent(Bool_t rewindOnEnd)
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCLoader_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCLoaderEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCLoaderEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector2D.h"
buffer.fTransparency = 0;
fHMTrans.SetBuffer3D(buffer);
buffer.SetSectionsValid(TBuffer3D::kCore);
-
+
Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
if (reqSections == TBuffer3D::kNone) {
return;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector2D_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector2DEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector2DEditor_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector2DGL.h"
AliEveTPCSector2DGL::AliEveTPCSector2DGL() :
TGLObject(),
-
+
fSector (0),
fSectorData (0),
Int_t row, Int_t col_off) const
{
Int_t padVal;
- Int_t time, val;
+ Int_t time, val;
Int_t minTime = fSector->fMinTime;
Int_t maxTime = fSector->fMaxTime;
UChar_t* img_pos = GetRowCol(row, col_off);
while (iter.NextPad()) {
- padVal = 0;
+ padVal = 0;
while (iter.Next()) {
time = iter.Time();
Float_t u2 = u1 + (Float_t) seg.GetNMaxPads() / fgkTextureWidth;
Float_t v2 = v1 + (Float_t) seg.GetNRows() / fgkTextureHeight;
- glBegin(GL_QUADS);
+ glBegin(GL_QUADS);
glTexCoord2f(u1, v1); glVertex2f(-w, y1);
glTexCoord2f(u1, v2); glVertex2f(-w, y2);
glTexCoord2f(u2, v2); glVertex2f( w, y2);
glVertex2f(-s.GetNMaxPads()*s.GetPadWidth()/2, y);
}
-void AliEveTPCSector2DGL::TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s)
+void AliEveTPCSector2DGL::TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s)
{
Float_t x = s.GetNMaxPads()*s.GetPadWidth()/2;
Float_t y = s.GetRLow() + s.GetNRows()*s.GetPadHeight();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector2DGL_H
mutable UChar_t* fImage;
mutable UInt_t fTexture;
mutable UInt_t fRTS;
-
+
public:
AliEveTPCSector2DGL();
virtual ~AliEveTPCSector2DGL();
- virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
+ virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox();
virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
static const Int_t fgkTextureByteSize;
}; // endclass TPCSector2D_GL_Rnr
-
+
inline UChar_t* AliEveTPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
{
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector3D.h"
buffer.fTransparency = 0;
fHMTrans.SetBuffer3D(buffer);
buffer.SetSectionsValid(TBuffer3D::kCore);
-
+
Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
if (reqSections == TBuffer3D::kNone) {
return;
/**************************************************************************/
void AliEveTPCSector3D::LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
- Float_t xs, Float_t ys, Float_t pw, Float_t ph)
+ Float_t xs, Float_t ys, Float_t pw, Float_t ph)
{
Short_t pad, time, val;
Float_t x0, z0;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector3D_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector3DEditor.h"
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector3DEditor_H
public:
AliEveTPCSector3DEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
- UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+ UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
virtual ~AliEveTPCSector3DEditor();
virtual void SetModel(TObject* obj);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSector3DGL.h"
if(fRTS < fSector->fRTS) {
fSector->UpdateBoxes();
fRTS = fSector->fRTS;
- }
+ }
if (rnrCtx.SecSelection()) glPushName(0);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSector3DGL_H
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSectorData.h"
fgOut1Seg.fLastRow = fgOut1Seg.fFirstRow + fgOut1Seg.fNRows - 1;
fgOut1Seg.fNMaxPads = fgParam->GetNPadsUp(fgOut1Seg.fNRows - 1);
fgSegInfoPtrs[1] = &fgOut1Seg;
-
+
fgOut2Seg.fPadWidth = fgParam->GetOuterPadPitchWidth();
fgOut2Seg.fPadHeight = fgParam->GetOuter2PadPitchLength();
fgOut2Seg.fRLow = fgParam->GetPadRowRadiiUp(fgOut1Seg.fNRows);
}
}
fgInnSeg.fNYSteps = k;
- // Out1 seg
+ // Out1 seg
k=0; npads = fgParam->GetNPadsUp(0);
for (int row = 0; row < fgOut1Seg.fNRows; ++row) {
if (fgParam->GetNPadsUp(row) > npads) {
if(autoPedestal) {
Short_t array[1024];
Short_t* val;
- val = beg + 1;
+ val = beg + 1;
while(val <= end) {
array[(val-beg)/2] = *val;
val += 2;
- }
+ }
Short_t pedestal = TMath::Nint(TMath::Median((end-beg)/2, array));
val = beg + 1;
while(val <= end) {
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSectorData_H
Bool_t NextPad();
void ResetRow();
void ResetRow(const PadData* first, Short_t npads);
-
+
Short_t TEvePad() const { return fPad; }
void Test();
static const SegmentInfo& GetOut2Seg() { return fgOut2Seg; }
static const SegmentInfo& GetSeg(Int_t seg);
-
+
static void InitStatics();
protected:
void* fPadRowHackSet;
-
+
ClassDef(AliEveTPCSectorData, 0);
}; // endclass AliEveTPCSectorData
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSectorViz.h"
/**************************************************************************/
-void AliEveTPCSectorViz::SetAutoTrans(Bool_t trans)
+void AliEveTPCSectorViz::SetAutoTrans(Bool_t trans)
{
fAutoTrans = trans;
if(fAutoTrans) {
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSectorViz_H
#include <TEveElement.h>
#include <TEveTrans.h>
-#include <TNamed.h>
+#include <TNamed.h>
#include <TAtt3D.h>
#include <TAttBBox.h>
AliEveTPCSectorViz& operator=(const AliEveTPCSectorViz&); // Not implemented
protected:
- AliEveTPCData* fTPCData;
+ AliEveTPCData* fTPCData;
Int_t fSectorID;
- Int_t fMinTime;
+ Int_t fMinTime;
Int_t fMaxTime;
Short_t fThreshold;
Int_t fMaxVal;
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTPCSectorVizEditor.h"
/**************************************************************************/
void AliEveTPCSectorVizEditor::DoTime()
-{
+{
fM->SetMinTime((Int_t) fTime->GetMin());
fM->SetMaxTime((Int_t) fTime->GetMax());
Update();
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TPCSectorVizEditor_H
TGCheckButton* fRnrOut2;
TEveGValuator* fThreshold;
- TEveGValuator* fMaxVal;
+ TEveGValuator* fMaxVal;
TEveGDoubleValuator* fTime;
void DoMaxVal();
void DoTime();
-
+
ClassDef(AliEveTPCSectorVizEditor, 0); // Editor for AliEveTPCSectorViz
}; // endclass AliEveTPCSectorVizEditor
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTRDData.h"
#include "AliEveTRDModuleImp.h"
//________________________________________________________
void AliEveTRDDigits::SetData(AliTRDdigitsManager *digits)
{
-
+
fData.Allocate(fParent->rowMax, fParent->colMax, fParent->timeMax);
// digits->Expand();
for (Int_t row = 0; row < fParent->rowMax; row++)
TEveQuadSet::Reset(TEveQuadSet::kQT_FreeQuad, kTRUE, 64);
// MT fBoxes.fBoxes.clear();
-
+
Double_t colSize, rowSize, scale;
Double_t x, y, z;
Int_t charge;
Float_t t0;
Float_t timeBinSize;
-
+
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
Double_t cloc[4][3], cglo[3];
Int_t color, dimension;
for (Int_t row = 0; row < fParent->rowMax; row++) {
rowSize = .5 * fParent->fPadPlane->GetRowSize(row);
z = fParent->fPadPlane->GetRowPos(row) - rowSize;
-
+
for (Int_t col = 0; col < fParent->colMax; col++) {
colSize = .5 * fParent->fPadPlane->GetColSize(col);
y = fParent->fPadPlane->GetColPos(col) - colSize;
t0 = calibration->GetT0(fParent->fDet, col, row);
timeBinSize = calibration->GetVdrift(fParent->fDet, col, row)/fParent->samplingFrequency;
-
+
for (Int_t time = 0; time < fParent->timeMax; time++) {
charge = fData.GetDataUnchecked(row, col, time);
if (charge < fParent->GetDigitsThreshold()) continue;
-
+
x = fParent->fX0 - (time+0.5-t0)*timeBinSize;
scale = fParent->GetDigitsLog() ? TMath::Log(float(charge))/TMath::Log(1024.) : charge/1024.;
color = 50+int(scale*50.);
-
+
cloc[0][2] = z - rowSize * scale;
cloc[0][1] = y - colSize * scale;
cloc[0][0] = x;
-
+
cloc[1][2] = z - rowSize * scale;
cloc[1][1] = y + colSize * scale;
cloc[1][0] = x;
-
+
cloc[2][2] = z + rowSize * scale;
cloc[2][1] = y + colSize * scale;
cloc[2][0] = x;
-
+
cloc[3][2] = z + rowSize * scale;
cloc[3][1] = y - colSize * scale;
cloc[3][0] = x;
-
+
Float_t* p = 0;
if( fParent->GetDigitsBox()){
// MT fBoxes.fBoxes.push_back(Box());
{
fM = dynamic_cast<AliEveTRDDigits*>(obj);
fM->fParent->SpawnEditor();
-
+
// printf("Chamber %d", fM->fParent->GetID());
// for (Int_t row = 0; row < fM->fParent->GetRowMax(); row++)
// for (Int_t col = 0; col < fM->fParent->GetColMax(); col++)
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
/////////////////////////////////////////////////////////////////////////
//
// - AliEVE implementation -
-// Containers for visualisation of TRD data structures
+// Containers for visualisation of TRD data structures
// - AliEveTRDHits - visualisation of MC Hits, Clusters (RecPoints)
// - AliEveTRDDigits - visualisation of TRD digits
//
protected:
AliEveTRDChamber *fParent;
-
+
ClassDef(AliEveTRDHits,1) // Base class for TRD hits visualisation
};
AliEveTRDHits* fM;
ClassDef(AliEveTRDHitsEditor,1) // Editor for AliEveTRDHits
- };
+ };
class AliEveTRDDigits : public TEveQuadSet
protected:
AliEveTRDChamber *fParent;
-
+
private:
TEveBoxSet fBoxes;
AliTRDdataArrayI fData;
-
+
ClassDef(AliEveTRDDigits,1) // Digits visualisation for TRD
};
-
+
class AliEveTRDDigitsEditor : public TGedFrame
{
public:
AliEveTRDClusters(AliEveTRDChamber *p);
void PointSelected(Int_t n);
-
+
ClassDef(AliEveTRDClusters,1) // Base class for TRD clusters visualisation
};
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTRDLoader.h"
#include "AliEveTRDModuleImp.h"
//________________________________________________________
AliEveTRDLoader::AliEveTRDLoader(const Text_t* n, const Text_t* t) : TEveElementList(n, t), fSM(-1), fStack(-1), fLy(-1), fEvent(0)
-{
+{
kLoadHits = kFALSE;
kLoadDigits = kFALSE;
kLoadClusters = kFALSE;
fDir = ".";
fEvent = -1;
- fTRD = 0x0;
+ fTRD = 0x0;
fGeo = new AliTRDgeometry();
-
+
AliCDBManager *fCDBManager=AliCDBManager::Instance();
fCDBManager->SetDefaultStorage("local://$ALICE_ROOT");
fCDBManager->SetRun(0);
AliEveTRDChamber* AliEveTRDLoader::GetChamber(int d)
{
List_i ism, istack, ichmb;
-
+
ism = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(fGeo->GetSector(d)));
if(ism == fChildren.end()) return 0x0;
istack = find_if(((AliEveTRDNode*)(*ism))->begin(), ((AliEveTRDNode*)(*ism))->end(), ID<TEveElement*>(fGeo->GetChamber(d)));
fEvent = ev;
Unload();
-
+
TTree *t = 0x0;
TFile *f = new TFile(Form("%s/%s", fDir.Data(), fFilename.Data()));
if(! f->cd(Form("AliEveEventManager%d", ev))){
f->Close(); delete f;
return kFALSE;
}
-
+
if(kLoadDigits){
t = (TTree*)gDirectory->Get("TreeD");
if(!t) return kFALSE;
} else AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
f->Close(); delete f;
-
+
gEve->Redraw3D();
-
+
return kTRUE;
}
TObjArray *clusters = new TObjArray();
tC->SetBranchAddress("TRDcluster", &clusters);
- AliEveTRDChamber *chmb = 0x0;
+ AliEveTRDChamber *chmb = 0x0;
AliTRDcluster *c=0x0;
for(int idet=0; idet<540; idet++){
tC->GetEntry(idet);
Bool_t AliEveTRDLoader::LoadDigits(TTree *tD)
{
AliInfo("Loading ...");
-
+
if(!fChildren.size()) return kTRUE;
-
+
AliEveTRDChamber *chmb;
AliTRDdigitsManager dm;
dm.ReadDigits(tD);
TObjArray *tracks = new TObjArray();
tT->SetBranchAddress("TRDmcmTracklet",&tracks);
-
+
AliEveTRDChamber *chmb = 0x0;
AliTRDmcmTracklet *trk=0x0;
for(int idet=0; idet<540; idet++){
if(tracks->GetEntriesFast()) trk = (AliTRDmcmTracklet*)tracks->UncheckedAt(0);
if((chmb = GetChamber(trk->GetDetector()))) chmb->LoadTracklets(tracks);
}
-
+
return kTRUE;
}
-
+
//________________________________________________________
Bool_t AliEveTRDLoader::Open(const char *filename, const char *dir)
count += kLoadDigits ? 1 : 0;
count += kLoadClusters ? 1 : 0;
count += kLoadTracks ? 1 : 0;
-
+
TObjArray *so = fFilename.Tokenize(".");
if(((TObjString*)(*so)[0])->GetString().CompareTo("TRD") != 0){
AliError("Filename didn't fulfill naming conventions. No data will be loaded.");
return kFALSE;
}
-
+
return kTRUE;
}
AliEveTRDLoaderEditor::AliEveTRDLoaderEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options | kVerticalFrame, back)
{
MakeTitle("AliEveTRDLoader");
-
+
fFile = 0x0;
TGTextButton *fOpenFile = 0x0;
Int_t labelW = 42;
-
+
TGHorizontalFrame* f = new TGHorizontalFrame(this);
TGHorizontalFrame* g = new TGHorizontalFrame(f, labelW, 0, kFixedWidth);
TGLabel* l = new TGLabel(g, "File: ");
fFile->SetWidth(140);
fFile->Connect("DoubleClicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
f->AddFrame(fFile);
-
+
fOpenFile = new TGTextButton(f, "Browse");
f->AddFrame(fOpenFile);
fOpenFile->Connect("Clicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
AddFrame(f);
-
+
fEvent = new TEveGValuator(this, "AliEveEventManager:", 110, 0);
fEvent->SetShowSlider(kFALSE);
fEvent->SetLabelWidth(labelW);
// "Chamber(s) selector" group frame
TGGroupFrame *fGroupFrame1974 = new TGGroupFrame(this,"Chamber(s) selector");
TGVerticalFrame *fVerticalFrame1974 = new TGVerticalFrame(fGroupFrame1974, 150, 50,kVerticalFrame);
-
+
fSMNumber = new TEveGValuator(fVerticalFrame1974, "SM:", 0, 0);
fSMNumber->SetShowSlider(kFALSE);
fSMNumber->SetLabelWidth(labelW);
fPlaneNumber->SetToolTip("Plane id [-1 for all in this stack]");
fVerticalFrame1974->AddFrame(fPlaneNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
-
+
fGroupFrame1974->AddFrame(fVerticalFrame1974, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandY | kLHintsCenterX,2,2,2,2));
TGTextButton *fTextButton2037 = new TGTextButton(fGroupFrame1974,"Select");
fEvent->SetEnabled(kFile);
fEvent->GetEntry()->SetIntNumber(fM->fEvent);
-
+
fSMNumber->SetEnabled(kFile);
fSMNumber->GetEntry()->SetIntNumber(fM->fSM);
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#ifndef ALIEVE_TRDLoader_H
#define ALIEVE_TRDLoader_H
////////////////////////////////////////////////////////////////////////
// // - ALIEVE implementation -
-// Loader for the TRD detector - base class
+// Loader for the TRD detector - base class
// - AliEveTRDLoader - loader of TRD data (simulation + measured)
// - AliEveTRDLoaderEditor - UI
//
protected:
Bool_t kLoadHits, kLoadDigits, kLoadClusters, kLoadTracks;
Int_t fSM, fStack, fLy; // supermodule, stack, layer
- TString fFilename; // name of data file
+ TString fFilename; // name of data file
TString fDir; // data directory
Int_t fEvent; // current event to be displayed
-
+
AliTRDv1 *fTRD; // the TRD detector
AliTRDgeometry *fGeo; // the TRD geometry
-
+
ClassDef(AliEveTRDLoader, 1) // Alieve Loader class for the TRD detector
};
-
+
class AliEveTRDLoaderEditor : public TGedFrame
{
public:
virtual void Load();
virtual void SetEvent(Double_t ev){fM->fEvent = (Int_t)ev;}
virtual void SetModel(TObject* obj);
-
+
protected:
AliEveTRDLoader *fM;
TGTextEntry *fFile;
TEveGValuator *fEvent;
TEveGValuator *fSMNumber, *fStackNumber, *fPlaneNumber;
-
+
ClassDef(AliEveTRDLoaderEditor,1) // Editor for AliEveTRDLoader
};
-
+
#endif
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
- * full copyright notice. *
+ * full copyright notice. *
**************************************************************************/
#include "AliEveTRDLoaderImp.h"
#include "AliEveTRDModuleImp.h"
AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
return kFALSE;
}
-
+
fEvent = ev;
if(!fRunLoader){
}
fRunLoader->UnloadAll("TRD");
Unload();
-
+
if(fRunLoader->GetEvent(ev)) return kFALSE;
TTree *t = 0x0;