#include <FarmMonitorAlg.h>
Public Member Functions | |
StatusCode | execute () |
StatusCode | execute () |
FarmMonitorAlg (const std::string &name, ISvcLocator *pSvcLocator) | |
FarmMonitorAlg (const std::string &name, ISvcLocator *pSvcLocator) | |
StatusCode | finalize () |
StatusCode | finalize () |
StatusCode | initialize () |
StatusCode | initialize () |
Private Attributes | |
IHistogram1D * | h_acoplanarity_2HighestPIPTracks |
IHistogram1D * | h_acoplanarity_2HighestPIPTracks |
IHistogram1D * | h_cosTheta_AllChargedTracks |
IHistogram1D * | h_cosTheta_AllChargedTracks |
IHistogram1D * | h_cosTheta_AllNeutralTracks |
IHistogram1D * | h_cosTheta_AllNeutralTracks |
IHistogram1D * | h_cosTheta_AllTracks |
IHistogram1D * | h_cosTheta_AllTracks |
IHistogram1D * | h_dedxElecChiIP |
IHistogram1D * | h_dedxElecChiIP |
IHistogram1D * | h_dedxGoodHitsIP |
IHistogram1D * | h_dedxGoodHitsIP |
IHistogram1D * | h_dedxKaonChiIP |
IHistogram1D * | h_dedxKaonChiIP |
IHistogram1D * | h_dedxMuonChiIP |
IHistogram1D * | h_dedxMuonChiIP |
IHistogram1D * | h_dedxPionChiIP |
IHistogram1D * | h_dedxPionChiIP |
IHistogram1D * | h_dedxProbPHIP |
IHistogram1D * | h_dedxProbPHIP |
IHistogram2D * | h_dedxProbPHVsMomentumIP |
IHistogram2D * | h_dedxProbPHVsMomentumIP |
IHistogram1D * | h_dedxProtonChiIP |
IHistogram1D * | h_dedxProtonChiIP |
IHistogram1D * | h_dedxTotalHitsIP |
PID (dE/dx) information. | |
IHistogram1D * | h_dedxTotalHitsIP |
PID (dE/dx) information. | |
IHistogram1D * | h_eChargedDivEcm |
IHistogram1D * | h_eChargedDivEcm |
IHistogram1D * | h_eEMCDivEcm |
IHistogram1D * | h_eEMCDivEcm |
IHistogram1D * | h_eEMCIPTrack1DivEb |
IHistogram1D * | h_eEMCIPTrack1DivEb |
IHistogram1D * | h_eEMCIPTrack2DivEb |
IHistogram1D * | h_eEMCIPTrack2DivEb |
IHistogram1D * | h_eEMCShower1DivEb |
IHistogram1D * | h_eEMCShower1DivEb |
IHistogram1D * | h_eEMCShower2DivEb |
IHistogram1D * | h_eEMCShower2DivEb |
IHistogram1D * | h_eEMCShower3DivEb |
IHistogram1D * | h_eEMCShower3DivEb |
IHistogram1D * | h_eNeutralDivEcm |
IHistogram1D * | h_eNeutralDivEcm |
IHistogram1D * | h_eVisibleDivEcm |
Total energies. | |
IHistogram1D * | h_eVisibleDivEcm |
Total energies. | |
IHistogram1D * | h_ksMass |
IHistogram1D * | h_ksMass |
IHistogram1D * | h_lambdaMass |
IHistogram1D * | h_lambdaMass |
IHistogram1D * | h_mucDepth |
MUC information. | |
IHistogram1D * | h_mucDepth |
MUC information. | |
IHistogram2D * | h_mucDepthVsCosTheta |
IHistogram2D * | h_mucDepthVsCosTheta |
IHistogram2D * | h_mucDepthVsPhi |
IHistogram2D * | h_mucDepthVsPhi |
IHistogram1D * | h_nChargedTracks |
IHistogram1D * | h_nChargedTracks |
IHistogram1D * | h_nChargedTracksIP |
IHistogram1D * | h_nChargedTracksIP |
IHistogram1D * | h_netCharge |
IHistogram1D * | h_netCharge |
IHistogram1D * | h_netChargeIP |
IHistogram1D * | h_netChargeIP |
IHistogram1D * | h_netMomentumDivEcm_AllChargedTracks |
Net momenta. | |
IHistogram1D * | h_netMomentumDivEcm_AllChargedTracks |
Net momenta. | |
IHistogram1D * | h_netMomentumDivEcm_AllNeutralTracks |
IHistogram1D * | h_netMomentumDivEcm_AllNeutralTracks |
IHistogram1D * | h_netMomentumDivEcm_AllTracks |
IHistogram1D * | h_netMomentumDivEcm_AllTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllChargedTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllChargedTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllNeutralTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllNeutralTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllTracks |
IHistogram1D * | h_netTransMomentumDivEcm_AllTracks |
IHistogram1D * | h_nKs |
VeeVertex information. | |
IHistogram1D * | h_nKs |
VeeVertex information. | |
IHistogram1D * | h_nLambda |
IHistogram1D * | h_nLambda |
IHistogram1D * | h_nNeutralTracks |
Neutral Tracks. | |
IHistogram1D * | h_nNeutralTracks |
Neutral Tracks. | |
IHistogram1D * | h_nNeutralTracksGT30MeV |
IHistogram1D * | h_nNeutralTracksGT30MeV |
IHistogram1D * | h_pIPTrack1DivEb |
2 highest momentum charged tracks | |
IHistogram1D * | h_pIPTrack1DivEb |
2 highest momentum charged tracks | |
IHistogram1D * | h_pIPTrack2DivEb |
IHistogram1D * | h_pIPTrack2DivEb |
IHistogram1D * | h_tofElecIP_Barrel |
IHistogram1D * | h_tofElecIP_Barrel |
IHistogram1D * | h_tofElecIP_Endcap |
IHistogram1D * | h_tofElecIP_Endcap |
IHistogram1D * | h_tofIP_BarrelLayer1 |
IHistogram1D * | h_tofIP_BarrelLayer1 |
IHistogram1D * | h_tofIP_BarrelLayer2 |
IHistogram1D * | h_tofIP_BarrelLayer2 |
IHistogram1D * | h_tofIP_EastEndcap |
IHistogram1D * | h_tofIP_EastEndcap |
IHistogram1D * | h_tofIP_WestEndcap |
IHistogram1D * | h_tofIP_WestEndcap |
IHistogram1D * | h_tofKaonIP_Barrel |
IHistogram1D * | h_tofKaonIP_Barrel |
IHistogram1D * | h_tofKaonIP_Endcap |
IHistogram1D * | h_tofKaonIP_Endcap |
IHistogram1D * | h_tofMuonIP_Barrel |
IHistogram1D * | h_tofMuonIP_Barrel |
IHistogram1D * | h_tofMuonIP_Endcap |
IHistogram1D * | h_tofMuonIP_Endcap |
IHistogram1D * | h_tofPHIP_BarrelLayer1 |
PID (TOF) information. | |
IHistogram1D * | h_tofPHIP_BarrelLayer1 |
PID (TOF) information. | |
IHistogram1D * | h_tofPHIP_BarrelLayer2 |
IHistogram1D * | h_tofPHIP_BarrelLayer2 |
IHistogram1D * | h_tofPHIP_EastEndcap |
IHistogram1D * | h_tofPHIP_EastEndcap |
IHistogram1D * | h_tofPHIP_WestEndcap |
IHistogram1D * | h_tofPHIP_WestEndcap |
IHistogram1D * | h_tofPionIP_Barrel |
IHistogram1D * | h_tofPionIP_Barrel |
IHistogram1D * | h_tofPionIP_Endcap |
IHistogram1D * | h_tofPionIP_Endcap |
IHistogram1D * | h_tofProtonIP_Barrel |
IHistogram1D * | h_tofProtonIP_Barrel |
IHistogram1D * | h_tofProtonIP_Endcap |
IHistogram1D * | h_tofProtonIP_Endcap |
IHistogram2D * | h_tofVsMomentumIP |
IHistogram2D * | h_tofVsMomentumIP |
IHistogram1D * | h_trackR0 |
Charged Tracks. | |
IHistogram1D * | h_trackR0 |
Charged Tracks. | |
IHistogram1D * | h_trackZ0 |
IHistogram1D * | h_trackZ0 |
bool | m_debug |
double | m_ecm |
int | m_RunEventFreq |
double | m_vr0cut |
double | m_vz0cut |
|
00031 : 00032 Algorithm(name, pSvcLocator) { 00033 00034 //Declare the properties 00035 declareProperty("PrintRunEventFreq", m_RunEventFreq = 10); 00036 00037 declareProperty("Ecm", m_ecm = 3.686); 00038 declareProperty("Vr0cut", m_vr0cut = 1.0); 00039 declareProperty("Vz0cut", m_vz0cut = 5.0); 00040 00041 }
|
|
|
|
|
|
Variables for charged track FOR loop Charged track FOR loop EMC energy associated with track MUC information Tracks after IP cuts dE/dx information TOF information For the 2 highest momentum charged tracks If the event has 1 IP charged track If the event has 2 IP charged tracks Shower (aka Neutral track) FOR loop Energy of most energetic showers Histograms filled per event Total Energy Histograms Total Charged Momentum Histograms Total Neutral Momentum Histograms Total Momentum Histograms VeeVertex information Loop over VeeVertex candidates 00167 { 00168 00169 double eBeam = m_ecm/2; 00170 00171 MsgStream log(msgSvc(), name()); 00172 log << MSG::INFO << "in execute()" << endreq; 00173 00174 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader"); 00175 int run=eventHeader->runNumber(); 00176 int event=eventHeader->eventNumber(); 00177 if( event%m_RunEventFreq == 0) std::cout << "Run " << run << ", event " << event << std::endl; 00178 00179 SmartDataPtr<EvtRecEvent> evtRecEvent(eventSvc(), EventModel::EvtRec::EvtRecEvent); 00180 log << MSG::DEBUG <<"ncharg, nneu, tottks = " 00181 << evtRecEvent->totalCharged() << " , " 00182 << evtRecEvent->totalNeutral() << " , " 00183 << evtRecEvent->totalTracks() <<endreq; 00184 00185 SmartDataPtr<EvtRecTrackCol> evtRecTrkCol(eventSvc(), EventModel::EvtRec::EvtRecTrackCol); 00186 00187 00189 int nChargedTracks = 0, nChargedTracksIP = 0; 00190 int nCharge = 0, nChargeIP = 0; 00191 double totalVisibleEnergy = 0, totalChargedEnergy = 0, totalEMCEnergy = 0; 00192 double totalChargedPX = 0, totalChargedPY = 0, totalChargedPZ = 0; 00193 00194 double highestIPTrackP = -1, secondHighestIPTrackP = -2; 00195 int highestPIPTrackId = -1, secondHighestPIPTrackId = -1; 00196 00198 for(int i = 0; i < evtRecEvent->totalCharged(); i++){ 00199 EvtRecTrackIterator itTrk = evtRecTrkCol->begin() + i; 00200 if(!(*itTrk)->isMdcTrackValid()) continue; 00201 RecMdcTrack *mdcTrk = (*itTrk)->mdcTrack(); 00202 00203 int trackId = mdcTrk->trackId(); 00204 int charge = mdcTrk->charge(); 00205 double r0 = mdcTrk->r(); 00206 double z0 = mdcTrk->z(); 00207 h_trackR0->fill(r0); 00208 h_trackZ0->fill(z0); 00209 00210 nChargedTracks++; 00211 nCharge += charge; 00212 00213 double pX = mdcTrk->px(); 00214 double pY = mdcTrk->py(); 00215 double pZ = mdcTrk->pz(); 00216 double pMag = mdcTrk->p(); 00217 double cosTheta = cos(mdcTrk->theta()); 00218 double phi = mdcTrk->phi(); 00219 00220 double chargedEnergy = sqrt(pMag*pMag + mPi*mPi); 00221 totalVisibleEnergy += chargedEnergy; 00222 totalChargedEnergy += chargedEnergy; 00223 00224 totalChargedPX += pX; 00225 totalChargedPY += pY; 00226 totalChargedPZ += pZ; 00227 00229 if( (*itTrk)->isEmcShowerValid() ) { 00230 RecEmcShower* emcChargedTrk = (*itTrk)->emcShower(); 00231 totalEMCEnergy += emcChargedTrk->energy(); 00232 } 00233 00235 if( (*itTrk)->isMucTrackValid() ) { 00236 RecMucTrack* mucTrk = (*itTrk)->mucTrack(); 00237 double mucDepth = mucTrk->depth(); 00238 if(mucDepth > 0) { 00239 h_mucDepth->fill(mucDepth); 00240 h_mucDepthVsCosTheta->fill(cosTheta,mucDepth); 00241 h_mucDepthVsPhi->fill(phi,mucDepth); 00242 } 00243 } // End of "isMucShowerValid()" IF 00244 00245 00248 if(fabs(z0) >= m_vz0cut) continue; 00249 if(r0 >= m_vr0cut) continue; 00250 00251 nChargedTracksIP++; 00252 nChargeIP += charge; 00253 00255 double dedxProbPH = -10; 00256 int dedxNumTotalHits = -10; 00257 int dedxNumGoodHits = -10; 00258 00259 if( (*itTrk)->isMdcDedxValid() ) { 00260 RecMdcDedx* dedxTrk = (*itTrk)->mdcDedx(); 00261 00262 dedxNumTotalHits = dedxTrk->numTotalHits(); 00263 dedxNumGoodHits = dedxTrk->numGoodHits(); 00264 h_dedxTotalHitsIP->fill(dedxNumTotalHits); 00265 h_dedxGoodHitsIP->fill(dedxNumGoodHits); 00266 00267 h_dedxElecChiIP->fill(dedxTrk->chiE()); 00268 h_dedxMuonChiIP->fill(dedxTrk->chiMu()); 00269 h_dedxPionChiIP->fill(dedxTrk->chiPi()); 00270 h_dedxKaonChiIP->fill(dedxTrk->chiK()); 00271 h_dedxProtonChiIP->fill(dedxTrk->chiP()); 00272 00273 dedxProbPH = dedxTrk->probPH(); 00274 h_dedxProbPHIP->fill(dedxProbPH); 00275 h_dedxProbPHVsMomentumIP->fill(pMag,dedxProbPH); 00276 00277 } // End of "isMdcDedxValid()" IF 00278 00280 if( (*itTrk)->isTofTrackValid() ) { 00281 SmartRefVector<RecTofTrack> tofTrkCol = (*itTrk)->tofTrack(); 00282 SmartRefVector<RecTofTrack>::iterator iter_tof = tofTrkCol.begin(); 00283 00284 for(;iter_tof != tofTrkCol.end(); iter_tof++ ) { 00285 TofHitStatus *status = new TofHitStatus; 00286 status->setStatus((*iter_tof)->status()); 00287 00288 if( status->is_barrel() ) { 00289 if( !(status->is_counter()) ) continue; // ? 00290 00291 double tofPH = (*iter_tof)->ph(); 00292 double tof = (*iter_tof)->tof(); 00293 00294 h_tofElecIP_Barrel->fill(tof - (*iter_tof)->texpElectron()); 00295 h_tofMuonIP_Barrel->fill(tof - (*iter_tof)->texpMuon()); 00296 h_tofPionIP_Barrel->fill(tof - (*iter_tof)->texpPion()); 00297 h_tofKaonIP_Barrel->fill(tof - (*iter_tof)->texpKaon()); 00298 h_tofProtonIP_Barrel->fill(tof - (*iter_tof)->texpProton()); 00299 h_tofVsMomentumIP->fill(pMag,tof); 00300 00301 if( status->layer() == 1 ) { 00302 h_tofPHIP_BarrelLayer1->fill(tofPH); 00303 h_tofIP_BarrelLayer1->fill(tof); 00304 } 00305 if( status->layer() == 2 ) { 00306 h_tofPHIP_BarrelLayer2->fill(tofPH); 00307 h_tofIP_BarrelLayer2->fill(tof); 00308 } 00309 } // End of TOF barrel IF 00310 00311 else { 00312 if( !(status->is_counter()) ) continue; // ? 00313 00314 double tofPH = (*iter_tof)->ph(); 00315 double tof = (*iter_tof)->tof(); 00316 00317 h_tofElecIP_Endcap->fill(tof - (*iter_tof)->texpElectron()); 00318 h_tofMuonIP_Endcap->fill(tof - (*iter_tof)->texpMuon()); 00319 h_tofPionIP_Endcap->fill(tof - (*iter_tof)->texpPion()); 00320 h_tofKaonIP_Endcap->fill(tof - (*iter_tof)->texpKaon()); 00321 h_tofProtonIP_Endcap->fill(tof - (*iter_tof)->texpProton()); 00322 h_tofVsMomentumIP->fill(pMag,tof); 00323 00324 if( status->is_east() ) { 00325 h_tofPHIP_EastEndcap->fill(tofPH); 00326 h_tofIP_EastEndcap->fill(tof); 00327 } 00328 else { 00329 h_tofPHIP_WestEndcap->fill(tofPH); 00330 h_tofIP_WestEndcap->fill(tof); 00331 } 00332 } // End of TOF endcap IF 00333 00334 } // End of "iter_tof" FOR 00335 } // End of "isTofTrackValid()" IF 00336 00337 00339 if(pMag > highestIPTrackP) { 00340 secondHighestPIPTrackId = highestPIPTrackId; 00341 secondHighestIPTrackP = highestIPTrackP; 00342 highestPIPTrackId = trackId; 00343 highestIPTrackP = pMag; 00344 } 00345 if((pMag > secondHighestIPTrackP)&&(pMag < highestIPTrackP)) { 00346 secondHighestPIPTrackId = trackId; 00347 secondHighestIPTrackP = pMag; 00348 } 00349 00350 } // End of charged track FOR 00351 00352 00355 if(nChargedTracksIP > 0) { 00356 EvtRecTrackIterator itTrk = evtRecTrkCol->begin() + highestPIPTrackId; 00357 RecMdcTrack *mdcTrk = (*itTrk)->mdcTrack(); 00358 double highestPPhi0 = mdcTrk->phi(); 00359 h_pIPTrack1DivEb->fill(mdcTrk->p()/eBeam); 00360 00361 if( (*itTrk)->isEmcShowerValid() ) { 00362 RecEmcShower* emcChargedTrk = (*itTrk)->emcShower(); 00363 h_eEMCIPTrack1DivEb->fill(emcChargedTrk->energy()/eBeam); 00364 } 00365 00367 if(nChargedTracksIP > 1) { 00368 itTrk = evtRecTrkCol->begin() + secondHighestPIPTrackId; 00369 RecMdcTrack *mdcTrk = (*itTrk)->mdcTrack(); 00370 double secondHighestPPhi0 = mdcTrk->phi(); 00371 h_pIPTrack2DivEb->fill(mdcTrk->p()/eBeam); 00372 00373 if( (*itTrk)->isEmcShowerValid() ) { 00374 RecEmcShower* emcChargedTrk = (*itTrk)->emcShower(); 00375 h_eEMCIPTrack2DivEb->fill(emcChargedTrk->energy()/eBeam); 00376 } 00377 00378 h_acoplanarity_2HighestPIPTracks->fill(fabs(CLHEP::pi - fabs(highestPPhi0 - secondHighestPPhi0))); 00379 } // End of "nChargedTracksIP > 1" IF 00380 } // End of "nChargedTracksIP > 0" IF 00381 00382 00385 int nNeutralTracks = 0, nNeutralTracksGT30MeV = 0; 00386 double totalNeutralEnergy = 0; 00387 double totalNeutralPX = 0, totalNeutralPY = 0, totalNeutralPZ = 0; 00388 00389 for(int i = evtRecEvent->totalCharged(); i< evtRecEvent->totalTracks(); i++) { 00390 EvtRecTrackIterator itTrk=evtRecTrkCol->begin() + i; 00391 if(!(*itTrk)->isEmcShowerValid()) continue; 00392 RecEmcShower *emcTrk = (*itTrk)->emcShower(); 00393 00394 nNeutralTracks++; 00395 double eraw = emcTrk->energy(); 00396 if(eraw > 0.030) nNeutralTracksGT30MeV++; 00397 00398 totalVisibleEnergy += eraw; 00399 totalEMCEnergy += eraw; 00400 totalNeutralEnergy += eraw; 00401 00402 double theta = emcTrk->theta(); 00403 double phi = emcTrk->phi(); 00404 00405 double pX = eraw*cos(phi)*sin(theta); 00406 double pY = eraw*sin(phi)*sin(theta); 00407 double pZ = eraw*cos(theta); 00408 00409 totalNeutralPX += pX; 00410 totalNeutralPY += pY; 00411 totalNeutralPZ += pZ; 00412 00414 if(nNeutralTracks == 1) h_eEMCShower1DivEb->fill(eraw/eBeam); 00415 if(nNeutralTracks == 2) h_eEMCShower2DivEb->fill(eraw/eBeam); 00416 if(nNeutralTracks == 3) h_eEMCShower3DivEb->fill(eraw/eBeam); 00417 00418 } // End of neutral track FOR 00419 00420 00423 00424 h_nChargedTracks->fill(nChargedTracks); 00425 h_nChargedTracksIP->fill(nChargedTracksIP); 00426 00427 h_netCharge->fill(nCharge); 00428 h_netChargeIP->fill(nChargeIP); 00429 00430 h_nNeutralTracks->fill(nNeutralTracks); 00431 h_nNeutralTracksGT30MeV->fill(nNeutralTracksGT30MeV); 00432 00433 00435 h_eVisibleDivEcm->fill(totalVisibleEnergy/m_ecm); 00436 h_eEMCDivEcm->fill(totalEMCEnergy/m_ecm); 00437 h_eNeutralDivEcm ->fill(totalNeutralEnergy/m_ecm); 00438 h_eChargedDivEcm->fill(totalChargedEnergy/m_ecm); 00439 00440 00442 double totalChargedPXY = sqrt(totalChargedPX*totalChargedPX + totalChargedPY*totalChargedPY); 00443 double totalChargedP = sqrt(totalChargedPXY*totalChargedPXY + totalChargedPZ*totalChargedPZ); 00444 00445 h_netMomentumDivEcm_AllChargedTracks->fill(totalChargedP/m_ecm); 00446 h_netTransMomentumDivEcm_AllChargedTracks->fill(totalChargedPXY/m_ecm); 00447 if(totalChargedP > 0) { 00448 h_cosTheta_AllChargedTracks->fill(totalChargedPZ/totalChargedP); 00449 } else { 00450 if(nChargedTracks > 0) { 00451 log << MSG::INFO << "Run " << run << ", event " << event 00452 << ": totalChargedP <= 0! " << endmsg; 00453 } 00454 } 00455 00456 00458 double totalNeutralPXY = sqrt(totalNeutralPX*totalNeutralPX + totalNeutralPY*totalNeutralPY); 00459 double totalNeutralP = sqrt(totalNeutralPXY*totalNeutralPXY + totalNeutralPZ*totalNeutralPZ); 00460 00461 h_netMomentumDivEcm_AllNeutralTracks->fill(totalNeutralP/m_ecm); 00462 h_netTransMomentumDivEcm_AllNeutralTracks->fill(totalNeutralPXY/m_ecm); 00463 if(totalNeutralP > 0) { 00464 h_cosTheta_AllNeutralTracks->fill(totalNeutralPZ/totalNeutralP); 00465 } else { 00466 if(nNeutralTracks > 0) { 00467 log << MSG::INFO << "Run " << run << ", event " << event 00468 << ": totalNeutralP <= 0! " << endmsg; 00469 } 00470 } 00471 00473 double totalEventPX = totalChargedPX + totalNeutralPX; 00474 double totalEventPY = totalChargedPY + totalNeutralPY; 00475 double totalEventPZ = totalChargedPZ + totalNeutralPZ; 00476 00477 double totalEventPXY = sqrt(totalEventPX*totalEventPX + totalEventPY*totalEventPY); 00478 double totalEventP = sqrt(totalEventPXY*totalEventPXY + totalEventPZ*totalEventPZ); 00479 00480 h_netMomentumDivEcm_AllTracks->fill(totalEventP/m_ecm); 00481 h_netTransMomentumDivEcm_AllTracks->fill(totalEventPXY/m_ecm); 00482 if(totalEventP > 0) { 00483 h_cosTheta_AllTracks->fill(totalEventPZ/totalEventP); 00484 } else { 00485 log << MSG::INFO << "Run " << run << ", event " << event 00486 << ": totalEventP <= 0! " << endmsg; 00487 } 00488 00489 00491 SmartDataPtr<EvtRecVeeVertexCol> evtRecVeeVertexCol(eventSvc(), "/Event/EvtRec/EvtRecVeeVertexCol"); 00492 if ( ! evtRecVeeVertexCol ) { 00493 log << MSG::FATAL << "Could not find EvtRecVeeVertexCol" << endreq; 00494 return StatusCode::FAILURE; 00495 } 00496 00498 int numKs = 0, numLambda = 0; 00499 for(EvtRecVeeVertexCol::iterator veeItr = evtRecVeeVertexCol->begin(); 00500 veeItr < evtRecVeeVertexCol->end(); veeItr++){ 00501 00502 h_ksMass->fill((*veeItr)->mass()); 00503 if(fabs((*veeItr)->mass() - mKs) < 0.010) ++numKs; 00504 00505 h_lambdaMass->fill((*veeItr)->mass()); 00506 if(fabs((*veeItr)->mass() - mLambda) < 0.010) ++numLambda; 00507 00508 } // End of "evtRecVeeVertexCol" FOR 00509 00510 h_nKs->fill(numKs); 00511 h_nLambda->fill(numLambda); 00512 00513 00514 return StatusCode::SUCCESS; 00515 }
|
|
|
|
00519 { 00520 00521 MsgStream log(msgSvc(), name()); 00522 log << MSG::INFO << "in finalize()" << endmsg; 00523 return StatusCode::SUCCESS; 00524 }
|
|
|
|
Total energies Net momenta Charged Tracks 2 highest momentum charged tracks Neutral Tracks MUC information PID (dE/dx) information PID (TOF) information VeeVertex information 00044 { 00045 MsgStream log(msgSvc(), name()); 00046 00047 log << MSG::INFO << "in initialize()" << endmsg; 00048 00049 StatusCode status; 00050 00051 //histograms 00052 00054 h_eVisibleDivEcm = histoSvc()->book("eVisibleDivEcm", 1, "eVisible/Ecm", 150, 0.0, 1.5); 00055 h_eEMCDivEcm = histoSvc()->book("eEMCDivEcm", 1, "eEMC/Ecm", 150, 0.0, 1.5); 00056 h_eNeutralDivEcm = histoSvc()->book("eNeutralDivEcm", 1, "eNeutral/Ecm", 150, 0.0, 1.5); 00057 h_eChargedDivEcm = histoSvc()->book("eChargedDivEcm", 1, "eCharged/Ecm", 150, 0.0, 1.5); 00058 00060 h_netMomentumDivEcm_AllChargedTracks = histoSvc()->book("netMomentumDivEcm_AllChargedTracks", 00061 1, "#Sigma p/Ecm (Charged)", 100, 0.0, 1.0); 00062 h_netTransMomentumDivEcm_AllChargedTracks = histoSvc()->book("netTransMomentumDivEcm_AllChargedTracks", 00063 1, "#Sigma ptr/Ecm (Charged)", 100, 0.0, 1.0); 00064 h_cosTheta_AllChargedTracks = histoSvc()->book("cosTheta_AllChargedTracks", 00065 1, "cos#theta (Charged)", 100, -1.0, 1.0); 00066 00067 h_netMomentumDivEcm_AllNeutralTracks = histoSvc()->book("netMomentumDivEcm_AllNeutralTracks", 00068 1, "#Sigma p/Ecm (Neutral)", 100, 0.0, 1.0); 00069 h_netTransMomentumDivEcm_AllNeutralTracks = histoSvc()->book("netTransMomentumDivEcm_AllNeutralTracks", 00070 1, "#Sigma ptr/Ecm (Neutral)", 100, 0.0, 1.0); 00071 h_cosTheta_AllNeutralTracks = histoSvc()->book("cosTheta_AllNeutralTracks", 00072 1, "cos#theta (Neutral)", 100, -1.0, 1.0); 00073 00074 h_netMomentumDivEcm_AllTracks = histoSvc()->book("netMomentumDivEcm_AllTracks", 00075 1, "#Sigma p/Ecm", 100, 0.0, 1.0); 00076 h_netTransMomentumDivEcm_AllTracks = histoSvc()->book("netTransMomentumDivEcm_AllTracks", 00077 1, "#Sigma ptr/Ecm", 100, 0.0, 1.0); 00078 h_cosTheta_AllTracks = histoSvc()->book("cosTheta_AllTracks", 00079 1, "cos#theta", 100, -1.0, 1.0); 00080 00082 h_trackR0 = histoSvc()->book("trackR0", 1, "R0 (cm)", 100, 0.0, 2.0); 00083 h_trackZ0 = histoSvc()->book("trackZ0", 1, "Z0 (cm)", 100, -20.0, 20.0); 00084 00085 h_nChargedTracks = histoSvc()->book("nChargedTracks", 1, "NChargedTracks", 17, -0.5, 16.5); 00086 h_nChargedTracksIP = histoSvc()->book("nChargedTracksIP", 1, "NChargedTracks from IP", 17, -0.5, 16.5); 00087 00088 h_netCharge = histoSvc()->book("netCharge", 1, "Net Charge", 11, -5.5, 5.5); 00089 h_netChargeIP = histoSvc()->book("netChargeIP", 1, "Net Charge with IP tracks", 11, -5.5, 5.5); 00090 00092 h_pIPTrack1DivEb = histoSvc()->book("pIPTrack1DivEb", 1, "pTrack1/Ebeam", 150, 0.0, 1.5); 00093 h_pIPTrack2DivEb = histoSvc()->book("pIPTrack2DivEb", 1, "pTrack2/Ebeam", 150, 0.0, 1.5); 00094 00095 h_eEMCIPTrack1DivEb = histoSvc()->book("eEMCIPTrack1DivEb", 1, "eEMCTrack1/Ebeam", 150, 0.0, 1.5); 00096 h_eEMCIPTrack2DivEb = histoSvc()->book("eEMCIPTrack2DivEb", 1, "eEMCTrack2/Ebeam", 150, 0.0, 1.5); 00097 00098 h_acoplanarity_2HighestPIPTracks = histoSvc()->book("acoplanarity_2HighestPIPTracks", 00099 1, "acoplanarity", 158, 0.0, 3.16); 00100 00102 h_nNeutralTracks = histoSvc()->book("nNeutralTracks", 1, "NNeutralTracks", 31, -0.5, 30.5); 00103 h_nNeutralTracksGT30MeV = histoSvc()->book("nNeutralTracksGT30MeV", 1, "NNeutralTracksGT30MeV", 31, -0.5, 30.5); 00104 00105 h_eEMCShower1DivEb = histoSvc()->book("eEMCShower1DivEb", 1, "eEMCShower1/Ebeam", 150, 0.0, 1.5); 00106 h_eEMCShower2DivEb = histoSvc()->book("eEMCShower2DivEb", 1, "eEMCShower2/Ebeam", 150, 0.0, 1.5); 00107 h_eEMCShower3DivEb = histoSvc()->book("eEMCShower3DivEb", 1, "eEMCShower3/Ebeam", 150, 0.0, 1.5); 00108 00109 00111 h_mucDepth = histoSvc()->book("mucDepth", 1, "mucDepth", 200, 0.0, 200.0); 00112 h_mucDepthVsCosTheta = histoSvc()->book("mucDepthVsCosTheta", 2, "mucDepthVsCosTheta", 00113 100, -1.0, 1.0, 200, 0.0, 200.0); 00114 h_mucDepthVsPhi = histoSvc()->book("mucDepthVsPhi", 2, "mucDepthVsPhi", 00115 180, -3.15, 3.15, 200, 0.0, 200.0); 00116 00118 h_dedxTotalHitsIP = histoSvc()->book("dedxTotalHitsIP", 1, "dedxTotalHitsIP", 70, 0.0, 70.0); 00119 h_dedxGoodHitsIP = histoSvc()->book("dedxGoodHitsIP", 1, "dedxGoodHitsIP", 70, 0.0, 70.0); 00120 h_dedxElecChiIP = histoSvc()->book("dedxElecChiIP", 1, "dedxElecChiIP", 120, -6.0, 6.0); 00121 h_dedxMuonChiIP = histoSvc()->book("dedxMuonChiIP", 1, "dedxMuonChiIP", 120, -6.0, 6.0); 00122 h_dedxPionChiIP = histoSvc()->book("dedxPionChiIP", 1, "dedxPionChiIP", 120, -6.0, 6.0); 00123 h_dedxKaonChiIP = histoSvc()->book("dedxKaonChiIP", 1, "dedxKaonChiIP", 120, -6.0, 6.0); 00124 h_dedxProtonChiIP = histoSvc()->book("dedxProtonChiIP", 1, "dedxProtonChiIP", 120, -6.0, 6.0); 00125 h_dedxProbPHIP = histoSvc()->book("dedxProbPHIP", 1, "dedxProbPHIP", 200, 0.0, 2000.0); 00126 h_dedxProbPHVsMomentumIP = histoSvc()->book("dedxProbPHVsMomentumIP", 2, "dedxProbPHVsMomentumIP", 00127 100, 0.0, 2.0, 200, 0.0, 2000.0); 00128 00130 h_tofPHIP_BarrelLayer1 = histoSvc()->book("tofPHIP_BarrelLayer1", 1, "tofPHIP_BarrelLayer1", 250, 0.0, 5000.0); 00131 h_tofPHIP_BarrelLayer2 = histoSvc()->book("tofPHIP_BarrelLayer2", 1, "tofPHIP_BarrelLayer2", 250, 0.0, 5000.0); 00132 h_tofPHIP_EastEndcap = histoSvc()->book("tofPHIP_EastEndcap", 1, "tofPHIP_EastEndcap", 200, 0.0, 4000.0); 00133 h_tofPHIP_WestEndcap = histoSvc()->book("tofPHIP_WestEndcap", 1, "tofPHIP_WestEndcap", 200, 0.0, 4000.0); 00134 h_tofIP_BarrelLayer1 = histoSvc()->book("tofIP_BarrelLayer1", 1, "tofIP_BarrelLayer1", 100, 0.0, 20.0); 00135 h_tofIP_BarrelLayer2 = histoSvc()->book("tofIP_BarrelLayer2", 1, "tofIP_BarrelLayer1", 100, 0.0, 20.0); 00136 h_tofIP_EastEndcap = histoSvc()->book("tofIP_EastEndcap", 1, "tofIP_EastEndcap", 100, 0.0, 20.0); 00137 h_tofIP_WestEndcap = histoSvc()->book("tofIP_WestEndcap", 1, "tofIP_WestEndcap", 100, 0.0, 20.0); 00138 h_tofElecIP_Barrel = histoSvc()->book("tofElecIP_Barrel", 1, "tofElecIP_Barrel", 120, -6.0, 6.0); 00139 h_tofMuonIP_Barrel = histoSvc()->book("tofMuonIP_Barrel", 1, "tofMuonIP_Barrel", 120, -6.0, 6.0); 00140 h_tofPionIP_Barrel = histoSvc()->book("tofPionIP_Barrel", 1, "tofPionIP_Barrel", 120, -6.0, 6.0); 00141 h_tofKaonIP_Barrel = histoSvc()->book("tofKaonIP_Barrel", 1, "tofKaonIP_Barrel", 120, -6.0, 6.0); 00142 h_tofProtonIP_Barrel = histoSvc()->book("tofProtonIP_Barrel", 1, "tofProtonIP_Barrel", 120, -6.0, 6.0); 00143 h_tofElecIP_Endcap = histoSvc()->book("tofElecIP_Endcap", 1, "tofElecIP_Endcap", 120, -6.0, 6.0); 00144 h_tofMuonIP_Endcap = histoSvc()->book("tofMuonIP_Endcap", 1, "tofMuonIP_Endcap", 120, -6.0, 6.0); 00145 h_tofPionIP_Endcap = histoSvc()->book("tofPionIP_Endcap", 1, "tofPionIP_Endcap", 120, -6.0, 6.0); 00146 h_tofKaonIP_Endcap = histoSvc()->book("tofKaonIP_Endcap", 1, "tofKaonIP_Endcap", 120, -6.0, 6.0); 00147 h_tofProtonIP_Endcap = histoSvc()->book("tofProtonIP_Endcap", 1, "tofProtonIP_Endcap", 120, -6.0, 6.0); 00148 h_tofVsMomentumIP = histoSvc()->book("tofVsMomentumIP", 2, "tofVsMomentumIP", 00149 100, 0.0, 2.0, 100, 0.0, 20.0); 00150 00152 h_nKs = histoSvc()->book("nKs", 1, "nKs", 9, -0.5, 8.5); 00153 h_ksMass = histoSvc()->book("ksMass", 1, "ksMass", 70, 0.480, 0.515); 00154 00155 h_nLambda = histoSvc()->book("nLambda", 1, "nLambda", 9, -0.5, 8.5); 00156 h_lambdaMass = histoSvc()->book("lambdaMass", 1, "lambdaMass", 76, 1.100, 1.133); 00157 00158 // Add Pi0 histograms when official pi0 list is ready 00159 00160 00161 log << MSG::INFO << "successfully return from initialize()" <<endmsg; 00162 return StatusCode::SUCCESS; 00163 00164 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PID (dE/dx) information.
|
|
PID (dE/dx) information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Total energies.
|
|
Total energies.
|
|
|
|
|
|
|
|
|
|
MUC information.
|
|
MUC information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Net momenta.
|
|
Net momenta.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VeeVertex information.
|
|
VeeVertex information.
|
|
|
|
|
|
Neutral Tracks.
|
|
Neutral Tracks.
|
|
|
|
|
|
2 highest momentum charged tracks
|
|
2 highest momentum charged tracks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PID (TOF) information.
|
|
PID (TOF) information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Charged Tracks.
|
|
Charged Tracks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|