|
ATLAS Offline Software
|
#include <CheckFlow.h>
|
| CheckFlow (const std::string &name, ISvcLocator *pSvcLocator) |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
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 |
|
|
StringProperty | m_key {this, "McEventKey", "FLOW_EVENT"} |
|
BooleanProperty | m_produceHistogram {this, "HistogramFlag", true} |
|
DoubleProperty | m_bcut_min {this, "ImpactCutMin", 0.} |
|
DoubleProperty | m_bcut_max {this, "ImpactCutMax", 99.} |
|
DoubleProperty | m_ptcut_min {this, "PtCutMin", 0.} |
|
DoubleProperty | m_ptcut_max {this, "PtCutMax", 999999.} |
|
DoubleProperty | m_rapcut_min {this, "RapidityCutMin", 0.} |
|
DoubleProperty | m_rapcut_max {this, "RapidityCutMax", 5.5} |
|
TH1F * | m_hgenerated {} |
|
TH1F * | m_b {} |
|
TH1F * | m_phi {} |
|
TH1F * | m_phiR {} |
|
TH1F * | m_phi_vs_phiR {} |
|
TH2F * | m_phiv1reco_vs_phiR {} |
|
TH2F * | m_phiv2reco_vs_phiR {} |
|
TH1F * | m_phi_vs_phiR_etap {} |
|
TH1F * | m_phi_vs_phiR_etan {} |
|
TH3F * | m_v2betapth {} |
|
TH3F * | m_ebetapth {} |
|
SG::ReadHandleKey< HijingEventParams > | m_hijingKey {this, "HijingEventParmsKey","Hijing_event_params"} |
|
TruthHelper::GenAccessIO * | m_tesIO {} |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 30 of file CheckFlow.h.
◆ StoreGateSvc_t
◆ CheckFlow()
CheckFlow::CheckFlow |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ 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 CheckFlow::execute |
( |
| ) |
|
Definition at line 132 of file CheckFlow.cxx.
133 msg(MSG::INFO) <<
">>> CheckFlow from execute" <<
endmsg;
139 float b = hijing_pars->get_b();
140 float phiR = hijing_pars->get_bphi();
145 return StatusCode::SUCCESS;
150 float ngenerated = 0;
151 double phiv1_recon, phiv1_recop;
152 double phiv1_reco = 0, phiv2_reco = 0;
153 double phi_reco_sin1phip = 0, phi_reco_cos1phip = 0;
154 double phi_reco_sin1phin = 0, phi_reco_cos1phin = 0;
155 double phi_reco_sin2phi = 0, phi_reco_cos2phi = 0;
157 std::vector<HepMC::ConstGenParticlePtr>
particles;
159 if (
stat.isFailure()) {
165 int pid = pitr->pdg_id();
166 int p_stat = pitr->status();
167 double pt = pitr->momentum().perp();
168 double rapid = pitr->momentum().pseudoRapidity();
169 double phi = pitr->momentum().phi();
171 <<
" PID = " <<
pid <<
" Status = " << p_stat
172 <<
" Eta = " << rapid <<
" Phi = " <<
phi
173 <<
" PhiR = " << phiR <<
endmsg;
178 m_phi->Fill(phi, 1.);
179 double phi_corr =
phi - phiR;
185 int kpi = (
int)(phi_corr/(2*
M_PI));
186 phi_corr -= kpi * 2*
M_PI;
187 if (phi_corr < -
M_PI) phi_corr += 2*
M_PI;
188 if (phi_corr >
M_PI) phi_corr -= 2*
M_PI;
195 phi_reco_sin1phip +=
std::sin(1*phi);
196 phi_reco_cos1phip +=
std::cos(1*phi);
198 phi_reco_sin1phin +=
std::sin(1*phi);
199 phi_reco_cos1phin +=
std::cos(1*phi);
201 phi_reco_sin2phi +=
std::sin(2*phi);
202 phi_reco_cos2phi +=
std::cos(2*phi);
208 phiv1_recop = std::atan2( phi_reco_sin1phip,phi_reco_cos1phip );
209 phiv1_recon = std::atan2( phi_reco_sin1phin,phi_reco_cos1phin ) +
M_PI;
210 if( phiv1_recon >
M_PI ) phiv1_recon -= 2*
M_PI;
212 phiv1_reco = (phiv1_recop + phiv1_recon)/2;
213 phiv2_reco = 0.5 * std::atan2( phi_reco_sin2phi,phi_reco_cos2phi );
215 <<
" PhiR = " << phiR
216 <<
" PhiV1Reco = " << phiv1_reco
217 <<
" PhiV2Reco = " << phiv2_reco <<
endmsg;
220 double phiR_v1corr = phiR;
221 if( phiR >
M_PI ) phiR_v1corr = phiR_v1corr - 2*
M_PI;
223 double phiR_v2corr = phiR;
224 if (phiR >
M_PI/2) phiR_v2corr -=
M_PI;
225 if (phiR > 3*
M_PI/2) phiR_v2corr -= 2*
M_PI;
230 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 CheckFlow::finalize |
( |
| ) |
|
Definition at line 233 of file CheckFlow.cxx.
234 msg(MSG::INFO) <<
">>> CheckFlow from finalize" <<
endmsg;
236 return StatusCode::SUCCESS;
◆ initialize()
StatusCode CheckFlow::initialize |
( |
| ) |
|
Definition at line 34 of file CheckFlow.cxx.
41 m_b =
new TH1F(
"b",
"Impact parameter",35,0.,35.0);
50 "Phi - PhiR positive eta",
53 "Phi - PhiR negative eta",
57 20,0,20, 30,-7.5,7.5, 25,0,5000);
59 "Tracks vs b, eta, pt",
60 20,0,20, 30,-7.5,7.5, 25,0,5000);
62 SmartIF<ITHistSvc> rootHistSvc{Gaudi::svcLocator()->service(
"THistSvc")};
65 return StatusCode::FAILURE;
68 std::string StreamAndPath=
"/FlowOutPut/";
69 std::string histPath = StreamAndPath;
70 if ( rootHistSvc->regHist(histPath+
m_hgenerated->GetName(),
72 msg(MSG::WARNING) <<
"Can't book "
75 if ( rootHistSvc->regHist(histPath+
m_b->GetName(),
77 msg(MSG::WARNING) <<
"Can't book "
80 if ( rootHistSvc->regHist(histPath+
m_phi->GetName(),
82 msg(MSG::WARNING) <<
"Can't book "
85 if ( rootHistSvc->regHist(histPath+
m_phiR->GetName(),
87 msg(MSG::WARNING) <<
"Can't book "
92 msg(MSG::WARNING) <<
"Can't book "
97 msg(MSG::WARNING) <<
"Can't book "
102 msg(MSG::WARNING) <<
"Can't book "
107 msg(MSG::WARNING) <<
"Can't book "
112 msg(MSG::WARNING) <<
"Can't book "
115 if ( rootHistSvc->regHist(histPath+
m_v2betapth->GetName(),
117 msg(MSG::WARNING) <<
"Can't book "
120 if ( rootHistSvc->regHist(histPath+
m_ebetapth->GetName(),
122 msg(MSG::WARNING) <<
"Can't book "
129 return StatusCode::SUCCESS;
◆ 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()
◆ CheckFlow
CheckFlow.CheckFlow = job.CheckFlow |
◆ EvtMax
◆ InputCollections
CheckFlow.InputCollections |
◆ job
CheckFlow.job = AlgSequence() |
◆ m_b
◆ m_bcut_max
DoubleProperty CheckFlow::m_bcut_max {this, "ImpactCutMax", 99.} |
|
private |
◆ m_bcut_min
DoubleProperty CheckFlow::m_bcut_min {this, "ImpactCutMin", 0.} |
|
private |
◆ m_detStore
◆ m_ebetapth
TH3F* CheckFlow::m_ebetapth {} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hgenerated
TH1F* CheckFlow::m_hgenerated {} |
|
private |
◆ m_hijingKey
◆ m_key
StringProperty CheckFlow::m_key {this, "McEventKey", "FLOW_EVENT"} |
|
private |
◆ m_phi
TH1F* CheckFlow::m_phi {} |
|
private |
◆ m_phi_vs_phiR
TH1F* CheckFlow::m_phi_vs_phiR {} |
|
private |
◆ m_phi_vs_phiR_etan
TH1F* CheckFlow::m_phi_vs_phiR_etan {} |
|
private |
◆ m_phi_vs_phiR_etap
TH1F* CheckFlow::m_phi_vs_phiR_etap {} |
|
private |
◆ m_phiR
TH1F* CheckFlow::m_phiR {} |
|
private |
◆ m_phiv1reco_vs_phiR
TH2F* CheckFlow::m_phiv1reco_vs_phiR {} |
|
private |
◆ m_phiv2reco_vs_phiR
TH2F* CheckFlow::m_phiv2reco_vs_phiR {} |
|
private |
◆ m_produceHistogram
BooleanProperty CheckFlow::m_produceHistogram {this, "HistogramFlag", true} |
|
private |
◆ m_ptcut_max
DoubleProperty CheckFlow::m_ptcut_max {this, "PtCutMax", 999999.} |
|
private |
◆ m_ptcut_min
DoubleProperty CheckFlow::m_ptcut_min {this, "PtCutMin", 0.} |
|
private |
◆ m_rapcut_max
DoubleProperty CheckFlow::m_rapcut_max {this, "RapidityCutMax", 5.5} |
|
private |
◆ m_rapcut_min
DoubleProperty CheckFlow::m_rapcut_min {this, "RapidityCutMin", 0.} |
|
private |
◆ m_tesIO
◆ m_v2betapth
TH3F* CheckFlow::m_v2betapth {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ McEventKey
◆ Output
◆ OutputLevel
◆ RapidityCutMax
The documentation for this class was generated from the following files:
DoubleProperty m_ptcut_min
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F * m_phi_vs_phiR_etap
TH2F * m_phiv1reco_vs_phiR
virtual void setOwner(IDataHandleHolder *o)=0
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.
StatusCode getMC(MCParticleCollection &mcParticles, const bool ifgen=false, const std::string &key="GEN_EVENT") const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
TH1F * m_phi_vs_phiR_etan
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DoubleProperty m_rapcut_max
TruthHelper::GenAccessIO * m_tesIO
TH2F * m_phiv2reco_vs_phiR
DoubleProperty m_bcut_max
DoubleProperty m_rapcut_min
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
DoubleProperty m_ptcut_max
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadHandleKey< HijingEventParams > m_hijingKey