Skip to content
Commits on Source (87)
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id$
/**
* @file AthContainers/Root/copyAuxStoreThinned.cxx
* @author scott snyder <snyder@bnl.gov>
......@@ -41,9 +40,11 @@ void copyAuxStoreThinned NO_SANITIZE_UNDEFINED
SG::IAuxStore& copy,
IThinningSvc* svc)
{
copy.resize(0);
size_t size = orig.size();
if (size == 0) return;
if (size == 0) {
copy.resize(0);
return;
}
size_t nremaining = 0;
std::vector<unsigned char> flags;
bool thinned = getThinnedFlags (svc, orig, nremaining, flags);
......
......@@ -538,11 +538,11 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpe
long long int currentFileSize = m_poolSvc->getFileSize(m_outputConnectionSpec, m_dbType.type(), IPoolSvc::kOutputStream);
if (m_databaseMaxFileSize.find(m_outputConnectionSpec) != m_databaseMaxFileSize.end()) {
if (currentFileSize > m_databaseMaxFileSize[m_outputConnectionSpec]) {
ATH_MSG_WARNING("FileSize > MaxFileSize for " << m_outputConnectionSpec);
ATH_MSG_WARNING("FileSize > " << m_databaseMaxFileSize[m_outputConnectionSpec] << " for " << m_outputConnectionSpec);
return(StatusCode::RECOVERABLE);
}
} else if (currentFileSize > m_domainMaxFileSize) {
ATH_MSG_WARNING("FileSize > domMaxFileSize for " << m_outputConnectionSpec);
ATH_MSG_WARNING("FileSize > " << m_domainMaxFileSize << " for " << m_outputConnectionSpec);
return(StatusCode::RECOVERABLE);
}
// For "safety" we reset the output file and the technology type
......
# in the CTP triggers (L1 items) get accepted if they satisfy the physics signal, e.g. 2xMU10 or XE60&EM20
# and they satisfy the bunchgroup requirement, i.e. the BunchCrossing number (BCID) must be in the list that defines the bunchgroup
# the CTPSimulation simulates that behavior
# a) when being executed on data it takes the bunchgroup definitions that correspond to the data and the BCID of the event
# b) when being executed on MC it takes the bunchgroup definition from the HLT menu configuration file, which only defines bunchgroups 0,1,and 7 and only for BCID=1, and it assumes the event has BCID=1
# For Heavy Ion MC simulation with data overlay the setup is a bit complicated:
# The bunchgroup definition in the Reco step (RDOtoRDOtrigger) is taken from the overlayed data, however, the CTPSimulation runs on MC and assumes BCID=1.
# To fix this one needs to force it to use bcid from the event
topSequence.CTPSimulation.ForceUsingBCIDforBunchGroupEval = True
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// Local include(s):
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
namespace xAOD {
EventAuxInfo_v2::EventAuxInfo_v2()
: AuxInfoBase(),
runNumber(0),
eventNumber(0),
lumiBlock(0),
timeStamp(0),
timeStampNSOffset(0),
bcid(0),
detectorMask0(0),
detectorMask1(0),
detectorMask2(0),
detectorMask3(0),
eventTypeBitmask(0),
statusElement(0),
extendedLevel1ID(0),
level1TriggerType(0),
pixelFlags(0),
sctFlags(0),
trtFlags(0),
larFlags(0),
tileFlags(0),
muonFlags(0),
forwardDetFlags(0),
coreFlags(0),
backgroundFlags(0),
lumiFlags(0),
beamPosX(0),
beamPosY(0),
beamPosZ(0),
beamPosSigmaX(0),
beamPosSigmaY(0),
beamPosSigmaZ(0),
beamPosSigmaXY(0),
beamTiltXZ(0),
beamTiltYZ(0),
beamStatus(0)
{
// Basic event information:
AUX_VARIABLE( runNumber );
AUX_VARIABLE( eventNumber );
AUX_VARIABLE( lumiBlock );
AUX_VARIABLE( timeStamp );
AUX_VARIABLE( timeStampNSOffset );
AUX_VARIABLE( bcid );
AUX_VARIABLE( detectorMask0 );
AUX_VARIABLE( detectorMask1 );
AUX_VARIABLE( detectorMask2 );
AUX_VARIABLE( detectorMask3 );
// Event type information:
AUX_VARIABLE( detDescrTags );
AUX_VARIABLE( eventTypeBitmask );
// Trigger related information:
AUX_VARIABLE( statusElement );
AUX_VARIABLE( extendedLevel1ID );
AUX_VARIABLE( level1TriggerType );
AUX_VARIABLE( streamTagNames );
AUX_VARIABLE( streamTagTypes );
AUX_VARIABLE( streamTagObeysLumiblock );
// Beam spot information:
AUX_VARIABLE( beamPosX );
AUX_VARIABLE( beamPosY );
AUX_VARIABLE( beamPosZ );
AUX_VARIABLE( beamPosSigmaX );
AUX_VARIABLE( beamPosSigmaY );
AUX_VARIABLE( beamPosSigmaZ );
AUX_VARIABLE( beamPosSigmaXY );
AUX_VARIABLE( beamTiltXZ );
AUX_VARIABLE( beamTiltYZ );
AUX_VARIABLE( beamStatus );
// Detector flags:
AUX_VARIABLE( pixelFlags );
AUX_VARIABLE( sctFlags );
AUX_VARIABLE( trtFlags );
AUX_VARIABLE( larFlags );
AUX_VARIABLE( tileFlags );
AUX_VARIABLE( muonFlags );
AUX_VARIABLE( forwardDetFlags );
AUX_VARIABLE( coreFlags );
AUX_VARIABLE( backgroundFlags );
AUX_VARIABLE( lumiFlags );
}
} // namespace xAOD
<!-- $Id: selection.xml 682504 2015-07-13 11:53:50Z krasznaa $ -->
<!-- Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -->
<lcgdict>
<class name="xAOD::EventInfo_v1"
......@@ -11,6 +11,8 @@
</class>
<class name="xAOD::EventAuxInfo_v1"
id="2CFD72A2-D3AA-4C18-9B40-E5ACBA20D785" />
<class name="xAOD::EventAuxInfo_v2"
id="FA684B06-EC03-4B0B-9FAE-91423B1ED35D" />
<read sourceClass="xAOD::EventInfo_v1" version="[1-]"
targetClass="xAOD::EventInfo_v1" source="" target="" >
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V2_H
#define XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V2_H
// System include(s):
extern "C" {
# include <stdint.h>
}
#include <vector>
#include <string>
// EDM include(s):
#include "xAODCore/AuxInfoBase.h"
namespace xAOD {
/// Auxiliary information about the event
///
/// This object describes the "static" auxiliary information about
/// an event.
///
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
class EventAuxInfo_v2 : public AuxInfoBase {
public:
/// Default constructor
EventAuxInfo_v2();
/// @name Basic event information
/// @{
uint32_t runNumber;
unsigned long long eventNumber;
uint32_t lumiBlock;
uint32_t timeStamp;
uint32_t timeStampNSOffset;
uint32_t bcid;
uint32_t detectorMask0;
uint32_t detectorMask1;
uint32_t detectorMask2;
uint32_t detectorMask3;
/// @}
/// @name Event type information
/// @{
std::vector< std::pair< std::string, std::string > > detDescrTags;
uint32_t eventTypeBitmask;
/// @}
/// @name Trigger related information
/// @{
uint32_t statusElement;
uint32_t extendedLevel1ID;
uint16_t level1TriggerType;
std::vector< std::string > streamTagNames;
std::vector< std::string > streamTagTypes;
std::vector< char > streamTagObeysLumiblock;
/// @}
/// @name Detector flags
/// @{
uint32_t pixelFlags;
uint32_t sctFlags;
uint32_t trtFlags;
uint32_t larFlags;
uint32_t tileFlags;
uint32_t muonFlags;
uint32_t forwardDetFlags;
uint32_t coreFlags;
uint32_t backgroundFlags;
uint32_t lumiFlags;
/// @}
/// @name Beam spot information
/// @{
float beamPosX;
float beamPosY;
float beamPosZ;
float beamPosSigmaX;
float beamPosSigmaY;
float beamPosSigmaZ;
float beamPosSigmaXY;
float beamTiltXZ;
float beamTiltYZ;
uint32_t beamStatus;
/// @}
}; // class EventAuxInfo_v2
} // namespace xAOD
// Declare the inheritance of the type:
#include "xAODCore/BaseInfo.h"
SG_BASE( xAOD::EventAuxInfo_v2, xAOD::AuxInfoBase );
#endif // XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V2_H
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: xAODEventInfoDict.h 630576 2014-11-24 12:36:44Z krasznaa $
#ifndef XAODEVENTINFO_XAODEVENTINFODICT_H
#define XAODEVENTINFO_XAODEVENTINFODICT_H
......@@ -21,6 +18,7 @@
#include "xAODEventInfo/EventInfoContainer.h"
#include "xAODEventInfo/versions/EventInfo_v1.h"
#include "xAODEventInfo/versions/EventAuxInfo_v1.h"
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
#include "xAODEventInfo/versions/EventInfoContainer_v1.h"
#include "xAODEventInfo/versions/EventInfoAuxContainer_v1.h"
......
################################################################################
# Package: xAODEventInfoAthenaPool
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( xAODEventInfoAthenaPool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
Database/AthenaPOOL/AthenaPoolCnvSvc
Database/AthenaPOOL/AthenaPoolUtilities
Event/xAOD/xAODEventInfo )
# Component(s) in the package:
atlas_add_poolcnv_library( xAODEventInfoAthenaPoolPoolCnv
src/*.cxx
FILES xAODEventInfo/EventInfo.h xAODEventInfo/EventAuxInfo.h xAODEventInfo/EventInfoContainer.h xAODEventInfo/EventInfoAuxContainer.h
TYPES_WITH_NAMESPACE xAOD::EventInfo xAOD::EventAuxInfo xAOD::EventInfoContainer xAOD::EventInfoAuxContainer
CNV_PFX xAOD
LINK_LIBRARIES AthenaPoolCnvSvcLib AthenaPoolUtilities xAODEventInfo )
src/*.h src/*.cxx
FILES xAODEventInfo/EventInfo.h xAODEventInfo/EventAuxInfo.h
xAODEventInfo/EventInfoContainer.h xAODEventInfo/EventInfoAuxContainer.h
TYPES_WITH_NAMESPACE xAOD::EventInfo xAOD::EventAuxInfo
xAOD::EventInfoContainer xAOD::EventInfoAuxContainer
CNV_PFX xAOD
LINK_LIBRARIES AthenaPoolCnvSvcLib AthenaPoolUtilities AthContainers
xAODEventInfo )
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
//
// Dummy source file so that cmake will know that this is a custom converter.
//
// Dear emacs, this is -*- c++ -*-
//
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
//
#ifndef XAODEVENTINFOATHENAPOOL_XAODEVENTAUXINFOCNV_H
#define XAODEVENTINFOATHENAPOOL_XAODEVENTAUXINFOCNV_H
// Local include(s).
#include "xAODEventAuxInfoCnv_v2.h"
// EDM include(s).
#include "xAODEventInfo/EventAuxInfo.h"
// Framework include(s).
#include "AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.h"
// Declare the POOL converter.
typedef T_AthenaPoolAuxContainerCnv< xAOD::EventAuxInfo,
xAODEventAuxInfoCnv_v2 >
xAODEventAuxInfoCnv;
#endif // XAODEVENTINFOATHENAPOOL_XAODEVENTAUXINFOCNV_H
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
// Local include(s).
#include "xAODEventAuxInfoCnv_v2.h"
// Core EDM include(s):
#include "AthContainers/tools/copyAuxStoreThinned.h"
// System include(s).
#include <stdexcept>
/// Convenience macro for setting the level of output messages
#define MSGLVL MSG::DEBUG
/// Another convenience macro for printing messages in the converter
#define ATH_MSG( MSG ) \
do { \
if( log.level() <= MSGLVL ) { \
log << MSGLVL << MSG << endmsg; \
} \
} while( 0 )
void xAODEventAuxInfoCnv_v2::persToTrans( const xAOD::EventAuxInfo_v2* oldObj,
xAOD::EventAuxInfo* newObj,
MsgStream& log ) {
// Greet the user.
ATH_MSG( "Converting xAOD::EventAuxInfo_v2 to the current version..." );
// Copy the payload of the v2 object into the latest one by misusing
// the thinning code a bit...
SG::copyAuxStoreThinned( *oldObj, *newObj,
static_cast< IThinningSvc* >( nullptr ) );
// Print what happened:
ATH_MSG( "Converting xAOD::EventAuxInfo_v2 to the current version... "
"[OK]" );
return;
}
void xAODEventAuxInfoCnv_v2::transToPers( const xAOD::EventAuxInfo*,
xAOD::EventAuxInfo_v2*,
MsgStream& log ) {
log << MSG::ERROR
<< "Somebody called xAODEventAuxInfoCnv_v2::transToPers"
<< endmsg;
throw std::runtime_error( "Somebody called xAODEventAuxInfoCnv_v2::"
"transToPers" );
return;
}
// Dear emacs, this is -*- c++ -*-
//
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
//
#ifndef XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V2_H
#define XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V2_H
// Gaudi/Athena include(s).
#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
// EDM include(s).
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
#include "xAODEventInfo/EventAuxInfo.h"
/// Converter for reading @c xAOD::EventAuxInfo_v2
///
/// This converter takes care of reading @c xAOD::EventAuxInfo_v2 into
/// the "current" version of @c xAOD::EventAuxInfo. (Which is
/// @c xAOD::EventAuxInfo_v1 in this branch.)
///
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
class xAODEventAuxInfoCnv_v2 :
public T_AthenaPoolTPCnvBase< xAOD::EventAuxInfo,
xAOD::EventAuxInfo_v2 > {
public:
/// Default constructor
xAODEventAuxInfoCnv_v2() = default;
/// Function converting from the old type to the current one
virtual void persToTrans( const xAOD::EventAuxInfo_v2* oldObj,
xAOD::EventAuxInfo* newObj,
MsgStream& log ) override;
/// Dummy function inherited from the base class
virtual void transToPers( const xAOD::EventAuxInfo*,
xAOD::EventAuxInfo_v2*,
MsgStream& log ) override;
}; // class xAODEventAuxInfoCnv_v2
#endif // XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V2_H
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
// Gaudi/Athena include(s).
#include "AthenaKernel/TPCnvFactory.h"
// EDM include(s).
#include "xAODEventInfo/EventAuxInfo.h"
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
// Local include(s).
#include "xAODEventAuxInfoCnv_v2.h"
// Declare the T/P converter(s).
DECLARE_TPCNV_FACTORY( xAODEventAuxInfoCnv_v2,
xAOD::EventAuxInfo,
xAOD::EventAuxInfo_v2,
Athena::TPCnvVers::Old )
......@@ -32,6 +32,7 @@ def LArAutoCorrTotalSCToolDefault (name="LArAutoCorrTotalSCToolDefault", **kw):
tool.keyNoise = "LArNoiseSC"
tool.keyPedestal = "LArPedestalSC"
tool.keyfSampl = "LARfSamplSC"
tool.keyMinBias = "LArMinBiasSC"
from AthenaCommon.BeamFlags import jobproperties
tool.deltaBunch = int(jobproperties.Beam.bunchSpacing()/( 25.*ns)+0.5)
......
......@@ -291,9 +291,11 @@ StatusCode LArAutoCorrTotalTool::getTerms()
// m_nsamples_AC_OFC = size of AC matrix & OFC vector (e.g 5 in Atlas)
//:::::::::::::::::::::::::::::::
float fSigma2=0.;
float MinBiasRMS=0.;
float SigmaNoise=0.;
float Adc2MeV=0.;
if(!m_NoPile)
{
float SigmaNoise;
if(m_isMC)
SigmaNoise = m_dd_noise->noise(id,igain);
else
......@@ -306,11 +308,10 @@ StatusCode LArAutoCorrTotalTool::getTerms()
SigmaNoise = 0.;//(we will have the ERROR message below)
}
float fSampl = m_dd_fSampl->FSAMPL(id);
float MinBiasRMS = m_dd_minbias->minBiasRMS(id);
MinBiasRMS = m_dd_minbias->minBiasRMS(id);
if(fSampl!=0) MinBiasRMS/=fSampl;
const std::vector<float> *
polynom_adc2mev = &(m_adc2mevTool->ADC2MEV(id,igain));
float Adc2MeV=0.;
if (polynom_adc2mev->size()>0) {
Adc2MeV=(*polynom_adc2mev)[1];
}
......
......@@ -455,9 +455,9 @@ LArOFCTool::computeOFC(int aORb, const HWIdentifier& CellID,
for(c=0;c<nsamples_AC_OFC;++c)
std::cout<<Shape[c+iBeginOfNSamples]<<" ";
std::cout<<" <- "<<iBeginOfNSamples<<std::endl;
for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PS[i]<<" ";
std::cout<<std::endl;
for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PSD[i]<<" ";
for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PS[i]<<" ";
std::cout<<std::endl;
for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PSD[i]<<" ";
std::cout<<std::endl;
std::cout<<" Q1="<<Q1<<" Q2="<<Q2<<" Q3="<<Q3
<<" DELTA="<<DELTA<<std::endl;
......
......@@ -59,7 +59,7 @@ namespace MuonGM {
bool stripPosition( const Identifier& id, Amg::Vector2D& pos ) const;
bool stripGlobalPosition( const Identifier& id, Amg::Vector3D& gpos ) const;
double stripLength( const Identifier& id) const;
double stripLength( const Identifier& id) const;
/** number of layers in phi/eta projection */
int numberOfLayers( bool ) const;
......@@ -68,6 +68,10 @@ namespace MuonGM {
int numberOfStrips( const Identifier& layerId ) const;
int numberOfStrips( int , bool measuresPhi ) const;
/** Number of missing bottom and top strips (not read out) */
int numberOfMissingTopStrips( const Identifier& layerId ) const;
int numberOfMissingBottomStrips( const Identifier& layerId ) const;
/** space point position for a given pair of phi and eta identifiers
The LocalPosition is expressed in the reference frame of the phi surface.
If one of the identifiers is outside the valid range, the function will return false */
......@@ -254,6 +258,20 @@ namespace MuonGM {
else return -1;
}
inline int MMReadoutElement::numberOfMissingTopStrips( const Identifier& id ) const {
const MuonChannelDesign* design = getDesign(id);
if( !design ) return -1;
int nStrips = design->sAngle == 0 ? design->nMissedTopEta : design->nMissedTopStereo;
return nStrips;
}
inline int MMReadoutElement::numberOfMissingBottomStrips( const Identifier& id ) const {
const MuonChannelDesign* design = getDesign(id);
if( !design ) return -1;
int nStrips = design->sAngle == 0 ? design->nMissedBottomEta : design->nMissedBottomStereo;
return nStrips;
}
inline bool MMReadoutElement::spacePointPosition( const Identifier& phiId, const Identifier& etaId, Amg::Vector2D& pos ) const {
Amg::Vector2D phiPos;
Amg::Vector2D etaPos;
......
......@@ -311,12 +311,9 @@ namespace MuonGM {
else if (detType==MuonChannelDesign::DetType::MM) { //its a MM eta layer | for MM the strips indices start from 0 to reflect the electronics channels numbering
if( st < 0 ) return false;
if( st > totalStrips ) return false;
if( st < nMissedBottomEta ) return false;
if( st > totalStrips-nMissedTopEta ) return false;
if(st<nMissedBottomEta || st>=(totalStrips-nMissedTopEta) || st == 1023 || st == 1024 || st == 2047 || st == 2048 || st == 3071 || st == 3072 || st == 4095 || st == 4096) return false;
else{
pos[0] = firstPos + inputPitch*(st-nMissedBottomEta);
pos[1] = 0;
......@@ -333,10 +330,9 @@ namespace MuonGM {
}
else if (sAngle!=0. && detType==MuonChannelDesign::DetType::MM) { //its a MM stereo layer
if( st < 0 ) return false;
if( st > totalStrips ) return false;
if( st < nMissedBottomStereo ) return false;
if( st > totalStrips-nMissedTopStereo ) return false;
if(st<nMissedBottomStereo || st>=(totalStrips-nMissedTopStereo) || st == 1023 || st == 1024 || st == 2047 || st == 2048 || st == 3071 || st == 3072 || st == 4095 || st == 4096) return false;
else{
pos[0] = firstPos + inputPitch*(st-nMissedBottomStereo);
pos[1] = 0;
......
......@@ -218,66 +218,41 @@ namespace MuonGM {
m_etaDesign[il].minYPhiR = roParam.minYPhiR;
m_etaDesign[il].maxYPhi = roParam.maxYPhi;
m_etaDesign[il].totalStrips = roParam.tStrips;
if (m_ml == 1) m_etaDesign[il].sAngle = (roParam.stereoAngle).at(il);
else if (m_ml == 2){ m_etaDesign[il].sAngle = (roParam.stereoAngle).at(il); }
else reLog()<<MSG::WARNING
<<"MMReadoutElement -- Unexpected Multilayer: m_ml= " << m_ml <<endmsg;
m_etaDesign[il].sAngle = (roParam.stereoAngle).at(il);
if (m_ml < 1 || m_ml > 2)
reLog()<<MSG::WARNING <<"MMReadoutElement -- Unexpected Multilayer: m_ml= " << m_ml <<endmsg;
if (m_etaDesign[il].sAngle == 0.) { // eta layers
m_etaDesign[il].firstPos = -0.5*m_etaDesign[il].xSize;
m_etaDesign[il].signY = 1 ;
m_etaDesign[il].nch = ((int) std::round( (m_etaDesign[il].xSize/pitch))) + 1;
if (m_etaDesign[il].nch > chMax) { // never enters in this if statement
// fix with help of dead zone
double dead = 0.5*(m_etaDesign[il].xSize - chMax*pitch);
m_etaDesign[il].deadO = dead;
m_etaDesign[il].deadI = dead;
m_etaDesign[il].firstPos += dead;
m_etaDesign[il].nch = chMax;
}
m_etaDesign[il].firstPos = -0.5*m_etaDesign[il].xSize;
m_etaDesign[il].signY = 1 ;
m_etaDesign[il].nch = ((int) std::round( (m_etaDesign[il].xSize/pitch))) + 1; // Total number of active strips
} else { // stereo layers
m_etaDesign[il].signY = il==2? 1 : -1 ;
// define the distance from the frame till the point that the first and last active stereo strips cross the center of the chamber (low_swift & up_swift)
// in order to derive the total number of active strips for the stereo layer
m_etaDesign[il].signY = il==2? 1 : -1 ;
double low_swift=( m_minHalfY -m_etaDesign[il].dlStereoBottom)*fabs(tan(m_etaDesign[il].sAngle));
double up_swift = (m_maxHalfY - m_etaDesign[il].dlStereoTop)*fabs(tan(m_etaDesign[il].sAngle));
double lm1_swift =0;
if(sector_l=='L' && (abs(getStationEta()))==1){
lm1_swift = (m_etaDesign[il].minYPhiR - m_etaDesign[il].minYPhiL)/2 + m_etaDesign[il].minYPhiL;
low_swift = 0;
}
double fPos = -0.5*m_etaDesign[il].xSize - low_swift + lm1_swift;
double lPos = 0.5*m_etaDesign[il].xSize + up_swift;
m_etaDesign[il].nch = ((int)std::round( (lPos - fPos)/pitch )) + 1;
m_etaDesign[il].firstPos = ( -0.5*m_etaDesign[il].xSize + (m_etaDesign[il].nMissedBottomStereo + m_etaDesign[il].nRoutedBottom - m_etaDesign[il].nMissedBottomEta)*pitch) - m_etaDesign[il].nRoutedBottom*pitch;
// define the distance from the frame till the point that the first and last active stereo strips cross the center of the chamber (low_swift & up_swift)
// in order to derive the total number of active strips for the stereo layer
double low_swift=( m_minHalfY -m_etaDesign[il].dlStereoBottom)*fabs(tan(m_etaDesign[il].sAngle));
double up_swift = (m_maxHalfY - m_etaDesign[il].dlStereoTop)*fabs(tan(m_etaDesign[il].sAngle));
if (m_etaDesign[il].nch > chMax) {
// dead zone does not help here - just limit number of channels
double lm1_swift =0;
if(sector_l=='L' && (abs(getStationEta()))==1){
lm1_swift = (m_etaDesign[il].minYPhiR - m_etaDesign[il].minYPhiL)/2 + m_etaDesign[il].minYPhiL;
low_swift = 0;
}
m_etaDesign[il].nch = chMax;
double fPos = -0.5*m_etaDesign[il].xSize - low_swift + lm1_swift;
double lPos = 0.5*m_etaDesign[il].xSize + up_swift;
}
m_etaDesign[il].nch = ((int)std::round( (lPos - fPos)/pitch )) + 1;
}
m_nStrips.push_back(m_etaDesign[il].nch);
m_etaDesign[il].firstPos = ( -0.5*m_etaDesign[il].xSize + (m_etaDesign[il].nMissedBottomStereo - m_etaDesign[il].nMissedBottomEta)*pitch);
}
m_nStrips.push_back(m_etaDesign[il].totalStrips);
reLog()<<MSG::DEBUG
<<"initDesign:" << getStationName()<< " layer " << il << ", strip pitch " << m_etaDesign[il].inputPitch << ", nstrips " << m_etaDesign[il].nch << " stereo " << m_etaDesign[il].sAngle << endmsg;
......
......@@ -25,13 +25,14 @@ Class to store input needed for the MM_Digitization tools:
class MM_DigitToolInput {
public:
MM_DigitToolInput(int stripIdLocal, double posx, double incomingAngleXZ, double incomingAngleYZ, const Amg::Vector3D& magneticField, int stripMaxId, int gasgap, float eventTime)
MM_DigitToolInput(int stripIdLocal, double posx, double incomingAngleXZ, double incomingAngleYZ, const Amg::Vector3D& magneticField, int stripMinId, int stripMaxId, int gasgap, float eventTime)
: m_stripIDLocal(stripIdLocal),
m_xpos(posx),
m_incomingAngleXZ(incomingAngleXZ),
m_incomingAngleYZ(incomingAngleYZ),
m_magneticField(magneticField),
m_stripMinId(stripMinId),
m_stripMaxId(stripMaxId),
m_gasgap(gasgap),
m_eventTime(eventTime)
......@@ -45,6 +46,7 @@ class MM_DigitToolInput {
double incomingAngleXZ() const { return m_incomingAngleXZ; }
double incomingAngleYZ() const { return m_incomingAngleYZ; }
const Amg::Vector3D& magneticField() const { return m_magneticField; } // kT unit, local cordinate
int stripMinID() const { return m_stripMinId; }
int stripMaxID() const { return m_stripMaxId; }
int gasgap() const { return m_gasgap; }
Identifier getHitID() const { return m_hitID; }
......@@ -56,6 +58,7 @@ class MM_DigitToolInput {
double m_incomingAngleXZ;
double m_incomingAngleYZ;
Amg::Vector3D m_magneticField;
int m_stripMinId;
int m_stripMaxId;
int m_gasgap;
Identifier m_hitID;
......