39#include "GaudiKernel/MsgStream.h"
40#include "GaudiKernel/AlgFactory.h"
41#include "GaudiKernel/SmartDataPtr.h"
42#include "GaudiKernel/IDataProviderSvc.h"
43#include "GaudiKernel/PropertyMgr.h"
44#include "GaudiKernel/ISvcLocator.h"
45#include "GaudiKernel/Bootstrap.h"
47#include "EventModel/EventModel.h"
48#include "EventModel/Event.h"
50#include "EventModel/EventHeader.h"
52#include "EvtRecEvent/EvtRecEvent.h"
53#include "EvtRecEvent/EvtRecTrack.h"
54#include "EmcRawEvent/EmcDigi.h"
55#include "EmcRecEventModel/RecEmcEventModel.h"
56#include "EmcRecGeoSvc/EmcRecGeoSvc.h"
57#include "EmcBhaCalib/EmcSelBhaEvent.h"
59#include "CLHEP/Vector/ThreeVector.h"
60#include "CLHEP/Geometry/Point3D.h"
61#ifndef ENABLE_BACKWARDS_COMPATIBILITY
64#include "CLHEP/Random/RandGauss.h"
68using CLHEP::Hep3Vector;
69using CLHEP::RandGauss;
73typedef std::vector<int>
Vint;
74typedef std::vector<HepLorentzVector>
Vp4;
81 :Algorithm(name, pSvcLocator),
84 m_lowEnergyShowerCut(0.1),
85 m_highEnergyShowerCut(0.5),
88 m_highMomentumCut(0.5),
91 m_minAngShEnergyCut(0.2),
96 m_oneProngMomentumCut(1.2),
99 m_ShEneThreshCut(0.02),
100 m_ShEneLeptonCut(1.),
101 m_minNrXtalsShowerCut(10),
102 m_maxNrXtalsShowerCut(70),
103 m_phiDiffMinCut(0.05),
104 m_phiDiffMaxCut(0.2),
106 m_thetaDiffCut(0.04),
109 m_showersAccepted(0),
111 m_writeMVToFile(
true),
113 m_inputFileDir(
"../InputData/"),
114 m_fileDir(
"/ihepbatch/besdata/public/liucx/Calib/"),
115 m_selMethod(
"Ixtal"),
126 declareProperty (
"Vr0cut", m_vr0cut);
127 declareProperty (
"Vz0cut", m_vz0cut);
129 declareProperty (
"lowEnergyShowerCut", m_lowEnergyShowerCut);
130 declareProperty (
"highEnergyShowerCut", m_highEnergyShowerCut);
131 declareProperty (
"matchThetaCut", m_matchThetaCut);
132 declareProperty (
"matchPhiCut", m_matchPhiCut);
134 declareProperty (
"highMomentumCut", m_highMomentumCut);
135 declareProperty (
"EoPMaxCut", m_EoPMaxCut);
136 declareProperty (
"EoPMinCut", m_EoPMinCut);
137 declareProperty (
"minAngShEnergyCut", m_minAngShEnergyCut);
138 declareProperty (
"minAngCut", m_minAngCut);
139 declareProperty (
"acolliCut", m_acolliCut);
140 declareProperty (
"eNormCut", m_eNormCut);
141 declareProperty (
"pNormCut", m_pNormCut);
142 declareProperty (
"oneProngMomentumCut", m_oneProngMomentumCut);
146 declareProperty(
"digiRangeCut", m_digiRangeCut);
148 declareProperty(
"ShEneThreshCut", m_ShEneThreshCut);
149 declareProperty(
"ShEneLeptonCut", m_ShEneLeptonCut);
151 declareProperty(
"minNrXtalsShowerCut", m_minNrXtalsShowerCut);
152 declareProperty(
"maxNrXtalsShowerCut", m_maxNrXtalsShowerCut);
153 declareProperty(
"phiDiffMinCut", m_phiDiffMinCut);
154 declareProperty(
"phiDiffMaxCut", m_phiDiffMaxCut);
155 declareProperty(
"nrShThreshCut", m_nrShThreshCut);
156 declareProperty(
"thetaDiffCut", m_thetaDiffCut);
157 declareProperty(
"LATCut", m_LATCut);
160 declareProperty(
"writeMVToFile", m_writeMVToFile);
161 declareProperty(
"fileExt", m_fileExt);
162 declareProperty(
"fileDir", m_fileDir);
163 declareProperty(
"inputFileDir", m_inputFileDir);
164 declareProperty(
"selMethod",m_selMethod);
165 declareProperty(
"sigmaCut", m_sigmaCut);
166 declareProperty(
"ReadBeamEFromDB", m_ReadBeamEFromDB =
false );
168 declareProperty(
"beamEnergy", m_beamEnergy);
169 declareProperty(
"elecSaturation", m_elecSaturation =
false );
171 declareProperty(
"MsgFlag", m_MsgFlag);
175 m_index =
new int*[56];
176 for (j=0;j<56;j++ ) {
177 m_index[j] =
new int[120];
178 for (
int k=0; k<120; k++) {
185 for (
int i=0; i<6240;i++)
187 m_inputConst[i] = 1.0;
198 if ( m_index != 0 ) {
199 for (
int i =0; i<56; i++ )
206 for (
int j=0;j<6240;j++ ) {
213 MsgStream log(
msgSvc(), name());
214 log << MSG::INFO <<
"in initialize()" << endreq;
224 m_TwoProngOneMatched=0;
231 if ( m_writeMVToFile )
238 ISvcLocator* svcLocator = Gaudi::svcLocator();
239 StatusCode sc = svcLocator->service(
"EmcRecGeoSvc",m_iGeoSvc);
240 if(sc!=StatusCode::SUCCESS) {
241 cout<<
"Error: Can't get EmcRecGeoSvc"<<endl;
257 StatusCode scBeamEnergy;
258 scBeamEnergy = Gaudi::svcLocator() -> service(
"BeamEnergySvc", m_BeamEnergySvc);
260 if( scBeamEnergy != StatusCode::SUCCESS){
261 log << MSG::ERROR <<
"can not use BeamEnergySvc" << endreq;
293 return StatusCode::SUCCESS;
299 MsgStream log(
msgSvc(), name());
300 log << MSG::DEBUG <<
"in execute()" << endreq;
306 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
308 run=eventHeader->runNumber();
309 event=eventHeader->eventNumber();
318 if(m_ReadBeamEFromDB&&m_irun!=run){
322 m_beamEnergy=m_BeamEnergySvc->
getbeamE();
327 cout<<
"beamEnergy="<< m_beamEnergy<<endl;
330 HepLorentzVector ptrk;
331 ptrk.setPx(m_beamEnergy*
sin(the)*
cos(phi));
332 ptrk.setPy(m_beamEnergy*
sin(the)*
sin(phi));
333 ptrk.setPz(m_beamEnergy*
cos(the));
334 ptrk.setE(m_beamEnergy);
336 ptrk=ptrk.boost(-0.011,0,0);
338 cout<<
"beamEnergy="<< m_beamEnergy<<
" cms "<<ptrk.e()<<
" ratio="<< (m_beamEnergy-ptrk.e())/ptrk.e()<<endl;
339 m_beamEnergy=ptrk.e();
345 for (
int j=0;j<6240;j++ ) {
349 if (m_elecSaturation==
true)
353 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),
"/Event/Digi/EmcDigiCol");
355 log << MSG::FATAL <<
"Could not find EMC digi" << endreq;
356 return( StatusCode::FAILURE);
359 EmcDigiCol::iterator iter3;
360 for (iter3=emcDigiCol->begin();iter3!= emcDigiCol->end();iter3++) {
361 RecEmcID id((*(iter3))->identify());
364 unsigned int npart,ntheta,nphi;
369 unsigned int newthetaInd;
370 if (npart==0) newthetaInd = ntheta;
371 if (npart==1) newthetaInd = ntheta + 6;
372 if (npart==2) newthetaInd = 55 - ntheta;
374 int ixtal=
index(newthetaInd,nphi);
375 m_measure[ixtal]=(*iter3)->getMeasure();
410 return StatusCode::SUCCESS;
416 MsgStream log(
msgSvc(), name());
418 log << MSG::INFO <<
"in finalize()" << endreq;
431 if ( m_writeMVToFile ) {
436 cout<<
"Event="<<m_events<<endl;
438 cout<<
"m_Nothing ="<<m_Nothing <<endl;
439 cout<<
"m_OneProng="<<m_OneProng<<endl;
441 cout<<
"m_TwoProngMatched="<<m_TwoProngMatched<<endl;
443 cout<<
"m_TwoProngOneMatched="<<m_TwoProngOneMatched<<endl;
445 cout<<
"m_showersAccepted="<<m_showersAccepted<<endl;
447 return StatusCode::SUCCESS;
455EmcSelBhaEvent::expectedEnergy(
long int ixtal ) {
460 unsigned int module, ntheta, nphi,ThetaIndex;
463 ntheta=theEmcStruc->
getTheta(ixtal);
464 nphi=theEmcStruc->
getPhi(ixtal);
466 if (module==0) ThetaIndex = ntheta;
467 if (module==1) ThetaIndex = ntheta + 6;
468 if (module==2) ThetaIndex = 55 - ntheta;
475 double theta=SeedPos.theta();
476 double phi=SeedPos.phi();
477 HepLorentzVector ptrk;
478 ptrk.setPx(m_beamEnergy*
sin(theta)*
cos(phi));
479 ptrk.setPy(m_beamEnergy*
sin(theta)*
sin(phi));
480 ptrk.setPz(m_beamEnergy*
cos(theta));
481 ptrk.setE(m_beamEnergy);
483 ptrk=ptrk.boost(0.011,0,0);
485 double depoEne_lab = m_corFun[ThetaIndex]*ptrk.e();
495 MsgStream log(
msgSvc(), name());
547 for(
int i = 0; i < evtRecEvent->totalTracks(); i++){
549 if(i>=evtRecTrkCol->size())
break;
553 if((*itTrk)->isEmcShowerValid()) {
557 int TrkID = (*itTrk)->
trackId();
558 double Shower5x5=theShower->
e5x5();
585 iGam.push_back( TrkID );
592 int nGam = iGam.size();
593 log << MSG::DEBUG <<
"num Good Photon " << nGam <<
" , " <<evtRecEvent->totalNeutral() <<endreq;
599 m_selectedTrkID1 =iGam[0];
600 m_selectedTrkID2 = iGam[1];
605 return StatusCode::SUCCESS;
614 MsgStream log(
msgSvc(), name());
637 double ene,theta,phi,eseed;
638 double showerX,showerY,showerZ;
639 long int thetaIndex,phiIndex,numberOfDigis;
642 unsigned int showerModule;
646 if ( ! m_showerList.empty()) m_showerList.clear();
648 for (
int ish=0; ish<2; ish++){
652 theShower=theShower1;
656 theShower=theShower2;
659 ene=theShower->
e5x5();
660 eseed=theShower->
eSeed();
687 showerPosition = theShower->
position();
688 theta = theShower->
theta();
689 phi= theShower->
phi();
690 showerX=theShower->
x();
691 showerY=theShower->
y();
692 showerZ=theShower->
z();
709 list<EmcShDigi> shDigiList;
712 double digiEne,
time, fraction, digiTheta, digiPhi;
713 double digiX, digiY, digiZ;
714 long int digiThetaIndex,digiPhiIndex;
717 RecEmcFractionMap::const_iterator ciFractionMap;
719 if ( ! shDigiList.empty()) shDigiList.clear();
721 for(ciFractionMap=fracMap5x5.begin();
722 ciFractionMap!=fracMap5x5.end();
725 digiEne = ciFractionMap->second.getEnergy();
727 time = ciFractionMap->second.getTime();
728 fraction = ciFractionMap->second.getFraction();
730 cellId=ciFractionMap->second.getCellId();
733 digiTheta = digiPos.theta();
734 digiPhi = digiPos.phi();
757 aShDigi->
setY(digiX);
758 aShDigi->
setY(digiY);
759 aShDigi->
setZ(digiZ);
761 shDigiList.push_back(*aShDigi);
766 numberOfDigis = shDigiList.size();
768 maxima = *(--shDigiList.end());
782 aShower->
setX(showerX);
783 aShower->
setY(showerY);
784 aShower->
setZ(showerZ);
785 m_showerList.push_back(*aShower);
795 if (m_showerList.size() == 2) {
797 list<EmcShower>::const_iterator iter_Sh;
799 for (iter_Sh = m_showerList.begin();
800 iter_Sh != m_showerList.end(); iter_Sh++) {
805 double theta = iter_Sh->theta();
816 unsigned int newthetaInd ;
825 unsigned int newphiInd=shower.
phiIndex();
830 log << MSG::INFO << name() <<
": Positron: theta,phi energy "
846 unsigned int newthetaInd;
854 unsigned int newphiInd=shower.
phiIndex();
858 log << MSG::INFO << name() <<
": Electron: theta,phi energy "
874 MsgStream log(
msgSvc(), name());
882 double calibEnergy=0.;
883 double energyError=0.;
893 unsigned int module, ntheta, nphi;
921 calibEnergy = myBhaEvt->
922 getDepoMCShowerEnergy_lab(SeedPos.theta(),
937 if ( calibEnergy > 0 ) {
939 energyError = myBhaEvt->
945 log << MSG::WARNING <<
" Did not find MC deposited cluster energy "
946 <<
" for this cluster: thetaInd: "
951 <<
"Will not use this cluster for the Emc "
952 <<
"Bhabha calibration !"
962 log << MSG::INFO<< name()
963 <<
": Electron was not selected ! "
977 unsigned int module, ntheta, nphi;
1005 calibEnergy = myBhaEvt->
1006 getDepoMCShowerEnergy_lab(SeedPos.theta(),
1021 if ( calibEnergy > 0. ) {
1023 energyError = myBhaEvt->
1029 log << MSG::WARNING <<
" Did not find MC deposited cluster energy "
1030 <<
"for this cluster: thetaInd: "
1035 <<
"Will not use this cluster for the Emc "
1036 <<
"Bhabha calibration !"
1047 log << MSG::INFO << name()
1048 <<
": Positron was not selected ! "
1056 log << MSG::WARNING <<
" No Bhabha data for calibration found in event !"
1065EmcSelBhaEvent::fillMatrix( ) {
1076 for (
int i = 1; i <= 2; i++ ) {
1078 if ( i == 2 ) _theBhabha = *(myBhaEvt->
electron());
1079 else _theBhabha = *(myBhaEvt->
positron());
1087 int _bhaPhiIndex=_theBhabha.
phiIndex();
1090 double eraw =_bhaEne ;
1094 HepLorentzVector ptrk;
1095 ptrk.setPx(eraw*
sin(the)*
cos(phi));
1096 ptrk.setPy(eraw*
sin(the)*
sin(phi));
1097 ptrk.setPz(eraw*
cos(the));
1100 ptrk=ptrk.boost(-0.011,0,0);
1108 int ixtalIndex =
index(_bhaThetaIndex,_bhaPhiIndex);
1109 double peakCutMin,peakCutMax;
1112 if (m_selMethod==
"Ithe"){
1113 peakCutMin= m_eDepEne[_bhaThetaIndex]*m_beamEnergy
1114 - SigCut*m_eSigmaExp[_bhaThetaIndex]*m_beamEnergy/100.;
1116 peakCutMax=m_eDepEne[_bhaThetaIndex] *m_beamEnergy
1117 + SigCut*m_eSigmaExp[_bhaThetaIndex]*m_beamEnergy/100.;
1138 if (m_selMethod==
"Ixtal"){
1139 peakCutMin= m_eRawPeak[ixtalIndex] *m_beamEnergy
1140 - SigCut*m_eSigmaExp[_bhaThetaIndex]*m_beamEnergy/100.;
1142 peakCutMax= m_eRawPeak[ixtalIndex] *m_beamEnergy
1143 + SigCut*m_eSigmaExp[_bhaThetaIndex]*m_beamEnergy/100.;
1184 && _bhaEne >= peakCutMin
1185 && _bhaEne <= peakCutMax
1186 && m_measure[ixtalIndex] !=3 ) {
1201 m_showersAccepted++;
1203 _sigmaBha = _theBhabha.
sigma2();
1206 _theShower = _theBhabha.
shower();
1211 _DigiMax = _theShower.
maxima();
1213 unsigned int newThetaIndMax=999;
1230 list<EmcShDigi> _DigiList=_theShower.
digiList();
1232 list<EmcShDigi>::const_iterator _Digi1,_Digi2;
1238 for (_Digi1 = _DigiList.begin();
1239 _Digi1 != _DigiList.end(); _Digi1++) {
1245 unsigned int newThetaInd1=999;
1246 if (_Digi1->module()==0) newThetaInd1 = _Digi1->thetaIndex();
1247 if (_Digi1->module()==1) newThetaInd1 = _Digi1->thetaIndex() + 6;
1248 if (_Digi1->module()==2) newThetaInd1 = 55 - _Digi1->thetaIndex();
1250 int Digi1Index =
index(newThetaInd1,_Digi1->phiIndex());
1259 double dvec = ( (
static_cast<double>(_Digi1->energy())) *
1263 if ( m_writeMVToFile )
1264 (myCalibData->
vectorR(Digi1Index)) += dvec;
1267 if ( m_writeMVToFile )
1269 (myCalibData->
xtalHits(Digi1Index))++;
1273 if ( Digi1Index == maximaIndex ) {
1274 if ( m_writeMVToFile ){
1281 for (_Digi2 = _Digi1;
1282 _Digi2 != _DigiList.end(); _Digi2++) {
1284 unsigned int newThetaInd2=999;
1285 if (_Digi2->module()==0) newThetaInd2 = _Digi2->thetaIndex();
1286 if (_Digi2->module()==1) newThetaInd2 = _Digi2->thetaIndex() + 6;
1287 if (_Digi2->module()==2) newThetaInd2 = 55 - _Digi2->thetaIndex();
1289 int Digi2Index =
index(newThetaInd2, _Digi2->phiIndex());
1293 static_cast<double>((( (_Digi1->energy() *
1297 if ( m_writeMVToFile )
1298 myCalibData->
matrixMEle( Digi1Index, Digi2Index) += val;
1313 MsgStream log(
msgSvc(), name());
1315 int numberOfXtalsRing;
1326 for (
int the = theEmcStruc->
startingTheta(); the< nrOfTheRings; the++) {
1328 numberOfXtalsRing = theEmcStruc->
crystalsInRing((
unsigned int) the );
1330 for (
int phi=0; phi < numberOfXtalsRing; phi++) {
1332 m_index[the][phi] = theEmcStruc->
getIndex( (
unsigned int)the , (
unsigned int)phi);
1338 log << MSG::INFO <<
" Emc geometry for Bhabha calibration initialized !! "
1340 <<
"Number of Xtals: " << m_nXtals << endreq;
1351 MsgStream log(
msgSvc(), name());
1354 if ( myCalibData != 0 )
1357 if ( m_writeMVToFile ) {
1362 count = sprintf(cnum,
"MC%d",-m_run);
1365 count = sprintf(cnum,
"%d",m_run);
1368 std::string runnum=
"";
1369 runnum.append(cnum);
1371 ofstream runnumberOut;
1372 std::string runnumberFile = m_fileDir;
1373 runnumberFile += m_fileExt;
1374 runnumberFile +=
"runnumbers.dat";
1375 runnumberOut.open(runnumberFile.c_str(),ios::out|ios::app);
1377 ifstream runnumberIn;
1378 runnumberIn.open(runnumberFile.c_str());
1380 while( !runnumberIn.eof() ) {
1386 log << MSG::INFO<<
" the runnumber: "<<runnum
1387 <<
" exists in the file runnumbers.dat" <<endreq;
1391 log << MSG::INFO<<
" the runnumber: "<<runnum
1392 <<
" does not exist in the file runnumbers.dat" <<endreq;
1395 runnumberIn.close();
1398 std::string vectorFile = m_fileDir;
1399 vectorFile += m_fileExt;
1400 vectorFile += runnum;
1401 vectorFile +=
"CalibVector.dat";
1402 vectorOut.open(vectorFile.c_str());
1405 std::string matrixFile = m_fileDir;
1406 matrixFile += m_fileExt;
1407 matrixFile += runnum;
1408 matrixFile +=
"CalibMatrix.dat";
1409 matrixOut.open(matrixFile.c_str());
1411 if ( vectorOut.good() && matrixOut.good() &&runnumberOut.good()) {
1413 myCalibData->
writeOut(matrixOut, vectorOut);
1415 log << MSG::INFO<<
" Wrote files "
1416 << (vectorFile) <<
" and "
1417 << (matrixFile) <<endreq;
1421 runnumberOut<<runnum<<
"\n";
1422 log << MSG::INFO<<
"Wrote files "<<runnumberFile<< endreq;
1426 log << MSG::WARNING <<
" Could not open vector and/or matrix file !"
1428 <<
"matrix file : " << matrixFile << endl
1429 <<
"vector file : " << vectorFile
1434 runnumberOut.close();
1446 while( diff>
pi ) diff -= twopi;
1447 while( diff< -
pi ) diff += twopi;
1457 std::string corFunFile = m_inputFileDir;
1458 corFunFile += m_fileExt;
1459 corFunFile +=
"cor.conf";
1460 corFunIn.open(corFunFile.c_str());
1461 for(
int i=0;i<56;i++) {
1462 corFunIn>>m_corFun[i];
1464 cout<<
"energy corFun="<<m_corFun[i]<<endl;
1473 std::string EsigmaFile = m_inputFileDir;
1474 EsigmaFile += m_fileExt;
1475 EsigmaFile +=
"sigma.conf";
1476 EsigmaIn.open(EsigmaFile.c_str());
1477 for(
int i=0;i<56;i++) {
1478 EsigmaIn>>m_eSigma[i];
1479 cout<<
"Sigma="<<m_eSigma[i]<<endl;
1488 std::string EDepEneFile = m_inputFileDir;
1489 EDepEneFile += m_fileExt;
1490 EDepEneFile +=
"peakI.conf";
1491 EDepEneIn.open(EDepEneFile.c_str());
1492 for(
int i=0;i<56;i++) {
1493 EDepEneIn>>m_eDepEne[i];
1496 cout<<
"DepEne="<<m_eDepEne[i]<<endl;
1504 ifstream ESigmaExpIn;
1505 std::string ESigmaExpFile = m_inputFileDir;
1506 ESigmaExpFile += m_fileExt;
1507 ESigmaExpFile +=
"sigmaI.conf";
1508 ESigmaExpIn.open(ESigmaExpFile.c_str());
1509 for(
int i=0;i<56;i++) {
1510 ESigmaExpIn>>m_eSigmaExp[i];
1511 cout<<
"SigmaExp="<<m_eSigmaExp[i]<<endl;
1513 ESigmaExpIn.close();
1523 std::string EFile = m_inputFileDir;
1525 EFile +=
"findpeak.conf";
1526 EIn.open(EFile.c_str());
1530 for(
int i=0;i<6240;i++) {
1531 EIn>>ixtal>>Peak[i];
1532 m_eRawPeak[ixtal]=Peak[i];
1566 HepLorentzVector theShowerVec(1,1,1,1);
1567 theShowerVec.setTheta(theShower->
theta());
1568 theShowerVec.setPhi(theShower->
phi());
1569 theShowerVec.setRho(theShower->
energy());
1570 theShowerVec.setE(theShower->
energy());
1572 for(
int j = 0; j < evtRecEvent->totalTracks(); j++){
1575 if(!(*jtTrk)->isEmcShowerValid())
continue;
1576 if (ShowerID == (*jtTrk)->trackId())
continue;
1580 if (aShower->
energy() > m_minAngShEnergyCut ){
1582 HepLorentzVector aShowerVec(1,1,1,1);
1583 aShowerVec.setTheta(aShower->
theta());
1584 aShowerVec.setPhi(aShower->
phi());
1585 aShowerVec.setRho(aShower->
energy());
1586 aShowerVec.setE(aShower->
energy());
1588 double dist = theShowerVec.angle(aShowerVec);
1590 if ( dist < minDist )
HepGeom::Point3D< double > HepPoint3D
std::vector< HepLorentzVector > Vp4
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
EvtRecTrackCol::iterator EvtRecTrackIterator
DOUBLE_PRECISION count[3]
double sin(const BesAngle a)
double cos(const BesAngle a)
HepPoint3D position() const
double & vectorR(int ind)
int & xtalHitsDir(int ind)
double & matrixMEle(int row, int column)
void writeOut(ostream &OutM, ostream &outV)
EmcBhabha * setElectron()
EmcBhabha * positron() const
EmcBhabha * setPositron()
EmcBhabha * electron() const
const double & theta() const
void setPhiIndex(unsigned int phiIndex)
void setCalibEnergy(double energy)
const double & calibEnergy() const
const double & errorOnCalibEnergy() const
void setErrorOnCalibEnergy(double error)
void setShower(EmcShower aShower)
void setTheta(double theta)
const unsigned int & thetaIndex() const
const unsigned int & phiIndex() const
void setThetaIndex(unsigned int thetaIndex)
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int theta_module(const Identifier &id)
static unsigned int phi_module(const Identifier &id)
double findPhiDiff(double phi1, double phi2)
EmcSelBhaEvent(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode SelectBhabha()
int index(int theta, int phi) const
double Angle2ClosestShower(int ShowerID)
void setWhere(HepPoint3D where)
const unsigned int & thetaIndex() const
const unsigned int & phiIndex() const
void setTheta(double theta)
void setModule(unsigned int module)
void setEnergy(double energy)
void setFraction(double fraction)
void setTime(double time)
void setPhiIndex(unsigned int phiIndex)
void setThetaIndex(unsigned int thetaIndex)
const unsigned int & module() const
const unsigned int & thetaIndex() const
void setEnergy(double energy)
const double & theta() const
void setTheta(double theta)
const double & energy() const
void setDigiList(std::list< EmcShDigi > digiList)
void setPhiIndex(unsigned int phiIndex)
const double & phi() const
void setThetaIndex(unsigned int thetaIndex)
const EmcShDigi maxima() const
void setMaxima(EmcShDigi maxima)
const unsigned int & phiIndex() const
void setWhere(HepPoint3D where)
const std::list< EmcShDigi > digiList() const
void setNumberOfDigis(long int numberOfDigis)
const unsigned int & module() const
void setModule(unsigned int module)
long getIndex(unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfTheRings()
unsigned int startingTheta()
unsigned int crystalsInRing(unsigned int theta) const
unsigned int getPartId(long Index) const
unsigned int getNumberOfXtals()
unsigned int getPhi(long Index) const
unsigned int getTheta(long Index) const
virtual bool isRunValid()=0
virtual double getbeamE()=0
virtual void getBeamEnergyInfo()=0
virtual HepPoint3D GetCFrontCenter(const Identifier &id) const =0
RecEmcFractionMap getFractionMap5x5() const
RecEmcID getShowerId() const
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecTrackCol