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

FT1worker Class Reference

Collaboration diagram for FT1worker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FT1worker ()
void evaluate ()

Public Attributes

TypedItem< unsigned int, 'i'> EvtRun
TypedItem< unsigned long long,
'l'> 
EvtEventId64
Item EvtLiveTime
Item EvtEnergyCorr
Item EvtElapsedTime
Item VtxXDir
Item VtxYDir
Item VtxZDir
Item VtxX0
Item VtxY0
Item VtxZ0
Item TkrNumTracks
Item Tkr1XDir
Item Tkr1YDir
Item Tkr1ZDir
Item Tkr1X0
Item Tkr1Y0
Item Tkr1Z0
Item Tkr1FirstLayer
Item CTBBestEnergy
Item CTBBestXDir
Item CTBBestYDir
Item CTBBestZDir
Item CTBBestEnergyProb
Item CTBBestEnergyRatio
Item CTBCORE
Item CTBClassLevel
unsigned int m_ft1eventid
float m_ft1energy
float m_ft1theta
float m_ft1phi
float m_ft1ra
float m_ft1dec
float m_ft1l
float m_ft1b
float m_ft1zen
float m_ft1azim
double m_ft1livetime
float m_ft1convpointx
float m_ft1convpointy
float m_ft1convpointz
float m_ft1convlayer
float m_ft1eventclass

Constructor & Destructor Documentation

FT1worker::FT1worker  ) 
 

Definition at line 242 of file FT1Alg.cxx.

References m_ft1azim, m_ft1b, m_ft1convlayer, m_ft1convpointx, m_ft1convpointy, m_ft1convpointz, m_ft1dec, m_ft1energy, m_ft1eventclass, m_ft1eventid, m_ft1l, m_ft1livetime, m_ft1phi, m_ft1ra, m_ft1theta, and m_ft1zen.

00244 : EvtRun("EvtRun")
00245 , EvtEventId64("EvtEventId64")
00246 , EvtElapsedTime("EvtElapsedTime")
00247 , EvtLiveTime("EvtLiveTime")
00248 , EvtEnergyCorr("EvtEnergyCorr")
00249 , TkrNumTracks("TkrNumTracks")
00250 , VtxXDir("VtxXDir")
00251 , VtxYDir("VtxYDir")
00252 , VtxZDir("VtxZDir")
00253 , VtxX0("VtxX0")
00254 , VtxY0("VtxY0")
00255 , VtxZ0("VtxZ0")
00256 , Tkr1XDir("Tkr1XDir")
00257 , Tkr1YDir("Tkr1YDir")
00258 , Tkr1ZDir("Tkr1ZDir")
00259 , Tkr1X0("Tkr1X0")
00260 , Tkr1Y0("Tkr1Y0")
00261 , Tkr1Z0("Tkr1Z0")
00262 , Tkr1FirstLayer("Tkr1FirstLayer")
00263 , CTBBestEnergy("CTBBestEnergy")
00264 , CTBBestXDir("CTBBestXDir")  
00265 , CTBBestYDir("CTBBestYDir")  
00266 , CTBBestZDir("CTBBestZDir")
00267 , CTBBestEnergyProb("CTBBestEnergyProb")
00268 , CTBBestEnergyRatio("CTBBestEnergyRatio")
00269 , CTBCORE("CTBCORE")
00270 , CTBClassLevel("CTBClassLevel")
00271 
00272 {
00273     //now create new items 
00274 
00275     addItem( "FT1EventId",       m_ft1eventid);
00276     addItem( "FT1Energy",        m_ft1energy);
00277     addItem( "FT1Theta",         m_ft1theta);
00278     addItem( "FT1Phi",           m_ft1phi);
00279     addItem( "FT1Ra",            m_ft1ra);
00280     addItem( "FT1Dec",           m_ft1dec);
00281     addItem( "FT1L",             m_ft1l);
00282     addItem( "FT1B",             m_ft1b);
00283     addItem( "FT1ZenithTheta",   m_ft1zen);
00284     addItem( "FT1EarthAzimuth",  m_ft1azim);
00285     addItem( "FT1ConvPointX",    m_ft1convpointx);
00286     addItem( "FT1ConvPointY",    m_ft1convpointy);
00287     addItem( "FT1ConvPointZ",    m_ft1convpointz);
00288     addItem( "FT1ConvLayer",     m_ft1convlayer);
00289     addItem( "FT1Livetime",      m_ft1livetime);
00290     addItem( "FT1EventClass",    m_ft1eventclass);
00291 }


Member Function Documentation

void FT1worker::evaluate  ) 
 

Definition at line 334 of file FT1Alg.cxx.

Referenced by FT1Alg::execute().

00336 {
00337     using CLHEP::Hep3Vector;
00338     using astro::SkyDir;
00339 
00340     //eventId and Time are always defined 
00341     m_ft1eventid =  nbOfEvtsInFile *EvtRun.value()  + EvtEventId64.value();
00342 
00343     // Give default "guard" values in case there are no tracks in the event
00344     m_ft1energy = CTBBestEnergy;
00345     if( m_ft1energy==0) m_ft1energy = EvtEnergyCorr;
00346 
00347     m_ft1theta = 666; m_ft1phi = 666; m_ft1ra   = 666;
00348     m_ft1dec   = 666; m_ft1zen = 666; m_ft1azim = 666;
00349     m_ft1l = 666; m_ft1b = 666;
00350     m_ft1convpointx = 999; m_ft1convpointy = 999; m_ft1convpointz = 999; 
00351     m_ft1convlayer = -1;
00352     m_ft1livetime = -1;
00353     m_ft1livetime = EvtLiveTime;
00354 
00355     if( TkrNumTracks==0) return;
00356     m_ft1convlayer   = Tkr1FirstLayer;
00357 
00358     Hep3Vector glastDir;
00359     if( CTBBestZDir!=0){ // check that this was set
00360         glastDir= Hep3Vector(CTBBestXDir, CTBBestYDir, CTBBestZDir);
00361     }else{
00362         glastDir= Hep3Vector(Tkr1XDir, Tkr1YDir, Tkr1ZDir);
00363     }
00364 
00365     // instrument coords
00366 
00367     m_ft1theta = (-glastDir).theta()*180/M_PI;
00368     double phi_deg = (-glastDir).phi(); 
00369     if( phi_deg<0 ) phi_deg += 2*M_PI;
00370     m_ft1phi =  phi_deg*180/M_PI;
00371 
00372     // celestial coordinates
00373 
00374     // transform 
00375     // glastDir points down... 
00376     // toSky converts a *particle* direction
00377     // into a direction on the sky, so the minus-sign is taken care of!
00378     SkyDir sdir( gps->toSky(glastDir) ); 
00379     m_ft1ra  = sdir.ra();
00380     m_ft1dec = sdir.dec();
00381     m_ft1l   = sdir.l();
00382     m_ft1b   = sdir.b();
00383 
00384     // local Zenith coordinates
00385 
00386     SkyDir zenith(gps->zenithDir());  // pointing direction
00387     double zenith_theta = sdir.difference(zenith); 
00388     if( fabs(zenith_theta)<1e-8) zenith_theta=0;
00389 
00390     // all this to do the azimuth angle :-(
00391     Hep3Vector north_pole(0,0,1);
00392     Hep3Vector east_dir( north_pole.cross(zenith()).unit() ); // east is perp to north_pole and zenith
00393     Hep3Vector north_dir( zenith().cross(east_dir));
00394 
00395     double earth_azimuth=atan2( sdir().dot(east_dir), sdir().dot(north_dir) );
00396     if( earth_azimuth <0) earth_azimuth += 2*M_PI; // to 0-360 deg.
00397     if( fabs(earth_azimuth)<1e-8) earth_azimuth=0;
00398 
00399     m_ft1zen  = zenith_theta*180/M_PI;;
00400     m_ft1azim = earth_azimuth*180/M_PI;
00401 
00402     // more useful class level
00403 
00404     m_ft1eventclass = 0;
00405 
00406     if ( (CTBBestEnergy<=10) || (CTBBestEnergyRatio>=5) ) { // Apply minimal cut first.
00407         m_ft1eventclass = 0;
00408     } else if ( (CTBClassLevel>2) && (CTBCORE>0.1) && (CTBBestEnergyProb>0.1) ) {
00409         m_ft1eventclass = 3;
00410     } else if ( (CTBClassLevel>1) && (CTBCORE>0.1) && (CTBBestEnergyProb>0.1) ) {
00411         m_ft1eventclass = 2;
00412     } else if ( (CTBClassLevel>0) && (CTBCORE>0.) && (CTBBestEnergyProb>0.) ) {
00413         m_ft1eventclass = 1;
00414     }
00415 
00416 }


Member Data Documentation

Item FT1worker::CTBBestEnergy
 

Definition at line 99 of file FT1Alg.cxx.

Item FT1worker::CTBBestEnergyProb
 

Definition at line 103 of file FT1Alg.cxx.

Item FT1worker::CTBBestEnergyRatio
 

Definition at line 104 of file FT1Alg.cxx.

Item FT1worker::CTBBestXDir
 

Definition at line 100 of file FT1Alg.cxx.

Item FT1worker::CTBBestYDir
 

Definition at line 101 of file FT1Alg.cxx.

Item FT1worker::CTBBestZDir
 

Definition at line 102 of file FT1Alg.cxx.

Item FT1worker::CTBClassLevel
 

Definition at line 106 of file FT1Alg.cxx.

Item FT1worker::CTBCORE
 

Definition at line 105 of file FT1Alg.cxx.

Item FT1worker::EvtElapsedTime
 

Definition at line 92 of file FT1Alg.cxx.

Item FT1worker::EvtEnergyCorr
 

Definition at line 91 of file FT1Alg.cxx.

TypedItem<unsigned long long , 'l'> FT1worker::EvtEventId64
 

Definition at line 87 of file FT1Alg.cxx.

Item FT1worker::EvtLiveTime
 

Definition at line 90 of file FT1Alg.cxx.

TypedItem<unsigned int, 'i'> FT1worker::EvtRun
 

Definition at line 86 of file FT1Alg.cxx.

float FT1worker::m_ft1azim
 

Definition at line 113 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1b
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1convlayer
 

Definition at line 115 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1convpointx
 

Definition at line 115 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1convpointy
 

Definition at line 115 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1convpointz
 

Definition at line 115 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1dec
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1energy
 

Definition at line 111 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1eventclass
 

Definition at line 116 of file FT1Alg.cxx.

Referenced by FT1worker().

unsigned int FT1worker::m_ft1eventid
 

Definition at line 110 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1l
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

double FT1worker::m_ft1livetime
 

Definition at line 114 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1phi
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1ra
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1theta
 

Definition at line 112 of file FT1Alg.cxx.

Referenced by FT1worker().

float FT1worker::m_ft1zen
 

Definition at line 113 of file FT1Alg.cxx.

Referenced by FT1worker().

Item FT1worker::Tkr1FirstLayer
 

Definition at line 98 of file FT1Alg.cxx.

Item FT1worker::Tkr1X0
 

Definition at line 97 of file FT1Alg.cxx.

Item FT1worker::Tkr1XDir
 

Definition at line 96 of file FT1Alg.cxx.

Item FT1worker::Tkr1Y0
 

Definition at line 97 of file FT1Alg.cxx.

Item FT1worker::Tkr1YDir
 

Definition at line 96 of file FT1Alg.cxx.

Item FT1worker::Tkr1Z0
 

Definition at line 97 of file FT1Alg.cxx.

Item FT1worker::Tkr1ZDir
 

Definition at line 96 of file FT1Alg.cxx.

Item FT1worker::TkrNumTracks
 

Definition at line 95 of file FT1Alg.cxx.

Item FT1worker::VtxX0
 

Definition at line 94 of file FT1Alg.cxx.

Item FT1worker::VtxXDir
 

Definition at line 93 of file FT1Alg.cxx.

Item FT1worker::VtxY0
 

Definition at line 94 of file FT1Alg.cxx.

Item FT1worker::VtxYDir
 

Definition at line 93 of file FT1Alg.cxx.

Item FT1worker::VtxZ0
 

Definition at line 94 of file FT1Alg.cxx.

Item FT1worker::VtxZDir
 

Definition at line 93 of file FT1Alg.cxx.


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