ATLAS Offline Software
Loading...
Searching...
No Matches
CheckFlow_New_Minbias Class Reference

#include <CheckFlow_New_Minbias.h>

Inheritance diagram for CheckFlow_New_Minbias:
Collaboration diagram for CheckFlow_New_Minbias:

Public Member Functions

 CheckFlow_New_Minbias (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Public Attributes

 InputCollections
 job = AlgSequence()
 EvtMax
 OutputLevel
 Output
 CheckFlow_New_Minbias = job.CheckFlow_New_Minbias
 McEventKey
 RapidityCutMax

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

enum  { n_ptbin =16 , n_etabin =8 , n_b_bins =19 }
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_key
bool m_produceHistogram
double m_bcut_min
double m_bcut_max
double m_ptcut_min
double m_ptcut_max
double m_rapcut_min
double m_rapcut_max
TH1D * m_hist_Psi_n_true [6][n_b_bins] {}
TH1D * m_hist_Psi_n_reco [6][n_b_bins] {}
TH1D * m_hist_psi_corr_true [36][n_b_bins] {}
TH1D * m_hist_psi_corr_reco [36][n_b_bins] {}
TH1D * m_hist_Psi_n_ebe [6][n_b_bins] {}
TH1D * m_hist_Psi_n_ebe_pt [6][n_b_bins] {}
TH1D * m_hist_vn_ebe [6][n_b_bins] {}
TH1D * m_hist_vn_ebe_ID1 [6][n_b_bins] {}
TH1D * m_hist_vn_ebe_ID2 [6][n_b_bins] {}
TProfile * m_profile_pt_dep [6][n_b_bins][n_etabin] {}
TProfile * m_profile_eta_dep [6][n_b_bins][n_ptbin] {}
TProfile * m_profile_pt_dep_reco [6][n_b_bins][n_etabin] {}
TProfile * m_profile_eta_dep_reco [6][n_b_bins][n_ptbin] {}
TProfile * m_profile_b_dep [6][n_ptbin][n_etabin] {}
TProfile * m_profile_b_dep_reco [6][n_ptbin][n_etabin] {}
TProfile * m_profile_resolution [6] {}
TruthHelper::GenAccessIOm_tesIO {}
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 33 of file CheckFlow_New_Minbias.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
n_ptbin 
n_etabin 
n_b_bins 

Definition at line 52 of file CheckFlow_New_Minbias.h.

52 {
53 n_ptbin=16,
54 n_etabin=8,
55 n_b_bins=19
56 };

Constructor & Destructor Documentation

◆ CheckFlow_New_Minbias()

CheckFlow_New_Minbias::CheckFlow_New_Minbias ( const std::string & name,
ISvcLocator * pSvcLocator )

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode CheckFlow_New_Minbias::execute ( )

Definition at line 200 of file CheckFlow_New_Minbias.cxx.

200 {
201
202 ATH_MSG_INFO(">>> CheckFlow_New_Minbias from execute");
203 const float pt_binvals[]={0.0,0.25,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,6.0,8.0,12.0,16.0,20.0,30.0,40.0};
204 const float b_bin_vals[]={0.0,3.4955,4.9315,6.0375,6.9695,7.7895,8.5335,9.2135,9.8515,10.4485,11.0175,11.554,12.070,12.560,13.033,13.492,13.944,14.409,14.929,15.6425};
205 const float eta_bin_max = 4.0;
206 const HijingEventParams *hijing_pars{};
207
208
209 CHECK(evtStore()->retrieve(hijing_pars, "Hijing_event_params"));
210 float b = hijing_pars->get_b();
211 float Psi_n[6]{},Psi_n_reco[6]{};
212 for(int ihar=0;ihar<6;ihar++){Psi_n[ihar]=hijing_pars->get_psi(ihar+1);}
213 ATH_MSG_INFO("SOUMYA "<<hijing_pars->get_psi(1)<<" "<<hijing_pars->get_psi(2)<<" "\
214 <<hijing_pars->get_psi(3)<<" "<<hijing_pars->get_psi(4)<<" "\
215 <<hijing_pars->get_psi(5)<<" "<<hijing_pars->get_psi(6)<<" "\
216 <<b);
217
218
219
220 int ib_imp=-1;
221 for(int ib=0;ib<n_b_bins;ib++){if(b<b_bin_vals[ib+1]) {ib_imp=ib;break;}}
222 if(ib_imp<0) return StatusCode::SUCCESS;
223 if(ib_imp==0) {std::cout<<"AAAAAAAAAAAAAAAAAAAA "<<b<<std::endl;}
224
225 // Check cut on impact parameter b
226 if(b<m_bcut_min || b>m_bcut_max) return StatusCode::SUCCESS;
227
228
229 double ngenerated_pos = 0,ngenerated_pt_pos=0;
230 double ngenerated_neg = 0,ngenerated_pt_neg=0;
231 double cos_n_pos[6]{},sin_n_pos[6]{},cos_n_pt_pos[6]{},sin_n_pt_pos[6]{};
232 double cos_n_neg[6]{},sin_n_neg[6]{},cos_n_pt_neg[6]{},sin_n_pt_neg[6]{};
233 double cos_ID1[6]{},sin_ID1[6]{},tot_ID1=0.0;
234 double cos_ID2[6]{},sin_ID2[6]{},tot_ID2=0.0;
235
236
237 // Iterate over MC particles
238 std::vector<HepMC::ConstGenParticlePtr> particles;
239 CHECK(m_tesIO->getMC(particles, false, m_key));
240
241 for (auto pitr: particles) {
242 int pid = pitr->pdg_id();
243 int p_stat = pitr->status();
244 double pt = pitr->momentum().perp();
245 double rapid = pitr->momentum().pseudoRapidity();
246 double phi = pitr->momentum().phi();
247 ATH_MSG_DEBUG(" PID = " << pid << " Status = " << p_stat \
248 << " Eta = " << rapid << " Phi = " << phi);
249
250 if( (std::abs(rapid) >= m_rapcut_min) &&
251 (std::abs(rapid) <= m_rapcut_max) &&
252 (std::abs(pt) >= m_ptcut_min ) &&
253 (std::abs(pt) <= m_ptcut_max)) {
254
255 for(int ihar=0;ihar<6;ihar++){
256 float temp=(ihar+1)*(phi-Psi_n[ihar]);
257
258 int ieta= (int)(std::abs(rapid)*n_etabin/eta_bin_max);
259 if(ieta>=0 && ieta<n_etabin) m_profile_pt_dep [ihar][ib_imp][ieta]->Fill(pt/1000,cos(temp));
260
261
262 float temp_pt=pt/1000;
263 for(int ipt=0;ipt<n_ptbin;ipt++){
264 if(temp_pt<pt_binvals[ipt+1]){
265 m_profile_eta_dep[ihar][ib_imp][ipt]->Fill(rapid ,cos(temp));
266 if(ieta>=0 && ieta<n_etabin) m_profile_b_dep [ihar][ipt][ieta]->Fill(ib_imp,cos(temp));
267 break;
268 }
269 }
270
271 if( rapid >3.2 && rapid< 4.9){
272 cos_n_pos[ihar]+=std::cos( (ihar+1)*phi);
273 sin_n_pos[ihar]+=std::sin( (ihar+1)*phi);
274 ngenerated_pos++;
275
276 cos_n_pt_pos[ihar]+=pt*cos( (ihar+1)*phi);
277 sin_n_pt_pos[ihar]+=pt*sin( (ihar+1)*phi);
278 ngenerated_pt_pos +=pt;
279 }
280 if( rapid <-3.2 && rapid >-4.9){
281 cos_n_neg[ihar]+=std::cos( (ihar+1)*phi);
282 sin_n_neg[ihar]+=std::sin( (ihar+1)*phi);
283 ngenerated_neg++;
284
285 cos_n_pt_neg[ihar]+=pt*std::cos( (ihar+1)*phi);
286 sin_n_pt_neg[ihar]+=pt*std::sin( (ihar+1)*phi);
287 ngenerated_pt_neg +=pt;
288 }
289 }
290 }
291
292 //EbE vn for ID acceptance end pt>0.5GeV
293 if(std::abs(pt)>=500){
294 tot_ID1++;
295 for(int ihar=0;ihar<6;ihar++){
296 cos_ID1[ihar]+=cos((ihar+1)*phi);
297 sin_ID1[ihar]+=sin((ihar+1)*phi);
298 }
299 }
300 if(std::abs(pt)>=0){
301 tot_ID2++;
302 for(int ihar=0;ihar<6;ihar++){
303 cos_ID2[ihar]+=cos((ihar+1)*phi);
304 sin_ID2[ihar]+=sin((ihar+1)*phi);
305 }
306 }
307 }
308
309
310//EbE vn for ID acceptance end pt>0.5GeV
311 for(int ihar=0;ihar<6;ihar++){
312 if(tot_ID1>0.01){
313 double temp1= std::sqrt(cos_ID1[ihar]*cos_ID1[ihar] + sin_ID1[ihar]*sin_ID1[ihar])/tot_ID1;
314 m_hist_vn_ebe_ID1[ihar][ib_imp]->Fill(temp1);
315 }
316 if(tot_ID2>0.01){
317 double temp2= std::sqrt(cos_ID2[ihar]*cos_ID2[ihar] + sin_ID2[ihar]*sin_ID2[ihar])/tot_ID2;
318 m_hist_vn_ebe_ID2[ihar][ib_imp]->Fill(temp2);
319 }
320 }
321
322
323// Calculate the event by event vn and also the reconstructed Psi_n angles
324// Also make correlation histos between Psi_n_truth and Psi_n_reco
325 float cos_n[6]{},sin_n[6]{},cos_n_pt[6]{},sin_n_pt[6]{};
326 float Psi_n_reco_pos[6]{},Psi_n_reco_neg[6]{};
327 const auto total = ngenerated_pos+ngenerated_neg;
328 const auto nTotalPt = ngenerated_pt_pos+ngenerated_pt_neg;
329 if ((total != 0) and (nTotalPt != 0))[[likely]]{
330 for(int ihar=0;ihar<6;ihar++){
331 //coverity[DIVIDE_BY_ZERO:FALSE]
332 cos_n[ihar] = ( cos_n_pos[ihar]+ cos_n_neg[ihar] ) / total;
333 //coverity[DIVIDE_BY_ZERO:FALSE]
334 sin_n[ihar] = ( sin_n_pos[ihar]+ sin_n_neg[ihar] ) / total;
335
336 float psi_reco=std::atan2(sin_n[ihar],cos_n[ihar])/(ihar+1);
337 m_hist_Psi_n_ebe[ihar][ib_imp]->Fill( (ihar+1)*(psi_reco-Psi_n[ihar]) );
338 m_hist_vn_ebe [ihar][ib_imp]->Fill(std::sqrt(cos_n[ihar]*cos_n[ihar] +sin_n[ihar]*sin_n[ihar] ));
339
340 Psi_n_reco_pos[ihar]=std::atan2(sin_n_pos[ihar],cos_n_pos[ihar])/ (ihar+1);
341 Psi_n_reco_neg[ihar]=std::atan2(sin_n_neg[ihar],cos_n_neg[ihar])/ (ihar+1);
342 Psi_n_reco [ihar]=psi_reco;
343
344 //coverity[DIVIDE_BY_ZERO:FALSE]
345 cos_n_pt[ihar] = ( cos_n_pt_pos[ihar]+ cos_n_pt_neg[ihar] ) / nTotalPt;
346 //coverity[DIVIDE_BY_ZERO:FALSE]
347 sin_n_pt[ihar] = ( sin_n_pt_pos[ihar]+ sin_n_pt_neg[ihar] ) / nTotalPt;
348
349 psi_reco=std::atan2(sin_n_pt[ihar],cos_n_pt[ihar])/(ihar+1);
350 m_hist_Psi_n_ebe_pt[ihar][ib_imp]->Fill( (ihar+1)*(psi_reco-Psi_n[ihar]) );
351 }
352 }
353
354// Make the plots for the correlation between Psi_n truth (for different n) (same for Psi_n reco)
355 for(int ihar=0;ihar<6;ihar++){
356 m_hist_Psi_n_true[ihar][ib_imp]->Fill((ihar+1)*Psi_n[ihar]);
357 m_hist_Psi_n_reco[ihar][ib_imp]->Fill((ihar+1)*Psi_n_reco[ihar]);
358
359 float psi1,psi2;
360 for(int ihar2=0;ihar2<6;ihar2++){
361 psi1=(ihar+1)*Psi_n[ihar];psi2=(ihar2+1)*Psi_n[ihar2];
362 m_hist_psi_corr_true[ihar*6+ihar2][ib_imp]->Fill( std::atan2( std::sin(psi1-psi2),std::cos(psi1-psi2) ) );
363
364 psi1=(ihar+1)*Psi_n_reco[ihar];psi2=(ihar2+1)*Psi_n_reco[ihar2];
365 m_hist_psi_corr_reco[ihar*6+ihar2][ib_imp]->Fill( std::atan2( std::sin(psi1-psi2),std::cos(psi1-psi2) ) );
366 }
367 }
368
369
370
371
372
373// calculate the pt and eta dependence using the Psi_reco angles also fill the resolution TProfile
374 for(int ihar=0;ihar<6;ihar++){
375 m_profile_resolution[ihar]->Fill( ib_imp, cos( (ihar+1) * (Psi_n_reco_pos[ihar] - Psi_n_reco_neg[ihar]) ) );
376 if(ib_imp==0) {std::cout<<"i11111111111111111111 "<<b<<std::endl;}
377 }
378 for (auto pitr: particles) {
379 double pt = pitr->momentum().perp();
380 double rapid = pitr->momentum().pseudoRapidity();
381 double phi = pitr->momentum().phi();
382 if( (std::abs(rapid) >= m_rapcut_min) && (std::abs(rapid) <= m_rapcut_max) &&
383 (std::abs(pt) >= m_ptcut_min) && (std::abs(pt) <= m_ptcut_max) ) {
384
385 for(int ihar=0;ihar<6;ihar++){
386 float temp=(ihar+1)*(phi-Psi_n_reco_pos[ihar]);
387 if(rapid>0) temp=(ihar+1)*(phi-Psi_n_reco_neg[ihar]);
388
389
390 int ieta= (int)(std::abs(rapid)*n_etabin/eta_bin_max);
391 if(ieta>=0 && ieta<n_etabin) m_profile_pt_dep_reco [ihar][ib_imp][ieta]->Fill(pt/1000,cos(temp));
392
393 float temp_pt=pt/1000;
394 for(int ipt=0;ipt<n_ptbin;ipt++){
395 if(temp_pt<pt_binvals[ipt+1]){
396 m_profile_eta_dep_reco[ihar][ib_imp][ipt]->Fill(rapid ,cos(temp));
397 if(ieta>=0 && ieta<n_etabin) m_profile_b_dep_reco [ihar][ipt][ieta]->Fill(ib_imp,cos(temp));
398 break;
399 }
400 }
401 }
402 }
403 }
404
405 return StatusCode::SUCCESS;
406}
Scalar phi() const
phi method
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
TProfile * m_profile_pt_dep_reco[6][n_b_bins][n_etabin]
TH1D * m_hist_Psi_n_true[6][n_b_bins]
TH1D * m_hist_vn_ebe_ID2[6][n_b_bins]
TH1D * m_hist_psi_corr_true[36][n_b_bins]
TProfile * m_profile_b_dep[6][n_ptbin][n_etabin]
TProfile * m_profile_pt_dep[6][n_b_bins][n_etabin]
TH1D * m_hist_vn_ebe_ID1[6][n_b_bins]
TProfile * m_profile_eta_dep[6][n_b_bins][n_ptbin]
TProfile * m_profile_eta_dep_reco[6][n_b_bins][n_ptbin]
TH1D * m_hist_psi_corr_reco[36][n_b_bins]
TH1D * m_hist_Psi_n_ebe[6][n_b_bins]
TProfile * m_profile_b_dep_reco[6][n_ptbin][n_etabin]
TH1D * m_hist_vn_ebe[6][n_b_bins]
TH1D * m_hist_Psi_n_reco[6][n_b_bins]
TH1D * m_hist_Psi_n_ebe_pt[6][n_b_bins]
TruthHelper::GenAccessIO * m_tesIO
float get_psi(int n) const
StatusCode getMC(MCParticleCollection &mcParticles, const bool ifgen=false, const std::string &key="GEN_EVENT") const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
#define likely(x)

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode CheckFlow_New_Minbias::finalize ( )

Definition at line 408 of file CheckFlow_New_Minbias.cxx.

408 {
409
410 ATH_MSG_INFO(">>> CheckFlow_New from finalize");
411
412 return StatusCode::SUCCESS;
413}

◆ initialize()

StatusCode CheckFlow_New_Minbias::initialize ( )

Definition at line 53 of file CheckFlow_New_Minbias.cxx.

53 {
54 StatusCode result = StatusCode::SUCCESS;
55
56 ATH_MSG_INFO(">>> CheckFlow_New_Minbias from Initialize");
57
58
59 ServiceHandle<ITHistSvc> rootHistSvc("THistSvc",name());
60 CHECK( rootHistSvc.retrieve() );
61 std::string histPath = "/FlowOutPut/";
62 std::vector<TH1*> hist_vec;
63 char name[100]{},name1[100]{};
64
65
66 for (int ihar=0;ihar<6;ihar++){
67 for(int ib_imp=0;ib_imp<n_b_bins;ib_imp++){
68
69 const float pt_binvals[]={0.0,0.25,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,6.0,8.0,12.0,16.0,20.0,30.0,40.0};
70 //const float b_bin_vals[]={0.0,3.4955,4.9315,6.0375,6.9695,7.7895,8.5335,9.2135,9.8515,10.4485,11.0175,
71 // 11.554,12.070,12.560,13.033,13.492,13.944,14.409,14.929,15.6425};
72 const float eta_bin_max = 4.0;
73//----------------------------------------The reconstructed and truth Psi and the correlations between them-----------------------------
74 sprintf(name,"hist_Psi_%d_true_b%d",ihar+1,ib_imp);
75 sprintf(name1,"Truth Psi_{%d} distribution;%dPsi_{%d} Truth;events",ihar+1,ihar+1,ihar+1);
76 m_hist_Psi_n_true [ihar][ib_imp]=new TH1D (name,name1,1000,-M_PI,M_PI);
77 hist_vec.push_back(m_hist_Psi_n_true [ihar][ib_imp]);
78
79 sprintf(name,"hist_Psi_%d_reco_b%d",ihar+1,ib_imp);
80 sprintf(name1,"Reconstructed Psi_{%d} distribution;%dPsi_{%d} Reco;events",ihar+1,ihar+1,ihar+1);
81 m_hist_Psi_n_reco [ihar][ib_imp]=new TH1D (name,name1,1000,-M_PI,M_PI);
82 hist_vec.push_back(m_hist_Psi_n_reco [ihar][ib_imp]);
83
84
85 for (int ihar2=0;ihar2<6;ihar2++){
86 int ihar_i=ihar*6+ihar2;
87
88 sprintf(name,"hist_Psi_corr_true_b%d_%d_%d",ib_imp,ihar+1,ihar2+1);
89 sprintf(name1,"true Psi_{%d} -Psi_{%d};%dPsi_{%d} -%dPsi_{%d} ;events",ihar+1,ihar2+1,ihar+1,ihar+1,ihar2+1,ihar2+1);
90 m_hist_psi_corr_true [ihar_i][ib_imp]=new TH1D (name,name1,1000,-2*M_PI,2*M_PI);
91 hist_vec.push_back(m_hist_psi_corr_true [ihar_i][ib_imp]);
92
93 sprintf(name,"hist_Psi_corr_reco_%d_%d_%d",ib_imp,ihar+1,ihar2+1);
94 sprintf(name1,"reco Psi_{%d} -Psi_{%d};%dPsi_{%d} -%dPsi_{%d} ;events",ihar+1,ihar2+1,ihar+1,ihar+1,ihar2+1,ihar2+1);
95 m_hist_psi_corr_reco [ihar_i][ib_imp]=new TH1D (name,name1,1000,-2*M_PI,2*M_PI);
96 hist_vec.push_back(m_hist_psi_corr_reco [ihar_i][ib_imp]);
97 }
98//------------------------------------------------------------------------------------------
99
100
101
102//-----------------------------------------------------------------------------------------
103 //integrated vn event by event
104 sprintf(name,"hist_v%d_b%d_ebe",ihar+1,ib_imp);
105 sprintf(name1,"v%d;v%d;events",ihar+1,ihar+1);
106 m_hist_vn_ebe [ihar][ib_imp]=new TH1D (name,name1,1000,-0.5,0.5);
107 hist_vec.push_back(m_hist_vn_ebe [ihar][ib_imp]);
108
109 sprintf(name,"hist_v%d_b%d_ebe_ID1",ihar+1,ib_imp);
110 sprintf(name1,"v%d;v%d;events",ihar+1,ihar+1);
111 m_hist_vn_ebe_ID1 [ihar][ib_imp]=new TH1D (name,name1,800,0.0,0.4);
112 sprintf(name,"hist_v%d_b%d_ebe_ID2",ihar+1,ib_imp);
113 m_hist_vn_ebe_ID2 [ihar][ib_imp]=new TH1D (name,name1,800,0.0,0.4);
114 hist_vec.push_back(m_hist_vn_ebe_ID1 [ihar][ib_imp]);
115 hist_vec.push_back(m_hist_vn_ebe_ID2 [ihar][ib_imp]);
116
117 sprintf(name ,"hist_Psi%d_b%d_ebe",ihar+1,ib_imp);
118 sprintf(name1,"%d#Delta#Psi;%d(#Psi_{reco}-#Psi_{Truth});events",ihar+1,ihar+1);
119 m_hist_Psi_n_ebe [ihar][ib_imp]=new TH1D (name,name1,1000,-M_PI,M_PI);
120 hist_vec.push_back(m_hist_Psi_n_ebe [ihar][ib_imp]);
121
122 sprintf(name ,"hist_Psi%d_b%d_ebe_pt",ihar+1,ib_imp);
123 sprintf(name1,"%d#Delta#Psi (pT weighted);%d(#Psi_{reco}-#Psi_{Truth});events",ihar+1,ihar+1);
124 m_hist_Psi_n_ebe_pt [ihar][ib_imp]=new TH1D (name,name1,1000,-M_PI,M_PI);
125 hist_vec.push_back(m_hist_Psi_n_ebe_pt [ihar][ib_imp]);
126//-----------------------------------------------------------------------------------------
127
128
129
130
131
132//-----------------------------------------------------------------------------------------
133 for(int ieta=0;ieta<n_etabin;ieta++){
134 sprintf(name ,"profile_pt_dep_%d_eta%d_b%d" ,ihar+1,ieta,ib_imp);
135 sprintf(name1,"v%d vs pT (eta%d);pT;v%d",ihar+1,ieta,ihar+1);
136 m_profile_pt_dep [ihar][ib_imp][ieta]=new TProfile (name,name1,n_ptbin,pt_binvals);
137 hist_vec.push_back(m_profile_pt_dep [ihar][ib_imp][ieta]);
138 }
139
140 for(int ipt=0;ipt<n_ptbin;ipt++){
141 sprintf(name ,"profile_eta_dep_%d_pt%d_b%d",ihar+1,ipt,ib_imp);
142 sprintf(name1,"v%d vs #eta; (ipt%d)#eta;v%d",ihar+1,ipt,ihar+1);
143 m_profile_eta_dep [ihar][ib_imp][ipt]=new TProfile (name,name1,2*n_etabin, -eta_bin_max,eta_bin_max);
144 hist_vec.push_back(m_profile_eta_dep [ihar][ib_imp][ipt]);
145 }
146
147
148 for(int ieta=0;ieta<n_etabin;ieta++){
149 sprintf(name ,"profile_pt_dep_reco_%d_eta%d_b%d",ihar+1,ieta,ib_imp);
150 sprintf(name1,"v%d vs pT (eta%d);pT;v%d",ihar+1,ieta,ihar+1);
151 m_profile_pt_dep_reco [ihar][ib_imp][ieta]=new TProfile (name,name1,n_ptbin,pt_binvals);
152 hist_vec.push_back(m_profile_pt_dep_reco [ihar][ib_imp][ieta]);
153 }
154
155
156 for(int ipt=0;ipt<n_ptbin;ipt++){
157 sprintf(name ,"profile_eta_dep_reco_%d_pt%d_b%d",ihar+1,ipt,ib_imp);
158 sprintf(name1,"v%d vs #eta (pt%d);#eta;v%d",ihar+1,ipt,ihar+1);
159 m_profile_eta_dep_reco [ihar][ib_imp][ipt]=new TProfile (name,name1,2*n_etabin, -eta_bin_max,eta_bin_max);
160 hist_vec.push_back(m_profile_eta_dep_reco [ihar][ib_imp][ipt]);
161 }
162 }
163
164
165
166 for(int ipt=0;ipt<n_ptbin;ipt++){
167 for(int ieta=0;ieta<n_etabin;ieta++){
168 sprintf(name ,"profile_b_dep_%d_pt%d_eta%d",ihar+1,ipt,ieta);
169 sprintf(name1,"v%d vs cent ;cent;v%d",ihar+1,ihar+1);
170 m_profile_b_dep [ihar][ipt][ieta]=new TProfile (name,name1,n_b_bins,-0.5,n_b_bins-0.5);
171 hist_vec.push_back(m_profile_b_dep [ihar][ipt][ieta]);
172
173 sprintf(name ,"profile_b_dep_reco_%d_pt%d_eta%d",ihar+1,ipt,ieta);
174 sprintf(name1,"v%d vs cent ;cent;v%d",ihar+1,ihar+1);
175 m_profile_b_dep_reco [ihar][ipt][ieta]=new TProfile (name,name1,n_b_bins,-0.5,n_b_bins-0.5);
176 hist_vec.push_back(m_profile_b_dep_reco [ihar][ipt][ieta]);
177 }
178 }
179
180 sprintf(name,"profile_resolution_%d",ihar+1);
181 m_profile_resolution[ihar]=new TProfile(name,"vn resolution;n;resolution",n_b_bins,-0.5,n_b_bins-0.5);
182 hist_vec.push_back(m_profile_resolution[ihar]);
183 }
184//-----------------------------------------------------------------------------------------
185
186 for(auto& hist: hist_vec){
187 CHECK(rootHistSvc->regHist(histPath+hist->GetName(),hist));
188 hist->GetXaxis()->CenterTitle();
189 hist->GetYaxis()->CenterTitle();
190 }
191
192
193 ATH_MSG_DEBUG("Histograms have been booked ");
194 m_tesIO = new TruthHelper::GenAccessIO();
195 return result;
196}
#define M_PI

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ CheckFlow_New_Minbias

CheckFlow_New_Minbias.CheckFlow_New_Minbias = job.CheckFlow_New_Minbias

Definition at line 51 of file CheckFlow_New_Minbias.py.

◆ EvtMax

CheckFlow_New_Minbias.EvtMax

Definition at line 35 of file CheckFlow_New_Minbias.py.

◆ InputCollections

CheckFlow_New_Minbias.InputCollections

Definition at line 13 of file CheckFlow_New_Minbias.py.

◆ job

CheckFlow_New_Minbias.job = AlgSequence()

Definition at line 27 of file CheckFlow_New_Minbias.py.

◆ m_bcut_max

double CheckFlow_New_Minbias::m_bcut_max
private

Definition at line 45 of file CheckFlow_New_Minbias.h.

◆ m_bcut_min

double CheckFlow_New_Minbias::m_bcut_min
private

Definition at line 44 of file CheckFlow_New_Minbias.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_hist_psi_corr_reco

TH1D* CheckFlow_New_Minbias::m_hist_psi_corr_reco[36][n_b_bins] {}
private

Definition at line 62 of file CheckFlow_New_Minbias.h.

62{};

◆ m_hist_psi_corr_true

TH1D* CheckFlow_New_Minbias::m_hist_psi_corr_true[36][n_b_bins] {}
private

Definition at line 61 of file CheckFlow_New_Minbias.h.

61{};

◆ m_hist_Psi_n_ebe

TH1D* CheckFlow_New_Minbias::m_hist_Psi_n_ebe[6][n_b_bins] {}
private

Definition at line 64 of file CheckFlow_New_Minbias.h.

64{};

◆ m_hist_Psi_n_ebe_pt

TH1D* CheckFlow_New_Minbias::m_hist_Psi_n_ebe_pt[6][n_b_bins] {}
private

Definition at line 65 of file CheckFlow_New_Minbias.h.

65{};

◆ m_hist_Psi_n_reco

TH1D* CheckFlow_New_Minbias::m_hist_Psi_n_reco[6][n_b_bins] {}
private

Definition at line 60 of file CheckFlow_New_Minbias.h.

60{};

◆ m_hist_Psi_n_true

TH1D* CheckFlow_New_Minbias::m_hist_Psi_n_true[6][n_b_bins] {}
private

Definition at line 59 of file CheckFlow_New_Minbias.h.

59{};

◆ m_hist_vn_ebe

TH1D* CheckFlow_New_Minbias::m_hist_vn_ebe[6][n_b_bins] {}
private

Definition at line 66 of file CheckFlow_New_Minbias.h.

66{};

◆ m_hist_vn_ebe_ID1

TH1D* CheckFlow_New_Minbias::m_hist_vn_ebe_ID1[6][n_b_bins] {}
private

Definition at line 67 of file CheckFlow_New_Minbias.h.

67{};

◆ m_hist_vn_ebe_ID2

TH1D* CheckFlow_New_Minbias::m_hist_vn_ebe_ID2[6][n_b_bins] {}
private

Definition at line 68 of file CheckFlow_New_Minbias.h.

68{};

◆ m_key

std::string CheckFlow_New_Minbias::m_key
private

Definition at line 41 of file CheckFlow_New_Minbias.h.

◆ m_produceHistogram

bool CheckFlow_New_Minbias::m_produceHistogram
private

Definition at line 42 of file CheckFlow_New_Minbias.h.

◆ m_profile_b_dep

TProfile* CheckFlow_New_Minbias::m_profile_b_dep[6][n_ptbin][n_etabin] {}
private

Definition at line 75 of file CheckFlow_New_Minbias.h.

75{};

◆ m_profile_b_dep_reco

TProfile* CheckFlow_New_Minbias::m_profile_b_dep_reco[6][n_ptbin][n_etabin] {}
private

Definition at line 76 of file CheckFlow_New_Minbias.h.

76{};

◆ m_profile_eta_dep

TProfile* CheckFlow_New_Minbias::m_profile_eta_dep[6][n_b_bins][n_ptbin] {}
private

Definition at line 71 of file CheckFlow_New_Minbias.h.

71{};

◆ m_profile_eta_dep_reco

TProfile* CheckFlow_New_Minbias::m_profile_eta_dep_reco[6][n_b_bins][n_ptbin] {}
private

Definition at line 73 of file CheckFlow_New_Minbias.h.

73{};

◆ m_profile_pt_dep

TProfile* CheckFlow_New_Minbias::m_profile_pt_dep[6][n_b_bins][n_etabin] {}
private

Definition at line 70 of file CheckFlow_New_Minbias.h.

70{};

◆ m_profile_pt_dep_reco

TProfile* CheckFlow_New_Minbias::m_profile_pt_dep_reco[6][n_b_bins][n_etabin] {}
private

Definition at line 72 of file CheckFlow_New_Minbias.h.

72{};

◆ m_profile_resolution

TProfile* CheckFlow_New_Minbias::m_profile_resolution[6] {}
private

Definition at line 78 of file CheckFlow_New_Minbias.h.

78{};

◆ m_ptcut_max

double CheckFlow_New_Minbias::m_ptcut_max
private

Definition at line 47 of file CheckFlow_New_Minbias.h.

◆ m_ptcut_min

double CheckFlow_New_Minbias::m_ptcut_min
private

Definition at line 46 of file CheckFlow_New_Minbias.h.

◆ m_rapcut_max

double CheckFlow_New_Minbias::m_rapcut_max
private

Definition at line 49 of file CheckFlow_New_Minbias.h.

◆ m_rapcut_min

double CheckFlow_New_Minbias::m_rapcut_min
private

Definition at line 48 of file CheckFlow_New_Minbias.h.

◆ m_tesIO

TruthHelper::GenAccessIO* CheckFlow_New_Minbias::m_tesIO {}
private

Definition at line 80 of file CheckFlow_New_Minbias.h.

80{};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ McEventKey

CheckFlow_New_Minbias.McEventKey

Definition at line 52 of file CheckFlow_New_Minbias.py.

◆ Output

CheckFlow_New_Minbias.Output

Definition at line 44 of file CheckFlow_New_Minbias.py.

◆ OutputLevel

CheckFlow_New_Minbias.OutputLevel

Definition at line 36 of file CheckFlow_New_Minbias.py.

◆ RapidityCutMax

CheckFlow_New_Minbias.RapidityCutMax

Definition at line 53 of file CheckFlow_New_Minbias.py.


The documentation for this class was generated from the following files: