|
ATLAS Offline Software
|
#include <TBBeamQualityMC.h>
|
| TBBeamQualityMC (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~TBBeamQualityMC () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 11 of file TBBeamQualityMC.h.
◆ StoreGateSvc_t
◆ TBBeamQualityMC()
TBBeamQualityMC::TBBeamQualityMC |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TBBeamQualityMC()
virtual TBBeamQualityMC::~TBBeamQualityMC |
( |
| ) |
|
|
inlinevirtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TBBeamQualityMC::execute |
( |
| ) |
|
|
overridevirtual |
Print an informatory message:
Definition at line 39 of file TBBeamQualityMC.cxx.
55 return StatusCode::FAILURE;
72 const float zCalo = 30000.;
73 float beam_coor_x =
track->getUslope()*zCalo +
track->getUintercept() + xCryo;
74 float beam_coor_y =
track->getVslope()*zCalo +
track->getVintercept();
78 bool sx3 = (beam_coor_x!=0 ||
track->getUintercept()!=0 ||
track->getUslope()!=0 );
82 bool sy3 = (beam_coor_y!=0 ||
track->getVintercept()!=0 ||
track->getVslope()!=0 );
84 if(! (sx1 &&
sx2 && sx3 && sy1 &&
sy2 && sy3)) {
85 ATH_MSG_DEBUG (
"CheckTrackParams failed: "<<sx1<<
" "<<
sx2<<
" "<<sx3<<
" / "<<sy1<<
" "<<
sy2<<
" "<<sy3);
88 setFilterPassed(
false);
89 return StatusCode::SUCCESS;
104 scnum = hit->GetSC();
105 if(scnum <= 0)
continue;
107 ATH_MSG_DEBUG (
"Scint: "<<scnum<<
", track: "<<hit->GetTrackID()<<
", energy: "<<hit->GetEdep());
108 if( (scnum==
m_scint_prim[
i]) && (hit->GetTrackID() == 1) && (hit->GetEdep() > 0.)) {
109 has_energy[
i] =
true;
117 scnum = hit->GetSC();
118 if(scnum <= 0)
continue;
120 ATH_MSG_DEBUG (
"Scint: "<<scnum<<
", track: "<<hit->GetTrackID()<<
", energy: "<<hit->GetEdep());
121 if( (scnum==
m_scint_prim[
i]) && (hit->GetTrackID() == 1) && (hit->GetEdep() > 0.)) {
122 has_energy[
i] =
true;
128 ATH_MSG_DEBUG (
"CheckPrimaryTrack failed, no energy deposit in all asked scint." );
131 setFilterPassed(
false);
132 return StatusCode::SUCCESS;
141 scnum = hit->GetSC();
142 if(scnum <= 0)
continue;
143 if(hit->GetSC() == 5 && (hit->GetTrackID() == 1)) {
147 setFilterPassed(
false);
148 return StatusCode::SUCCESS;
160 unsigned int cSize = theCluster->getClusterSize();
161 if(cL != 0 && eD > 0. && cSize > 1) {
168 setFilterPassed(
false);
169 return StatusCode::SUCCESS;
175 const TBTrack* mytrack =
nullptr;
183 setFilterPassed(
false);
184 return StatusCode::SUCCESS;
190 setFilterPassed(
false);
191 return StatusCode::SUCCESS;
195 setFilterPassed(
true);
196 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TBBeamQualityMC::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getXcryoYtable()
StatusCode TBBeamQualityMC::getXcryoYtable |
( |
float & |
x, |
|
|
float & |
y, |
|
|
float & |
eBeam |
|
) |
| |
|
private |
Definition at line 205 of file TBBeamQualityMC.cxx.
208 std::string m_txtFileWithXY =
"xcryo_ytable.txt";
211 std::ifstream xyFile;
215 if (!xyFile.is_open()) {
216 ATH_MSG_ERROR (
"File " << m_txtFileWithXY <<
" fail to open in $DATAPATH");
217 return StatusCode::FAILURE;
219 while ( getline(xyFile,
line,
'\n') ) {
225 if (
run==
m_nRun && xyFile.good())
return StatusCode::SUCCESS;
227 return StatusCode::FAILURE;
◆ initialize()
StatusCode TBBeamQualityMC::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_bm_cut_x
float TBBeamQualityMC::m_bm_cut_x |
|
private |
◆ m_bm_cut_y
float TBBeamQualityMC::m_bm_cut_y |
|
private |
◆ m_check_clus
bool TBBeamQualityMC::m_check_clus |
|
private |
◆ m_check_primary
bool TBBeamQualityMC::m_check_primary |
|
private |
◆ m_check_trackpar
bool TBBeamQualityMC::m_check_trackpar |
|
private |
◆ m_check_trackreco
bool TBBeamQualityMC::m_check_trackreco |
|
private |
◆ m_check_veto
bool TBBeamQualityMC::m_check_veto |
|
private |
◆ m_clusterCollName
std::string TBBeamQualityMC::m_clusterCollName |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_nRun
int TBBeamQualityMC::m_nRun |
|
private |
◆ m_readFileforXcryo
bool TBBeamQualityMC::m_readFileforXcryo |
|
private |
◆ m_scint_prim
std::vector<int> TBBeamQualityMC::m_scint_prim |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< int > m_scint_prim
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double getUintercept() const
Storable container for CaloCluster.
unsigned int getRunNum() const
double getCryoHitv() const
int run(int argc, char *argv[])
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
@ FIRST_ENG_DENS
First Moment in E/V.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
double getCryoHitu() const
double chi2(TH1 *h0, TH1 *h1)
Principal data class for CaloCell clusters.
std::string m_clusterCollName
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
double getVintercept() const
bool m_readFileforXcryo
Get Xcryo and Ytable from a text file.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float getBeamMomentum() const
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>