Skip to content
Snippets Groups Projects
Commit 5a7469e4 authored by Guillaume Unal's avatar Guillaume Unal Committed by Graeme Stewart
Browse files

CaloLumiBCIDTool : takes into account first sample value for cases with n(OFC...

CaloLumiBCIDTool : takes into account first sample value for cases with n(OFC samples)=4 (CaloTools-00-09-48)

        * CaloLumiBCIDTool : takes into account first sample value for cases with n(OFC samples)=4
            default configuration for n(OFC samples)=4:  firstSample=0 for EMB,EMEC,FCAL, firstSample=1 for HEC
            (both for data and MC)
        * tag CaloTools-00-09-48

2015-02-09  scott snyder  <snyder@bnl.gov>

        * Tagging CaloTools-00-09-47.
	* test/CaloCompactCellTool_test.cxx: Remove reference to
	ArenaHeaderGaudiClear.
parent a817b053
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,12 @@ private:
unsigned int m_bcidMax;
int m_ncell;
unsigned int m_bcid;
int m_firstSampleEMB;
int m_firstSampleEMEC;
int m_firstSampleHEC;
int m_firstSampleFCAL;
mutable bool m_cacheValid;
......@@ -72,7 +78,6 @@ private:
std::vector<HWIdentifier> m_hwid_sym;
std::vector<float> m_eshift_sym;
std::vector<int> m_symCellIndex;
unsigned int m_bcid;
//Functions
......
......@@ -25,7 +25,11 @@ CaloLumiBCIDTool::CaloLumiBCIDTool (const std::string& type,
m_keyShape("LArShape"), m_keyMinBiasAverage("LArPileupAverage"),m_keyOFC("LArOFC"),
m_bcidMax(3564),
m_ncell(0),
m_bcid(0xFFFF) //Larger than m_bcidmax
m_bcid(0xFFFF), //Larger than m_bcidmax
m_firstSampleEMB(0),
m_firstSampleEMEC(0),
m_firstSampleHEC(1),
m_firstSampleFCAL(0)
{
declareInterface<ICaloLumiBCIDTool>(this);
declareProperty("LArOFCTool",m_OFCTool,"Tool handle for OFC");
......@@ -35,6 +39,10 @@ CaloLumiBCIDTool::CaloLumiBCIDTool (const std::string& type,
declareProperty("keyShape",m_keyShape);
declareProperty("keyMinBiasAverge",m_keyMinBiasAverage);
declareProperty("keyOFC",m_keyOFC);
declareProperty("firstSampleEMB",m_firstSampleEMB,"First sample EMB in 4 samples mode");
declareProperty("firstSampleEMEC",m_firstSampleEMEC,"First sample EMEC in 4 samples mode");
declareProperty("firstSampleHEC",m_firstSampleHEC,"First sample HEC in 4 samples mode");
declareProperty("firstSampleFCAL",m_firstSampleFCAL,"First sample FCAL in 4 samples mode");
}
//-----------------------------------------------------------------
......@@ -345,6 +353,16 @@ StatusCode CaloLumiBCIDTool::computeValues(unsigned int bcid)
unsigned int nsamples = OFC.size();
// choise of first sample : i.e sample on the pulse shape to which first OFC sample is applied
unsigned int ifirst= 0;
if (nsamples==4) {
if (m_lar_on_id->isEMBchannel(id)) ifirst=m_firstSampleEMB;
if (m_lar_on_id->isEMECchannel(id)) ifirst=m_firstSampleEMEC;
if (m_lar_on_id->isHECchannel(id)) ifirst=m_firstSampleHEC;
if (m_lar_on_id->isFCALchannel(id)) ifirst=m_firstSampleFCAL;
}
unsigned int nshapes = Shape.size();
if (nshapes < nsamples) {
msg(MSG::ERROR) << " Not enough samples in Shape " << nshapes << " less than in OFC " << nsamples << endreq;
......@@ -354,11 +372,12 @@ StatusCode CaloLumiBCIDTool::computeValues(unsigned int bcid)
//std::cout << " loop over bcid ";
for (unsigned int i=0;i<nsamples;i++) {
float sumShape=0.;
unsigned int ishift = i + ifirst ; // correct for first sample
for (unsigned int j=0;j<nshapes;j++) {
unsigned int k;
if ((bcid+i)<j) k = m_bcidMax+bcid+i-j;
else if ((bcid+i)>=(m_bcidMax+j)) k = i-j+bcid-m_bcidMax;
else k = bcid+i-j;
if ((bcid+ishift)<j) k = m_bcidMax+bcid+ishift-j;
else if ((bcid+ishift)>=(m_bcidMax+j)) k = ishift-j+bcid-m_bcidMax;
else k = bcid+ishift-j;
float lumi;
if (m_isMC) lumi= m_bunchCrossingTool->bcIntensity(k)*xlumiMC; // convert to luminosity per bunch in 10**30 units
......
......@@ -32,7 +32,6 @@
#include "CaloIdentifier/CaloIdManager.h"
#include "StoreGate/StoreGateSvc.h"
#include "AthAllocators/Arena.h"
#include "AthAllocators/ArenaHeaderGaudiClear.h"
#include "IdDictParser/IdDictParser.h"
#include "GaudiKernel/Bootstrap.h"
#include "TestTools/initGaudi.h"
......@@ -1127,7 +1126,6 @@ std::vector<CaloCell*> init (ICaloCompactCellTool* & tool)
CHECK( detstore->record (idmgr, "CaloIdManager") );
arena = new SG::Arena ("arena");
SG::ArenaHeaderGaudiClear::disable();
g_mgr = mgr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment