|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "TDirectory.h"
23 for (
const auto ¶m :
m_chain) {
27 param->pdgid().begin(), param->pdgid().end(),
28 std::inserter(
tmp,
tmp.begin()));
36 for (
const auto ¶m :
chain()) {
40 param->pdgid().end(), std::inserter(
tmp,
tmp.begin()));
48 for (
const auto ¶m :
m_chain) {
64 for (
const auto ¶m :
m_chain) {
65 if (param->eta_min() >
eta_min())
67 if (param->eta_max() <
eta_max())
85 for (
const auto ¶m :
m_chain) {
101 for (
const auto ¶m :
m_chain) {
102 if (param->eta_min() <
eta_min())
104 if (param->eta_max() >
eta_max())
131 for (
const auto ¶m :
m_chain)
132 if (!param->is_match_Ekin_bin(Ekin_bin))
138 for (
const auto ¶m :
m_chain)
139 if (!param->is_match_calosample(calosample))
148 Int_t retry_warning = 1;
151 for (
int i = 0;
i <= retry;
i++) {
152 if (
i >= retry_warning)
154 "TFCSParametrizationChain::simulate(): Retry simulate call "
155 <<
i <<
"/" << retry);
156 for (
const auto ¶m :
m_chain) {
161 retry_warning = retry >> 1;
162 if (retry_warning < 1)
176 "TFCSParametrizationChain::simulate(): Simulate call failed after "
177 << retry <<
" retries");
191 for (
const auto ¶m :
m_chain) {
197 void TFCSParametrizationChain::Streamer(TBuffer &R__b) {
201 TDirectory *
dir =
nullptr;
203 if (R__b.IsReading()) {
204 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
206 R__b.SetBufferOffset(R__s);
207 R__b.ReadClassBuffer(TFCSParametrizationChain::Class(),
this);
209 TFCSParametrization::Streamer(R__b);
211 TObject *
parent = R__b.GetParent();
212 if (R__b.GetParent()) {
213 if (
parent->InheritsFrom(TDirectory::Class())) {
220 TClass *R__tcl1 = TFCSParametrizationBase::Class();
221 if (R__tcl1 ==
nullptr) {
222 Error(
"m_chain streamer",
223 "Missing the TClass object for class TFCSParametrizationBase *!");
228 R__stl.reserve(R__n);
229 for (R__i = 0; R__i < R__n; R__i++) {
230 std::unique_ptr<TFCSParametrizationBase> R__t;
232 if (R__t !=
nullptr) {
233 if (R__t->InheritsFrom(TFCSParametrizationPlaceholder::Class())) {
234 std::unique_ptr<TFCSParametrizationBase> new_R__t =
nullptr;
242 R__t = std::move(new_R__t);
244 Error(
"TFCSParametrizationChain::Streamer",
245 "Found placeholder object in the parametrization chain, "
246 "but could not read the real object from the file!");
250 R__stl.emplace_back(R__t.release());
257 TFCSParametrization::Streamer(R__b);
260 TObject *
parent = R__b.GetParent();
261 if (R__b.GetParent()) {
262 if (
parent->InheritsFrom(TDirectory::Class())) {
269 int R__n =
int(R__stl.size());
273 for (R__k = R__stl.begin(); R__k != R__stl.end(); ++R__k) {
275 if (
dir && R__t !=
nullptr) {
276 dir->WriteTObject(R__t);
278 R__b.WriteObject( &
tmp,
false );
280 R__b.WriteObject( R__t );
284 R__b.SetByteCount(R__c, kTRUE);
311 chain.push_back(param);
314 chain.push_back(param);
321 "==== Simulate only begin/end all with chain retry====");
322 chain.set_RetryChainFromStart();
324 chain.reset_RetryChainFromStart();
JetConstituentVector::iterator iterator
virtual void set_Ekin_nominal(double min)
virtual void recalc()
Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect()
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
const std::set< int > & pdgid() const override
virtual bool is_match_Ekin_bin(int Ekin_bin) const override
#define IsA
Declare the TObject style functions.
std::vector< TFCSParametrizationBase * > Chain_t
void Print(Option_t *option="") const override
double Ekin_max() const override
void recalc_eta_intersect()
virtual void set_Ekin_max(double max)
double eta_nominal() const override
virtual void set_Ekin(const TFCSParametrizationBase &ref)
virtual void set_eta(const TFCSParametrizationBase &ref)
virtual void set_eta_max(double max)
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Method in all derived classes to do some simulation.
virtual void set_pdgid(int id)
Set * set_union(Set *set1, Set *set2)
Perform a union of two sets.
virtual void set_Ekin_min(double min)
const Chain_t & chain() const
TFCSParametrization(const char *name=nullptr, const char *title=nullptr)
virtual bool is_match_calosample(int calosample) const override
void recalc_pdgid_intersect()
void recalc_Ekin_intersect()
double Ekin_min() const override
void Print(Option_t *option="") const
Print object information.
double eta_max() const override
double eta_min() const override
virtual void set_eta_nominal(double min)
virtual void setLevel(MSG::Level lvl)
Update outputlevel.
void recalc_pdgid_union()
#define ATH_MSG_NOCLASS(logger_name, x)
#define ATH_MSG_WARNING(x)
bool SplitChainObjects() const
FCSReturnCode simulate_and_retry(TFCSParametrizationBase *parametrization, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
double Ekin_nominal() const override
void recalc_Ekin_eta_intersect()
Error
The different types of error that can be flagged in the L1TopoRDO.
virtual void set_eta_min(double min)
static void unit_test(TFCSSimulationState *simulstate=nullptr, const TFCSTruthState *truth=nullptr, const TFCSExtrapolationState *extrapol=nullptr)
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
void recalc_Ekin_eta_union()