#include <AlProject56.h>
Inheritance diagram for AlProject56:

Public Member Functions | |
| AlProject56 (const char *version) | |
| ~AlProject56 () | |
| JobCResult | Ana (const EDMEventHandle &evt) |
| void | NewRun (int run, int subrun) |
| void | Update (const CfgConfig &c) |
Private Attributes | |
| int | fDebug |
| std::string | fSegFolder |
| TTree * | fTree |
| AlProjectNt * | fNt |
Definition at line 37 of file AlProject56.h.
| AlProject56::AlProject56 | ( | const char * | version | ) |
Definition at line 23 of file AlProject56.cxx.
References JobCModule::CheckInit(), fNt, fTree, and JobCModule::SetCfgVersion().
00023 : 00024 JobCModule("AlProject56") 00025 { 00026 // Register module to be updated with a given config version 00027 SetCfgVersion(version); 00028 // Make sure that configuration has been loaded 00029 CheckInit(); 00030 00031 fNt = new AlProjectNt; 00032 fTree = new TTree("ptree", "Segment projection tree"); 00033 fTree->Branch("fNt", "AlProjectNt", &fNt); 00034 00035 }
| AlProject56::~AlProject56 | ( | ) |
| JobCResult AlProject56::Ana | ( | const EDMEventHandle & | evt | ) | [virtual] |
Reimplemented from JobCModule.
Definition at line 47 of file AlProject56.cxx.
References EDMEventHandle::Cal(), AlProjectNt::cham, cham, AlProjectNt::dudz, fNt, fSegFolder, fTree, geo, EDMDataBucket::Get(), GMIPPGeo::Instance(), JobCModule::kFailed, kNCham, kNPlane, JobCModule::kPassed, AlProjectNt::plane, EDMEventHandle::Reco(), AlProjectNt::u, AlProjectNt::wire, wires, and x.
00048 { 00049 vector<const TrackSeg*> seg; 00050 vector<const Wire*> wires; 00051 00052 try { evt.Reco().Get(fSegFolder.c_str(), seg); } 00053 catch (...) { } 00054 if (seg.empty()) return kFailed; 00055 00056 double x[3]; 00057 00058 for (int cham = 0; cham < kNCham; ++cham) { 00059 GChamGeo& geo = GMIPPGeo::Instance().Cham(cham); 00060 00061 wires.clear(); 00062 try { evt.Cal().Get(geo.Name(), wires); } 00063 catch (...) { continue; } 00064 if (wires.empty()) continue; 00065 00066 for (unsigned int i = 0; i < seg.size(); ++i) { 00067 const TrackSeg* trk = seg[i]; 00068 // Skip tracks which have this chamber in the fit 00069 if (trk->Point(cham)) continue; 00070 00071 // Predict u in every plane 00072 for (int j = 0; j < kNPlane; ++j) { 00073 trk->GetXY(geo.Z(j + 1), x, 0); 00074 double u; 00075 geo.XYToU(j + 1, x[0], x[1], u); 00076 fNt->u[j] = u; 00077 geo.XYToU(j + 1, trk->dXdZ(), trk->dYdZ(), u); 00078 fNt->dudz[j] = u; 00079 } 00080 for (unsigned int j = 0; j < wires.size(); ++j) { 00081 const Wire* w = wires[j]; 00082 00083 fNt->cham = cham; 00084 fNt->plane = w->Plane();; 00085 fNt->wire = w->WireHit(); 00086 fTree->Fill(); 00087 } 00088 } 00089 } 00090 00091 return kPassed; 00092 }
| void AlProject56::NewRun | ( | int | run, | |
| int | subrun | |||
| ) | [virtual] |
Reimplemented from JobCModule.
Definition at line 96 of file AlProject56.cxx.
References config_bfield(), and GMIPPGeo::Instance().
00097 { 00098 GMIPPGeo::Instance(run); 00099 config_bfield(run, subrun); 00100 }
| void AlProject56::Update | ( | const CfgConfig & | c | ) | [virtual] |
Implements CfgObserver.
Definition at line 104 of file AlProject56.cxx.
References fDebug, JobCModule::fIsInit, and fSegFolder.
00105 { 00106 c("Debug").Get(fDebug); 00107 c("SegFolder").Get(fSegFolder); 00108 00109 // Change the flag to signify that our configuration has been read 00110 fIsInit = true; 00111 }
int AlProject56::fDebug [private] |
AlProjectNt* AlProject56::fNt [private] |
std::string AlProject56::fSegFolder [private] |
TTree* AlProject56::fTree [private] |
Definition at line 52 of file AlProject56.h.
Referenced by AlProject56(), Ana(), and ~AlProject56().
1.4.7