Commit eaa9d900 authored by Walter Lampl's avatar Walter Lampl
Browse files

LArRawChannelBuilderAlg: Add option to use compute Q and t only for positive-energy cells

parent 6f50d834
......@@ -53,11 +53,15 @@ class LArRawChannelBuilderAlg : public AthReentrantAlgorithm {
//Other jobOptions:
Gaudi::Property<float> m_eCutFortQ{this,"ECutFortQ",256.0,"Time and Quality will be computed only for channels with E above this value"};
//This flag decides if we compute Q and t for cells with negative energy
Gaudi::Property<bool> m_absECutFortQ{this,"absECut",true,"Cut on fabs(E) for Q and t computation"};
Gaudi::Property<bool> m_useShapeDer{this,"useShapeDer",true,"Use shape derivative in Q-factor computation"};
//The following matters only in the MC case, when we have a 32 sample shapes
Gaudi::Property<int> m_firstSample{this,"firstSample",0,"first of the 32 sampels of the MC shape to be used"};
//Identifier helper
const LArOnlineID* m_onlineId;
......
......@@ -23,6 +23,8 @@ StatusCode LArRawChannelBuilderAlg::initialize() {
ATH_CHECK(detStore()->retrieve(m_onlineId,"LArOnlineID"));
const std::string cutmsg = m_absECutFortQ.value() ? " fabs(E) < " : " E < ";
ATH_MSG_INFO("Energy cut for time and quality computation: " << cutmsg << m_eCutFortQ.value() << " MeV");
return StatusCode::SUCCESS;
}
......@@ -114,7 +116,8 @@ StatusCode LArRawChannelBuilderAlg::execute(const EventContext& ctx) const {
uint16_t prov=0xa5; //Means all constants from DB
if (saturated) prov|=0x0400;
if (std::fabs(E)>m_eCutFortQ) {
const float E1=m_absECutFortQ.value() ? std::fabs(E) : E;
if (E1>m_eCutFortQ.value()) {
ATH_MSG_VERBOSE("Channel " << m_onlineId->channel_name(id) << " gain " << gain << " above threshold for tQ computation");
prov|=0x2100; // above cut + iteration converged (by definition, if no iteration done)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment