Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

GcrReconValsTool Class Reference

calculates Cal Mip values More...

Inheritance diagram for GcrReconValsTool:

Inheritance graph
[legend]
Collaboration diagram for GcrReconValsTool:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GcrReconValsTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~GcrReconValsTool ()
StatusCode initialize ()
StatusCode calculate ()

Private Attributes

double m_gcrRecon [NTOW *NLAY *NCOL]
float m_inferedZ

Static Private Attributes

const int NTOW = 16
const int NLAY = 8
const int NCOL = 12

Detailed Description

calculates Cal Mip values

Author:
C.Lavalley

Definition at line 62 of file GcrReconValsTool.cxx.


Constructor & Destructor Documentation

GcrReconValsTool::GcrReconValsTool const std::string &  type,
const std::string &  name,
const IInterface *  parent
 

Definition at line 91 of file GcrReconValsTool.cxx.

00094                : ValBase( type, name, parent )
00095 {    
00096     // Declare additional interface
00097     declareInterface<IValsTool>(this); 
00098 }

virtual GcrReconValsTool::~GcrReconValsTool  )  [inline, virtual]
 

Definition at line 69 of file GcrReconValsTool.cxx.

00069 { }


Member Function Documentation

StatusCode GcrReconValsTool::calculate  )  [virtual]
 

std::printf("%10.4f \n", p_gcrSelectedXtal->getPathLength()); fflush(stdout);

FOR DEBUG: DISPLAY m_gcrRecon int i; for(int itow=0; itow<NTOW;itow++) for (int ilay=0;ilay<NLAY;ilay++) for(int icol=0;icol<NCOL;icol++) { i=(itow*NLAY+ilay)*NCOL+icol; if(m_gcrRecon[i]>0) log << MSG::INFO << "m_gcrRecon["<<itow<<","<<icol<<","<<ilay <<"]= "<< m_gcrRecon[i] << endreq;

}

Reimplemented from ValBase.

Definition at line 119 of file GcrReconValsTool.cxx.

References m_gcrRecon, m_inferedZ, ValBase::m_pEventSvc, NCOL, NLAY, and NTOW.

00120 {
00121     StatusCode sc = StatusCode::SUCCESS;
00122 
00123     // Retrieve the calMipTrack collection   
00124 
00125     MsgStream log(msgSvc(), name());
00126     //log << MSG::INFO << "BEGIN calculate in GcrReconValsTool" << endreq;
00127     
00128     //INITIALISATION OF m_gcrRecon
00129     int j;
00130    for(int itow=0; itow<NTOW;itow++) 
00131       for (int ilay=0;ilay<NLAY;ilay++)
00132         for(int icol=0;icol<NCOL;icol++)
00133         {
00134           j=(itow*NLAY+ilay)*NCOL+icol;
00135           m_gcrRecon[j]=-1000;
00136     
00137         }
00138         
00139     
00140     SmartDataPtr<Event::GcrXtalCol> p_gcrXtalCol(m_pEventSvc, EventModel::CalRecon::GcrXtalCol); 
00141     m_inferedZ=-1000;
00142     if(p_gcrXtalCol){
00143             int i=0;
00144             int itow,ilay,icol;
00145             for(Event::GcrXtalCol::const_iterator gcrXtalIter=p_gcrXtalCol->begin(); gcrXtalIter != p_gcrXtalCol->end(); gcrXtalIter++)
00146             {
00147               Event::GcrXtal* p_gcrXtal = *gcrXtalIter;
00148               
00149               //Event::CalXtalRecData* xtalData = p_gcrSelectedXtal->getXtal();
00150               idents::CalXtalId xtalId = p_gcrXtal->getXtalId();
00151               itow = xtalId.getTower();
00152               ilay = xtalId.getLayer();
00153               icol = xtalId.getColumn();
00154 
00155               i=(itow*NLAY+ilay)*NCOL+icol;
00156               //log << MSG::INFO << "GcrSelValsTool::calculate p_gcrSelectedXtal->getInferedZ()=" <<  p_gcrSelectedXtal->getInferedZ()<< endreq;
00157               
00161               m_gcrRecon[i] = p_gcrXtal->getPathLength();
00162           
00163             }
00164 
00165     }
00166     else{
00167       log << MSG::INFO << "no gcrXtalCol found " << endreq;
00168       
00169       }
00182     //log << MSG::INFO << "END calculate in GcrReconValsTool End  " << endreq;
00183     return sc;
00184 }

StatusCode GcrReconValsTool::initialize  )  [virtual]
 

Reimplemented from ValBase.

Definition at line 100 of file GcrReconValsTool.cxx.

References ValBase::addItem(), ValBase::initialize(), and m_gcrRecon.

00101 {
00102 
00103 
00104 //std::cout << "BEGIN initialize in GcrReconValsTool" << std::endl;
00105     StatusCode sc = StatusCode::SUCCESS;
00106     
00107     MsgStream log(msgSvc(), name());
00108     
00109     if( ValBase::initialize().isFailure()) return StatusCode::FAILURE;
00110 
00111 
00112     
00113     addItem("GcrRecon[1536]",     m_gcrRecon);
00114 //std::cout << "END initialize in GcrReconValsTool" << std::endl;
00115  
00116     return sc;
00117 }


Member Data Documentation

double GcrReconValsTool::m_gcrRecon[NTOW*NLAY*NCOL] [private]
 

Definition at line 81 of file GcrReconValsTool.cxx.

Referenced by calculate(), and initialize().

float GcrReconValsTool::m_inferedZ [private]
 

Definition at line 82 of file GcrReconValsTool.cxx.

Referenced by calculate().

const int GcrReconValsTool::NCOL = 12 [static, private]
 

Definition at line 79 of file GcrReconValsTool.cxx.

Referenced by calculate().

const int GcrReconValsTool::NLAY = 8 [static, private]
 

Definition at line 78 of file GcrReconValsTool.cxx.

Referenced by calculate().

const int GcrReconValsTool::NTOW = 16 [static, private]
 

Definition at line 77 of file GcrReconValsTool.cxx.

Referenced by calculate().


The documentation for this class was generated from the following file:
Generated on Mon Dec 1 20:09:09 2008 by doxygen 1.3.3