From 93381cc6978fd1d995286fab70991c70bc996a20 Mon Sep 17 00:00:00 2001 From: nigmatkulov Date: Mon, 13 Nov 2023 22:30:54 +0300 Subject: [PATCH] Update centrality definition for FXT (#584) Update of the centrality definition for FXT (3, 3.2, 3.5, 3.9, and 7.7 GeV) and Collider (7.7 and 200 GeV) --------- Co-authored-by: Vinh Luong <61241657+lbavinh@users.noreply.github.com> Co-authored-by: lbavinh --- StRoot/StRefMultCorr/BadRun.h | 42 +- StRoot/StRefMultCorr/CentralityMaker.cxx | 6 + StRoot/StRefMultCorr/CentralityMaker.h | 14 +- StRoot/StRefMultCorr/Param.cxx | 1 + StRoot/StRefMultCorr/Param.h | 310 ++++++++-- StRoot/StRefMultCorr/StRefMultCorr.cxx | 654 ++++++++++++++++------ StRoot/StRefMultCorr/StRefMultCorr.h | 26 +- StRoot/StRefMultCorr/checkStRefMultCorr.C | 186 ++++++ 8 files changed, 1029 insertions(+), 210 deletions(-) create mode 100755 StRoot/StRefMultCorr/checkStRefMultCorr.C diff --git a/StRoot/StRefMultCorr/BadRun.h b/StRoot/StRefMultCorr/BadRun.h index c5d6dd0f9da..b7ec89c4460 100644 --- a/StRoot/StRefMultCorr/BadRun.h +++ b/StRoot/StRefMultCorr/BadRun.h @@ -32,13 +32,16 @@ const Int_t badrun_refmult_2017[nBadRun_refmult_2017] = { // Run 18 // 1. Au+Au at 27 GeV // 2. Ru+Ru and Zr+Zr at 200 GeV +// 3. Au+Au at 3.85 AGeV FXT (3 GeV in CMS) // -const Int_t nBadRun_refmult_2018 = 253; +const Int_t nBadRun_refmult_2018 = 277; const Int_t badrun_refmult_2018[nBadRun_refmult_2018] = { // Au+Au 27 GeV 19130085, 19131009, 19131010, 19131012, 19132063, 19133009, 19133010, 19133012, 19133013, 19133014, 19133018, 19134010, 19134011, 19135011, 19135013, 19135014, 19136016, 19137003, 19137022, 19137047, 19137050, 19137051, 19137052, 19137053, 19137056, 19137057, 19138008, 19138009, 19138014, 19139022, 19139023, 19139024, 19139026, 19139027, 19139028, 19139032, 19139033, 19139034, 19139037, 19140009, 19140014, 19141008, 19142005, 19142048, 19143008, 19143009, 19143010, 19143011, 19143012, 19143013, 19143014, 19143015, 19143016, 19143017, 19146016, 19147007, 19147008, 19147009, 19147010, 19147014, 19147015, 19147016, 19156002, 19156032, 19156044, 19156045, 19156046, 19157013, 19158003, 19158007, 19158009, 19158010, 19158011, 19158013, 19158014, 19158015, 19158017, 19158018, 19158019, 19160018, 19162002, 19162005, 19165015, 19165020, 19165021, 19167042, // Isobar - 19083049, 19083050, 19083051, 19083052, 19083053, 19083054, 19083055, 19083056, 19083057, 19083058, 19083059, 19083060, 19083061, 19083062, 19083063, 19083064, 19083065, 19083066, 19083067, 19084001, 19084002, 19084003, 19084004, 19084005, 19084006, 19084007, 19084008, 19084010, 19084011, 19084013, 19084022, 19084024, 19084025, 19084026, 19084027, 19084028, 19084029, 19084030, 19084031, 19084032, 19084033, 19084034, 19084035, 19084036, 19084037, 19084038, 19084039, 19084053, 19084055, 19084057, 19084059, 19084060, 19084061, 19084062, 19084063, 19084064, 19084065, 19084066, 19084067, 19084068, 19084070, 19084071, 19084072, 19085001, 19085002, 19085003, 19085004, 19085005, 19085006, 19085007, 19085008, 19085009, 19085010, 19085011, 19085012, 19085013, 19085014, 19085015, 19085016, 19085017, 19085018, 19085019, 19085020, 19085021, 19085023, 19085024, 19085025, 19085026, 19085058, 19086026, 19086060, 19086061, 19086062, 19086063, 19086064, 19086066, 19086067, 19086069, 19086070, 19086072, 19086073, 19086074, 19086076, 19086077, 19086080, 19087001, 19087012, 19087014, 19087015, 19087016, 19087017, 19087021, 19087022, 19087038, 19087042, 19088051, 19088052, 19088053, 19088055, 19090009, 19090010, 19090011, 19090012, 19090015, 19090016, 19090018, 19090019, 19090021, 19090022, 19090023, 19090024, 19090025, 19090032, 19092051, 19093042, 19093043, 19095061, 19096002, 19096005, 19096006, 19096057, 19097057, 19098017, 19098018, 19098020, 19100045, 19102023, 19102054, 19103007, 19103022, 19103041, 19105024, 19105026, 19106023, 19106034, 19107045, 19110015, 19110039, 19112012, 19112029, 19115020, 19116035, 19120009, 19120047, 19120048, 19122004, 19122005 + 19083049, 19083050, 19083051, 19083052, 19083053, 19083054, 19083055, 19083056, 19083057, 19083058, 19083059, 19083060, 19083061, 19083062, 19083063, 19083064, 19083065, 19083066, 19083067, 19084001, 19084002, 19084003, 19084004, 19084005, 19084006, 19084007, 19084008, 19084010, 19084011, 19084013, 19084022, 19084024, 19084025, 19084026, 19084027, 19084028, 19084029, 19084030, 19084031, 19084032, 19084033, 19084034, 19084035, 19084036, 19084037, 19084038, 19084039, 19084053, 19084055, 19084057, 19084059, 19084060, 19084061, 19084062, 19084063, 19084064, 19084065, 19084066, 19084067, 19084068, 19084070, 19084071, 19084072, 19085001, 19085002, 19085003, 19085004, 19085005, 19085006, 19085007, 19085008, 19085009, 19085010, 19085011, 19085012, 19085013, 19085014, 19085015, 19085016, 19085017, 19085018, 19085019, 19085020, 19085021, 19085023, 19085024, 19085025, 19085026, 19085058, 19086026, 19086060, 19086061, 19086062, 19086063, 19086064, 19086066, 19086067, 19086069, 19086070, 19086072, 19086073, 19086074, 19086076, 19086077, 19086080, 19087001, 19087012, 19087014, 19087015, 19087016, 19087017, 19087021, 19087022, 19087038, 19087042, 19088051, 19088052, 19088053, 19088055, 19090009, 19090010, 19090011, 19090012, 19090015, 19090016, 19090018, 19090019, 19090021, 19090022, 19090023, 19090024, 19090025, 19090032, 19092051, 19093042, 19093043, 19095061, 19096002, 19096005, 19096006, 19096057, 19097057, 19098017, 19098018, 19098020, 19100045, 19102023, 19102054, 19103007, 19103022, 19103041, 19105024, 19105026, 19106023, 19106034, 19107045, 19110015, 19110039, 19112012, 19112029, 19115020, 19116035, 19120009, 19120047, 19120048, 19122004, 19122005, + // Au+Au 3.85 AGeV + 19151029, 19151045, 19152001, 19152078, 19153023, 19153032, 19153065, 19154012, 19154013, 19154014, 19154015, 19154016, 19154017, 19154018, 19154019, 19154020,19154021,19154022,19154023,19154024, 19154026,19154046,19154051, 19154056 }; // Run14, P16id production @@ -66,16 +69,47 @@ const Int_t badrun_grefmult_2016[nBadRun_grefmult_2016] = { // 1. Au+Au 19.6 GeV (374) // 2. Au+Au 14.6 GeV (bad runs: 153 + injection runs: 403 = 556) // 3. Au+Au 200 GeV (5) +// 4. Au+Au 4.59 AGeV (10) = 3.2 GeV +// 5. Au+Au 7.3 AGeV (1) = 3.9 GeV // -const Int_t nBadRun_refmult_2019 = 935; +const Int_t nBadRun_refmult_2019 = 951; const Int_t badrun_refmult_2019[nBadRun_refmult_2019] = { // Au+Au 19.6 GeV 20057007, 20057025, 20057026, 20057050, 20058001, 20058002, 20058003, 20058004, 20058005, 20060012, 20060022, 20060025, 20060060, 20060061, 20060062, 20062010, 20062011, 20062012, 20062036, 20063011, 20063034, 20063035, 20063036, 20063039, 20064008, 20064009, 20064011, 20064012, 20064040, 20065018, 20067014, 20067023, 20067024, 20067029, 20067030, 20067045, 20067046, 20069030, 20069032, 20069054, 20070042, 20070043, 20070044, 20070047, 20071001, 20071004, 20071005, 20071006, 20071027, 20071037, 20072034, 20072035, 20072036, 20072039, 20072041, 20072045, 20072047, 20073071, 20073072, 20073076, 20074001, 20074003, 20074004, 20074005, 20074007, 20074008, 20074009, 20074012, 20074014, 20074017, 20074018, 20074020, 20074021, 20074026, 20074027, 20074029, 20074032, 20074033, 20074034, 20074044, 20074045, 20075001, 20075002, 20075006, 20075007, 20075009, 20075011, 20075013, 20081002, 20081014, 20082060, 20082065, 20083024, 20086012, 20087007, 20089008, 20090024, 20091011, 20092054, 20062007, 20062009, 20065017, 20065056, 20065060, 20066001, 20066008, 20066015, 20066019, 20066023, 20066026, 20066066, 20066067, 20066068, 20066073, 20066078, 20067001, 20067004, 20067009, 20067012, 20067015, 20067016, 20067019, 20067028, 20067038, 20067041, 20067047, 20068001, 20068004, 20068008, 20068012, 20068019, 20068026, 20068034, 20068051, 20068055, 20068058, 20068060, 20068064, 20069001, 20069004, 20069007, 20069010, 20069020, 20069023, 20069026, 20069031, 20069033, 20069042, 20069050, 20069053, 20069057, 20069060, 20070002, 20070005, 20070010, 20070013, 20070016, 20070019, 20070041, 20070045, 20071003, 20071007, 20071010, 20071013, 20071016, 20071019, 20071024, 20071029, 20071036, 20071041, 20071044, 20071047, 20071050, 20071053, 20071056, 20071059, 20071063, 20072002, 20072005, 20072009, 20072012, 20072016, 20072037, 20072038, 20072046, 20072050, 20072055, 20073002, 20073006, 20073013, 20073017, 20073022, 20073025, 20073074, 20074002, 20074006, 20074010, 20074011, 20074016, 20074019, 20074023, 20074030, 20074043, 20074046, 20075004, 20075008, 20075014, 20075010, 20075015, 20075020, 20075025, 20075031, 20075035, 20075039, 20075043, 20075048, 20075054, 20075057, 20075060, 20075066, 20076001, 20076004, 20076007, 20076010, 20076013, 20076017, 20076021, 20076025, 20076028, 20076031, 20076034, 20076037, 20076040, 20076045, 20076048, 20076051, 20076054, 20076059, 20077002, 20077005, 20077008, 20077011, 20077014, 20077017, 20077018, 20078001, 20078007, 20078013, 20078016, 20078019, 20078022, 20078028, 20078032, 20078035, 20078040, 20078043, 20078046, 20078051, 20078054, 20078057, 20078060, 20078063, 20078067, 20079006, 20079009, 20079013, 20079017, 20079020, 20079023, 20079044, 20080006, 20080009, 20080012, 20080016, 20080020, 20081001, 20081004, 20081007, 20081012, 20081015, 20081018, 20081025, 20082002, 20082005, 20082010, 20082013, 20082016, 20082019, 20082024, 20082029, 20082034, 20082038, 20082047, 20082050, 20082053, 20082056, 20082059, 20082063, 20082066, 20083001, 20083004, 20083019, 20083022, 20083025, 20083029, 20083032, 20083074, 20083077, 20083079,20084001, 20084002, 20084005, 20084009, 20084013, 20084016, 20084022, 20085006, 20085009, 20085017, 20086002, 20086005, 20086056, 20086011, 20086015, 20087008, 20087012, 20087021, 20088005, 20088009, 20088012, 20088030, 20088033, 20088037, 20089003, 20089006, 20089009, 20089012, 20089015, 20089018, 20089028, 20090002, 20090005, 20090008, 20090011, 20090014, 20090017, 20090021, 20090031, 20090048, 20091003, 20091006, 20091009, 20091012, 20091016, 20091019, 20091020, 20092005, 20092012, 20092015, 20092018, 20092021, 20092024, 20092027, 20092030, 20092033, 20092038, 20092053, 20092057, 20093001, 20093005, 20093010, 20093016, 20093025, 20093035, // Au+Au 14.6 GeV 20094053, 20094054, 20096025, 20099032, 20099033, 20099034, 20099044, 20099048, 20099052, 20101002, 20102001, 20102002, 20102003, 20102013, 20102014, 20102035, 20102036, 20102053, 20103002, 20103003, 20103005, 20103006, 20104016, 20108010, 20108012, 20108013, 20110001, 20110022, 20111020, 20111047, 20113055, 20113063, 20113066, 20113067, 20113068, 20113069, 20113070, 20113081, 20113088, 20114025, 20114026, 20114031, 20117013, 20117055, 20119005, 20119053, 20120047, 20123015, 20123016, 20123018, 20123038, 20124001, 20124037, 20124051, 20124058, 20124059, 20124060, 20124062, 20124064, 20124066, 20124068, 20124070, 20124072, 20124074, 20124077, 20124079, 20125003, 20125005, 20125007, 20125008, 20125010, 20125011, 20125013, 20125015, 20125016, 20125018, 20125020, 20125023, 20125025, 20125027, 20125028, 20125029, 20125030, 20125031, 20125033, 20125034, 20125035, 20125036, 20125038, 20125039, 20125041, 20125044, 20125047, 20125048, 20125049, 20125050, 20125053, 20125055, 20125057, 20125058, 20125059, 20126004, 20126005, 20126006, 20126007, 20126008, 20126010, 20126013, 20126014, 20126015, 20126017, 20126019, 20126021, 20126025, 20126027, 20126029, 20127006, 20127007, 20127010, 20127012, 20128043, 20131015, 20131028, 20132002, 20132012, 20134024, 20136001, 20136003, 20136006, 20136008, 20137005, 20137011, 20137013, 20137015, 20137017, 20138002, 20138015, 20138039, 20139033, 20141002, 20143007, 20144038, 20147022, 20148007, 20148031, 20150004, 20151003, 20151006, 20151012, 20152026, 20152028, 20152029, 20152030, 20094051, 20094055, 20094058, 20094062, 20094063, 20094064, 20094065, 20094066, 20094069, 20094075, 20094078, 20094082, 20094092, 20094100, 20094103, 20095007, 20095011, 20095014, 20095015, 20095017, 20096003, 20096006, 20096012, 20096013, 20096019, 20096028, 20097002, 20097003, 20097007, 20097010, 20097016, 20097020, 20097025, 20097032, 20098001, 20098004, 20098007, 20098011, 20098014, 20098018, 20099020, 20099031, 20099041, 20099042, 20100006, 20100011, 20100018, 20101015, 20102015, 20102033, 20103004, 20103007, 20104002, 20104013, 20104020, 20106019, 20107001, 20107003, 20107007, 20107015, 20107018, 20107021, 20107023, 20107025, 20107030, 20108004, 20108008, 20108014, 20108018, 20108021, 20108024, 20108026, 20108027, 20110004, 20110005, 20110006, 20110008, 20110010, 20110011, 20110013, 20110015, 20110018, 20110020, 20110024, 20110026, 20110029, 20110032, 20110038, 20110041, 20110045, 20110048, 20110051, 20110053, 20111002, 20111004, 20111011, 20111012, 20111015, 20111017, 20111019, 20111024, 20111026, 20111028, 20111031, 20111033, 20111037, 20111039, 20111041, 20111045, 20111050, 20111051, 20111054, 20111057, 20112001, 20112003, 20112005, 20112007, 20112009, 20112012, 20112015, 20112029, 20113011, 20113016, 20113017, 20113021, 20113022, 20113028, 20113031, 20113033, 20113036, 20113038, 20113051, 20113053, 20113054, 20113056, 20113072, 20113080, 20113093, 20113094, 20114002, 20114004, 20114006, 20114009, 20114028, 20114029, 20114032, 20114038, 20114040, 20115002, 20115003, 20115006, 20115007, 20115010, 20115011, 20115013, 20115015, 20115017, 20117009, 20117011, 20117014, 20117016, 20117018, 20117020, 20117021, 20117024, 20117035, 20117038, 20117041, 20117048, 20117052, 20117056, 20118005, 20118008, 20118010, 20118012, 20118014, 20118020, 20118032, 20118034, 20118037, 20118041, 20118045, 20118047, 20118052, 20118058, 20118069, 20118073, 20118081, 20118085, 20118090, 20119002, 20119008, 20119011, 20119013, 20119015, 20119016, 20119019, 20119022, 20119023, 20119026, 20119055, 20120002, 20120004, 20120006, 20120010, 20120013, 20120014, 20120016, 20120018, 20120021, 20120037, 20120039, 20120041, 20120043, 20120046, 20120048, 20120050, 20121002, 20121007, 20121010, 20121012, 20121017, 20121020, 20122003, 20122007, 20122009, 20122014, 20122023, 20122024, 20123003, 20123004, 20123008, 20123010, 20123012, 20123014, 20123017, 20123042, 20124002, 20124006, 20124012, 20124013, 20124015, 20124017, 20124019, 20124022, 20124028, 20124029, 20124039, 20124040, 20124042, 20124044, 20124055, 20124056, 20124061, 20124063, 20124065, 20124067, 20124069, 20124071, 20124073, 20124076, 20124078, 20125001, 20125002, 20125004, 20125006, 20125009, 20125012, 20125014, 20125017, 20125019, 20125021, 20125022, 20125024, 20125026, 20125032, 20125037, 20125040, 20125042, 20125043, 20125045, 20125046, 20125051, 20125052, 20125054, 20125056, 20126009, 20126011, 20126012, 20126016, 20126018, 20126020, 20126024, 20126026, 20126028, 20127008, 20127021, 20127030, 20127036, 20127039, 20127044, 20127046, 20127048, 20127053, 20127058, 20127060, 20127065, 20127070, 20127072, 20127076, 20128001, 20128004, 20128010, 20128014, 20128016, 20128044, 20128046, 20128048, 20128050, 20128052, 20129001, 20129003, 20129005, 20129007, 20129009, 20129011, 20129013, 20130006, 20130008, 20130011, 20130013, 20130015, 20130017, 20131001, 20131003, 20131005, 20131008, 20131010, 20131012, 20131014, 20131016, 20131019, 20131023, 20131027, 20131029, 20131031, 20131037, 20131039, 20131041, 20131043, 20131045, 20132001, 20132003, 20132005, 20132007, 20132009, 20132011, 20132013, 20132015, 20132017, 20132020, 20132024, 20132026, 20132029, 20132033, 20132035, 20132038, 20132040, 20132044, 20132050, 20132054, 20132058, 20133001, 20133003, 20133005, 20133008, 20133012, 20133015, 20133016, 20133018, 20133020, 20134002, 20134010, 20134012, 20134014, 20134019, 20134021, 20134025, 20134035, 20134038, 20134040, 20134043, 20134045, 20134047, 20134049, 20134051, 20134053, 20134055, 20135001, 20135003, 20135007, 20135010, 20135012, // Au+Au 200 GeV - 20191005, 20191015, 20192001, 20193001, 20193019 + 20191005, 20191015, 20192001, 20193001, 20193019, + // Au+Au 4.59 AGeV (3.2 GeV) + 20180005, 20180006, 20180019, 20180025, 20181016, 20182034, 20183001, 20183013, 20183014, 20183019, + // Au+Au 7.3 AGeV (1) = 3.9 GeV + 20107029, 20113042, 20113043, 20169033, 20169043, 20169051 }; +// +// Run 20 +// 1. Au+Au 31.2 AGeV (3) = 7.7 GeV +// 2. Au+Au 7.3 AGeV (4) = 3.9 GeV +// 3. Au+Au 5.75 AGeV (8) = 3.5 GeV +// +const Int_t nBadRun_refmult_2020 = 15; +const Int_t badrun_refmult_2020[nBadRun_refmult_2020] = { + // Au+Au 31.2 AGeV (7.7 GeV) + 21029002, 21029013, 21029027, + // Au+Au 7.3 AGeV (3.9 GeV) + 21035008, 21035011, 21036012, 21035014, + // Au+Au 5.75 AGeV (3.5 GeV) + 20355020, 20355021, 21044023, 21045024, 21045025, 21044027, 21044035, 21045004 +}; + +// +// Run 21 +// 1. Au+Au 7.7 GeV (139) +// +const Int_t nBadRun_refmult_2021 = 139; +const Int_t badrun_refmult_2021[nBadRun_refmult_2021] = { + // Au+Au 7.7 GeV + 22031054, 22033001, 22035002, 22038009, 22039010, 22039013, 22039028, 22042004, 22043046, 22043047, 22044003, 22044004, 22044005, 22046006, 22046007, 22046012, 22047008, 22048002, 22048007, 22048040, 22048042, 22049026, 22049027, 22049029, 22050003, 22050006, 22050016, 22050038, 22050040, 22050044, 22050045, 22051014, 22052032, 22052033, 22052035, 22052036, 22052048, 22053022, 22054007, 22054022, 22054028, 22054030, 22054042, 22055023, 22057010, 22058037, 22059005, 22061012, 22061015, 22062034, 22062035, 22062036, 22063014, 22064025, 22064038, 22065014, 22065015, 22067039, 22068012, 22068041, 22069030, 22069032, 22069033, 22069034, 22069040, 22070001, 22070002, 22070003, 22070004, 22070005, 22070006, 22070007, 22070008, 22070009, 22070010, 22070011, 22070012, 22070014, 22070040, 22070041, 22071036, 22074009, 22074042, 22076033, 22076034, 22077050, 22078016, 22078032, 22079027, 22084029, 22084035, 22085009, 22085021, 22086027, 22087027, 22088034, 22091018, 22091022, 22091025, 22093029, 22094046, 22095027, 22096003, 22096037, 22097016, 22097030, 22098054, 22099024, 22099042, 22100045, 22101016, 22101017, 22101018, 22101022, 22102034, 22103027, 22103032, 22104027, 22105030, 22106032, 22108050, 22109032, 22110025, 22111047, 22112021, 22113001, 22113029, 22114030, 22115004, 22115008, 22115019, 22115032, 22116007, 22116008, 22116025, 22116026, 22116030, 22117023, 22118058 +}; #endif diff --git a/StRoot/StRefMultCorr/CentralityMaker.cxx b/StRoot/StRefMultCorr/CentralityMaker.cxx index 8d38b0f04ed..b62033fa6e3 100644 --- a/StRoot/StRefMultCorr/CentralityMaker.cxx +++ b/StRoot/StRefMultCorr/CentralityMaker.cxx @@ -46,6 +46,7 @@ CentralityMaker::CentralityMaker() { fRefMult2Corr = new StRefMultCorr("refmult2") ; fRefMult3Corr = new StRefMultCorr("refmult3") ; fRefMultCorr_Isobar = new StRefMultCorr("refmult","Isobar") ; + fRefMultCorrFxt = new StRefMultCorr("fxtmult"); // fTofTrayMultCorr = new StRefMultCorr("toftray") ; fgRefMultCorr = new StRefMultCorr("grefmult") ; fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMB5","P16id") ; @@ -91,6 +92,11 @@ StRefMultCorr* CentralityMaker::getRefMultCorr_Isobar() { return fRefMultCorr_Isobar ; } +//_________________ +StRefMultCorr* CentralityMaker::getRefMultCorrFxt() { + return fRefMultCorrFxt; +} + /* //_________________ StRefMultCorr* CentralityMaker::getTofTrayMultCorr() { diff --git a/StRoot/StRefMultCorr/CentralityMaker.h b/StRoot/StRefMultCorr/CentralityMaker.h index bde8025c6ce..3c0515eefd3 100644 --- a/StRoot/StRefMultCorr/CentralityMaker.h +++ b/StRoot/StRefMultCorr/CentralityMaker.h @@ -43,7 +43,7 @@ #ifndef __CentralityMaker_h__ #define __CentralityMaker_h__ -class StRefMultCorr ; +class StRefMultCorr; #include "Rtypes.h" //_________________ @@ -57,6 +57,7 @@ class CentralityMaker { StRefMultCorr* getRefMult2Corr() ; // For refmult2 StRefMultCorr* getRefMult3Corr() ; // For refmult3 StRefMultCorr* getRefMultCorr_Isobar() ; // For refmult + StRefMultCorr* getRefMultCorrFxt(); // For fixed-target data // StRefMultCorr* getTofTrayMultCorr() ; // For TOF tray multiplicity StRefMultCorr* getgRefMultCorr() ; // For grefmult //Run14 AuAu200GeV StRefMultCorr* getgRefMultCorr_Run14_AuAu200_VpdMB5_P16id() ; @@ -74,12 +75,13 @@ class CentralityMaker { static CentralityMaker* fInstance ; // Static pointer of CentralityMaker // Centrality correction classes - StRefMultCorr* fRefMultCorr ; // refmult based centrality - StRefMultCorr* fRefMult2Corr ; // refmult2 based centrality - StRefMultCorr* fRefMult3Corr ; // refmult3 based centrality + StRefMultCorr* fRefMultCorr ; // refmult-based centrality + StRefMultCorr* fRefMult2Corr ; // refmult2-based centrality + StRefMultCorr* fRefMult3Corr ; // refmult3-based centrality StRefMultCorr* fRefMultCorr_Isobar ; // refmult based centrality - // StRefMultCorr* fTofTrayMultCorr ; // tofTrayMult based centrality - StRefMultCorr* fgRefMultCorr ; // grefmult based centrality + StRefMultCorr* fRefMultCorrFxt; // fxtMult-based centrality + // StRefMultCorr* fTofTrayMultCorr ; // tofTrayMult-based centrality + StRefMultCorr* fgRefMultCorr ; // grefmult-based centrality StRefMultCorr* fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id ; StRefMultCorr* fgRefMultCorr_Run14_AuAu200_VpdMB30_P16id ; StRefMultCorr* fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_P16id ; diff --git a/StRoot/StRefMultCorr/Param.cxx b/StRoot/StRefMultCorr/Param.cxx index 3af270eec4a..bd79a3cd77f 100644 --- a/StRoot/StRefMultCorr/Param.cxx +++ b/StRoot/StRefMultCorr/Param.cxx @@ -17,6 +17,7 @@ const string getParamX( const int x, const int y1, const int y2 ) { case 2: str = mParamStr_ref2[y1][y2]; break; case 3: str = mParamStr_ref3[y1][y2]; break; case 4: str = mParamStr_ref4[y1][y2]; break; + case 5: str = mParamStr_ref5[y1][y2]; break; default: str = "0"; } return str; diff --git a/StRoot/StRefMultCorr/Param.h b/StRoot/StRefMultCorr/Param.h index a827d2ee3f7..e8dc4108782 100644 --- a/StRoot/StRefMultCorr/Param.h +++ b/StRoot/StRefMultCorr/Param.h @@ -7,6 +7,7 @@ using std::string; //======================================================================================= //if you want to add new parameters, please always add after the current parameters, do not insert between them //the order of them is important!!!!!!!!!!!!! +// gRefMult section //======================================================================================= const int nID_gref = 7; const int nSet_gref = 6; @@ -79,8 +80,9 @@ const string mParamStr_gref[nID_gref][nSet_gref] = { //======================================================================================= //if you want to add new parameters, please always add after the current parameters, do not insert between them //the order of them is important!!!!!!!!!!!!! +// RefMult1 section //======================================================================================= -const int nID_ref1 = 41;//after add N more new group of parameters, need to update nID_ref1 += N +const int nID_ref1 = 42;//after add N more new group of parameters, need to update nID_ref1 += N const int nSet_ref1 = 6; const string mParamStr_ref1[nID_ref1][nSet_ref1] = { // mParameterIndex = 0 @@ -92,7 +94,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.99051,22.0065,4.02331,-20.8187,-8.88498e-06,0.000886727,0,0", "171,-0.33" }, - + // mParameterIndex = 1 { "2010:200:11028089,11035026:-30,30", "10,15,21,30,41,55,73,94,119,149,184,223,269,321,379,446", @@ -101,7 +103,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.964406,23.6525,4.09475,-20.4268,1.51988e-05,0.000649946,0,0", "171,-0.33" }, - + // mParameterIndex = 2 { "2010:200:11035061,11054067:-30,30", "10,15,21,30,41,55,73,94,119,149,184,223,269,321,379,446", @@ -110,7 +112,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.98071,25.8699,4.06555,-20.4771,-3.55299e-06,0.000832471,0,0", "171,-0.33" }, - + // mParameterIndex = 3 { "2010:200:11055095,11077018:-30,30", "10,15,21,30,41,55,73,94,119,149,184,223,269,321,379,446", @@ -119,7 +121,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.983422,23.8855,4.14735,-21.4205,-9.88422e-06,0.000865886,0,0", "171,-0.33" }, - + // mParameterIndex = 4 { "2010:62.4:11077023,11081058:-40,40", "7,11,16,22,30,41,54,69,88,109,135,165,199,239,285,339", @@ -128,7 +130,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.784198,96.3743,18.0256,43.3586,0.000193941,5.31901e-05,0,0", "0,0" }, - // mParameterIndex = 5 { "2010:62.4:11081059,11098060:-40,40", @@ -138,7 +139,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "1.02181,64.2068,46.7363,-86.7449,-2.81908e-08,4.50725e-05,0,0", "0,0" }, - + // mParameterIndex = 6 { "2010:39:11098062,11106007:-40,40", "7,10,15,21,28,38,50,64,81,102,125,153,185,222,265,316", @@ -147,7 +148,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "1.01837,40.9401,55.7224,-225.094,-6.76875e-06,2.90872e-05,0,0", "0,0" }, - + // mParameterIndex = 7 { "2010:39:11106008,11113047:-40,40", "7,10,15,21,28,38,50,64,81,102,125,153,185,222,265,316", @@ -156,7 +157,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "1.02912,40.4629,56.9218,-236.815,-7.60843e-06,2.68036e-05,0,0", "0,0" }, - + // mParameterIndex = 8 { "2010:7.7:11113050,11124053:-70,70", "4,6,8,12,16,22,28,37,46,58,72,87,106,128,154,185", @@ -165,7 +166,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.8352,86.974,50.0054,-83.1208,7.37246e-05,3.98413e-05,0,0", "0,0" }, - + // mParameterIndex = 9 { "2010:7.7:11124054,11147040:-70,70", "4,6,8,12,16,22,28,37,46,58,72,87,106,128,154,185", @@ -174,7 +175,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.90686,60.1308,54.4187,-144.449,3.4559e-05,7.07684e-05,0,0", "0,0" }, - // mParameterIndex = 10 { "2010:11.5:11147041,11152058:-50,50", @@ -184,7 +184,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.901325,68.5632,53.1088,-149.965,3.77108e-05,4.1719e-05,0,0", "0,0" }, - + // mParameterIndex = 11 { "2010:11.5:11152059,11160010:-50,50", "5,7,10,14,19,26,34,44,56,70,86,105,127,153,184,221", @@ -193,7 +193,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.921088,65.7025,52.9872,-153.578,3.25228e-05,5.05313e-05,0,0", "0,0" }, - + // mParameterIndex = 12 { "2011:19.6:12111032,12119029:-70,70", "6,8,12,17,23,30,40,52,66,83,102,125,152,183,220,263", @@ -202,7 +202,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "1.00746,35.1459,55.9769,-299.014,-6.32608e-06,5.2202e-05,0,0", "0,0" }, - + // mParameterIndex = 13 { "2011:19.6:12119030,12122025:-70,70", "6,8,12,17,23,30,40,52,66,83,102,125,152,183,220,263", @@ -211,7 +211,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.953142,63.1022,51.98,-243.39,1.54744e-05,9.26225e-05,0,0", "0,0" }, - + // mParameterIndex = 14 { "2011:200:12126101,12138024:-30,30", "10,15,22,31,43,58,76,98,125,156,193,234,281,335,396,466", @@ -220,7 +220,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.9725,23.69,4.226,-16.59,-3.37e-06,0.0009126,0,0", "183.9,-0.2811" }, - // mParameterIndex = 15 { "2011:200:12138081,12145020:-30,30", @@ -230,7 +229,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "1.006,24.58,4.158,-17.55,-3.534e-05,0.0007344,0,0", "180.9,-0.3407" }, - + // mParameterIndex =16 { "2011:200:12149028,12152016:-30,30", "10,15,22,31,43,58,76,98,125,156,193,234,281,335,396,466", @@ -239,7 +238,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.9823,21.08,4.209,-18.01,-1.382e-05,0.0009383,0,0", "184.8,-0.134" }, - + // mParameterIndex = 17 { "2011:200:12153008,12154021:-30,30", "10,15,22,31,43,58,76,98,125,156,193,234,281,335,396,466", @@ -248,7 +247,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.9973,21.42,4.197,-18.3,-2.601e-05,0.0009335,0,0", "183.4,-0.1059" }, - // mParameterIndex = 18 { "2011:200:12154038,12165031:-30,30", @@ -258,7 +256,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.9995,21.89,4.191,-18.17,-2.723e-05,0.0009326,0,0", "183.1,-0.0749" }, - + // mParameterIndex = 19 { "2011:200:12165037,12171016:-30,30", "10,15,22,31,43,58,76,98,125,156,193,234,281,335,396,466", @@ -267,7 +265,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.9837,24.47,4.161,-17.42,-1.502e-05,0.0008967,0,0", "185.2,-0.1916" }, - + // mParameterIndex = 20 { "2011:27:12171018,12180056:-70,70", "6,9,13,19,26,35,45,58,74,92,114,139,168,201,241,288", @@ -276,7 +274,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.997565,57.0141,52.4999,-92.3577,-2.7663e-08,-1.06086e-05,0,0", "0,0" }, - // mParameterIndex = 21 { "2012:193:13116062,13118024:-30,30", @@ -286,7 +283,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-4.76" }, - // mParameterIndex = 22 { "2012:193:13118033,13125006:-30,30", @@ -296,7 +292,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-1.63" }, - // mParameterIndex = 23 { "2012:193:13125010,13129018:-30,30", @@ -306,7 +301,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-1.9" }, - // mParameterIndex = 24 { "2012:193:13129026,13130033:-30,30", @@ -316,7 +310,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-2.27" }, - // mParameterIndex = 25; { "2012:193:13131006,13132010:-30,30", @@ -326,7 +319,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-3" }, - // mParameterIndex = 26; { "2012:193:13132014,13136015:-30,30", @@ -336,7 +328,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0,0,0,0,0,0,0,0", "604.5,-2.42" }, - // mParameterIndex = 27; { "2014:14.5:15053000,15070021:-70,70", @@ -346,7 +337,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.797748,5.44478,1.3871,-0.96068,0.00127508,6.53791e-06,0,0", "0,0" }, - // mParameterIndex = 28; // --> Vz dependent centrality definition for Vz<-27 and Vz>25 // --> Corrections are done for |Vz|<30 cm @@ -359,6 +349,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.8115,244.6,24.29,-21.8,5.799e-05,0,0,0", "0,0" }, + // // mParameterIndex = 29; // Run17 54.4 GeV, trigid = 580021 { @@ -369,7 +360,6 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "0.811,238.9,24.31,-25.16,6.325e-05", "0,0" }, - // // Run18 27 GeV AuAu // @@ -458,7 +448,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { { "2019:19.6:20056032,20093036:-145,145", // Year, energy, run start end, Vz range "6,9,13,18,24,32,43,55,70,88,110,135,165,201,243,296", // Centrality definition - "50", // Normalization start + "164", // Normalization start "0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00", // Vz correction parameters "1.04433,-1.13957e-01,4.54889e-01,-3.43209e-01,-1.55692e-03,0,4.00872e+00,1.03440e-05", // Trigger efficiency "0,0" // Luminosity correction @@ -468,7 +458,7 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { { "2019:14.6:20094048,20154013:-145,145", // Year, energy, run start end, Vz range "6,9,13,18,24,32,41,53,67,84,103,127,154,185,223,270", // Centrality definition - "20", // Normalization start + "154", // Normalization start "0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) "1.05956,-1.25292,5.51106e-01,1.65283,-1.48792e-3,0,1.31733e+01,8.15878e-06", // Trigger efficiency "0,0" // Luminosity correction @@ -481,10 +471,107 @@ const string mParamStr_ref1[nID_ref1][nSet_ref1] = { "150", // Normalization start "0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) "1.13418,-1.68334e-2,1.68995e-3,1.03279e-2,-4.42083e-1,0,1.47591e-3,4.36703e-1", // Trigger efficiency - "2.14803e+02,-4.58703e-4" // Luminosity correction + "2.14803e+02,-4.58703e-4" // Luminosity correction + }, + //mParameterIndex = 41 + //Run21 Au+Au 7.7 GeV, TrigerID = 810010,810020,810030,810040 + { + "2021:7.7:22031042,22121018:-145,145", // Year, energy, run start end, Vz range + "4,6,8,12,16,21,28,37,47,59,74,91,112,135,164,201", // Centrality definition + "100", // Normalization start + "0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.48905,-9610.65,622.081,4102.52,-1.06441e-05,0,7.59456e+07,7.24623e-11", // Trigger efficiency + "0,0" // Luminosity correction } }; +//======================================================================================= +//if you want to add new parameters, please always add after the current parameters, do not insert between them +//the order of them is important!!!!!!!!!!!!! +// FXT section +//======================================================================================= +const int nID_ref5 = 7;//after add N more new group of parameters, need to update nID_ref1 += N +const int nSet_ref5 = 6; +const string mParamStr_ref5[nID_ref5][nSet_ref5] = { + // mParameterIndex = 0 + // Run 18 Au+Au 3.85 GeV (sqrt(s_NN)=3 GeV), Trigger ID = 620052 + { + "2018:3.85:19151029,19155022:198,202", // Year, energy, run start end, Vz range + "5,7,9,12,16,21,26,33,41,50,60,72,86,101,119,142", // Multiplicity values for the centrality classes + "40", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "0.,0.,0.,0.,0.,0.,0.,0.", // Trigger efficiency (should be recalculated due to the loss) + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 1 + // Run 19 Au+Au 4.59 GeV (sqrt(s_NN)=3.2 GeV), Trigger ID = 680001 + { + "2019:4.59:20179040,20183025:198,202", // Year, energy, run start end, Vz range + "6,9,13,17,23,30,38,48,59,72,87,104,122,144,169,200", // Multiplicity values for the centrality classes + "118", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.078,0.0143,0.0615,-0.0531,-0.0298,0,0.0516,0.00214", // Trigger efficiency + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 2 + // Run 20 Au+Au 5.75 GeV (sqrt(s_NN)=3.5 GeV), Trigger ID = 720000, first RunID range + { + "2020:5.75:20355020,20355021:198,202", // Year, energy, run start end, Vz range + "6,8,12,16,22,28,37,47,59,73,89,108,128,152,181,217", // Multiplicity values for the centrality classes + "107", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.175,-0.0760,0.0547,-0.0129,-0.0565,0,0.0802,0.00470", // Trigger efficiency + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 3 + // Run 19 Au+Au 7.3 GeV (sqrt(s_NN)=3.9 GeV), Trigger ID = 1 + { + "2019:7.3:20107029,20169055:198,202", // Year, energy, run start end, Vz range + "7,10,14,19,26,33,43,55,68,83,101,122,144,170,200,238", // Multiplicity values for the centrality classes + "141", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.146,0.0652,0.0587,-0.172,-0.0444,0,0.0111,0.00287", // Trigger efficiency + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 4 + // Run 20 Au+Au 7.3 GeV (sqrt(s_NN)=3.9 GeV), Trigger ID = 730000 + { + "2020:7.3:21035003,21036013:198,202", // Year, energy, run start end, Vz range + "6,9,13,17,23,31,40,51,64,79,97,117,139,166,197,236", // Multiplicity values for the centrality classes + "141", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.170,-0.109,0.0439,-0.00154,-0.0508,0,0.0799,0.00391", // Trigger efficiency + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 5 + // Run 20 Au+Au 31.2 GeV (sqrt(s_NN)=7.7 GeV), Trigger ID = 770000 + { + "2020:31.2:21028011,21029036:198,202", // Year, energy, run start end, Vz range + "10,15,21,28,38,49,63,79,98,119,142,169,200,233,271,315", // Multiplicity values for the centrality classes + "160", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "9.63078e-1,6.54124e-02,4.68589e-02,-2.43086e-02,8.15939e-03,0,4.50613e-02,-1.14802e-03", // Trigger efficiency + "0.,0." // Luminosity correction + }, + + // mParameterIndex = 6 + // Run 20 Au+Au 5.75 GeV (sqrt(s_NN)=3.5 GeV), Trigger ID = 720000, second RunID range + { + "2020:5.75:21044023,21045011:198,202", // Year, energy, run start end, Vz range + "6,8,12,16,22,28,37,47,59,73,89,108,128,152,181,217", // Multiplicity values for the centrality classes + "107", // Normalization start (of Glauber to the data) + "0.,0.,0.,0.,0.,0.,0.,0.", // Vz correction parameters (switched to new scheme, parameters defined near the shape corrections) + "1.175,-0.0760,0.0547,-0.0129,-0.0565,0,0.0802,0.00470", // Trigger efficiency + "0.,0." // Luminosity correction + } +}; + + const int CentBin16_vzdep[5][16] = { { 7,10,15,21,29,39,52,66,84,106,131,161,195,236,285,344 }, // -30=30 && mParameterIndex<=35 ) { // Au+Au 27 GeV 2018 - const Double_t min = 4.0; - const Double_t max = 5.0; - - if(ntofmatch<=2) return false; - - a0 = -0.704787625248525; - a1 = 0.99026234637141; - a2 = -0.000680713101607504; - a3 = 2.77035215460421e-06; - a4 = -4.04096185674966e-09; - b0 = 2.52126730672253; - b1 = 0.128066911940844; - b2 = -0.000538959206681944; - b3 = 1.21531743671716e-06; - b4 = -1.01886685404478e-09; - c0 = 4.79427731664144; - c1 = 0.187601372159186; - c2 = -0.000849856673886957; - c3 = 1.9359155975421e-06; - c4 = -1.61214724626684e-09; - - double refmultCenter = a0+a1*(ntofmatch)+a2*pow(ntofmatch,2)+a3*pow(ntofmatch,3)+a4*pow(ntofmatch,4); - double refmultLower = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); - double refmultUpper = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); - - refmultcutmin = refmultCenter - min*refmultLower; - refmultcutmax = refmultCenter + max*refmultUpper; - notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); - } - else if( mParameterIndex>=36 && mParameterIndex<=37 ) { // Isobars 200 GeV 2018 - - // Zr+Zr - if(mParameterIndex==36) { - b0=13.5244327901538; - b1=1.4429201808933; - b2=-0.002873496957537; - b3=7.29172798142226e-06; - b4=-7.45759942317285e-09; - c0=-11.2781454979572; - c1=0.420728494449501; - c2=0.00184005031913895; - c3=-4.61008765754698e-06; - c4=4.28291905929182e-09; + // TODO: + // Reference multiplicity dependent pile up rejection parameter selection + // Be aware that the parameters are hardcoded (should be replaced with the + // arrays stored in Param.h) + + if (mRefX == 1) { // refMult + if( mParameterIndex>=30 && mParameterIndex<=35 ) { // Au+Au 27 GeV 2018 + const Double_t min = 4.0; + const Double_t max = 5.0; + + if(ntofmatch<=2) return false; + + a0 = -0.704787625248525; + a1 = 0.99026234637141; + a2 = -0.000680713101607504; + a3 = 2.77035215460421e-06; + a4 = -4.04096185674966e-09; + b0 = 2.52126730672253; + b1 = 0.128066911940844; + b2 = -0.000538959206681944; + b3 = 1.21531743671716e-06; + b4 = -1.01886685404478e-09; + c0 = 4.79427731664144; + c1 = 0.187601372159186; + c2 = -0.000849856673886957; + c3 = 1.9359155975421e-06; + c4 = -1.61214724626684e-09; + + double refmultCenter = a0+a1*(ntofmatch)+a2*pow(ntofmatch,2)+a3*pow(ntofmatch,3)+a4*pow(ntofmatch,4); + double refmultLower = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + double refmultUpper = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + + refmultcutmin = refmultCenter - min*refmultLower; + refmultcutmax = refmultCenter + max*refmultUpper; + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - // Ru+Ru - else if(mParameterIndex==37) { - b0=13.5426221755897; - b1=1.44261201539344; - b2=-0.00288428931227279; - b3=7.35384541646783e-06; - b4=-7.53407759526067e-09; - c0=-11.2591376113937; - c1=0.419541462167548; - c2=0.00185578651291454; - c3=-4.68933832723005e-06; - c4=4.4151761900593e-09; + else if( mParameterIndex>=36 && mParameterIndex<=37 ) { // Isobars 200 GeV 2018 + + // Zr+Zr + if(mParameterIndex==36) { + b0=13.5244327901538; + b1=1.4429201808933; + b2=-0.002873496957537; + b3=7.29172798142226e-06; + b4=-7.45759942317285e-09; + c0=-11.2781454979572; + c1=0.420728494449501; + c2=0.00184005031913895; + c3=-4.61008765754698e-06; + c4=4.28291905929182e-09; + } + // Ru+Ru + else if(mParameterIndex==37) { + b0=13.5426221755897; + b1=1.44261201539344; + b2=-0.00288428931227279; + b3=7.35384541646783e-06; + b4=-7.53407759526067e-09; + c0=-11.2591376113937; + c1=0.419541462167548; + c2=0.00185578651291454; + c3=-4.68933832723005e-06; + c4=4.4151761900593e-09; + } + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); - refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); - notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); - } - else if ( mParameterIndex==38 ) { // Au+Au 19.6 GeV 2019 - - if ( -145. <= vz && vz < -87. ) { - b0=33.7732676854599; - b1=1.75937881368933; - b2=-0.00285868075552296; - b3=8.50344260510873e-06; - b4=-1.19215380537174e-08; - c0=-22.7060232139884; - c1=0.863809402986806; - c2=-0.000368119767293671; - c3=5.97122714011036e-06; - c4=-1.27438638584224e-08; + else if ( mParameterIndex==38 ) { // Au+Au 19.6 GeV 2019 + + if ( -145. <= vz && vz < -87. ) { + b0=33.7732676854599; + b1=1.75937881368933; + b2=-0.00285868075552296; + b3=8.50344260510873e-06; + b4=-1.19215380537174e-08; + c0=-22.7060232139884; + c1=0.863809402986806; + c2=-0.000368119767293671; + c3=5.97122714011036e-06; + c4=-1.27438638584224e-08; + } + else if ( -87. <= vz && vz < -29. ) { + b0=20.5875336291458; + b1=1.67371122493626; + b2=-0.00307534477962496; + b3=7.93755518827246e-06; + b4=-8.46257293600085e-09; + c0=-15.5923736275086; + c1=0.604206551537668; + c2=0.00131805594121643; + c3=-2.04753779335401e-06; + c4=5.73181898751325e-10; + } + else if ( -29. <= vz && vz < 29. ) { + b0=15.1015102672534; + b1=1.53929151189229; + b2=-0.00269203062814483; + b3=6.488759952638e-06; + b4=-6.06073586314757e-09; + c0=-13.1157864223955; + c1=0.504707692972168; + c2=0.00187997948645203; + c3=-4.7317012773039e-06; + c4=4.8234194091071e-09; + } + else if ( 29. <= vz && vz < 87. ) { + b0=20.7718852504153; + b1=1.67316129891511; + b2=-0.00315093393202473; + b3=8.35823870487966e-06; + b4=-9.14822467807924e-09; + c0=-15.9411138444366; + c1=0.61506063963685; + c2=0.0011824174541949; + c3=-1.48902496972716e-06; + c4=-2.29371463231934e-10; + } + else if ( 87. <= vz && vz <= 145. ) { + b0=33.4926150575549; + b1=1.79372677959986; + b2=-0.00319461487211403; + b3=9.56612691680003e-06; + b4=-1.31049413530369e-08;; + c0=-22.4679773305418; + c1=0.83906220918966; + c2=-0.000106213494253586; + c3=4.93946486222714e-06; + c4=-1.1450298089717e-08; + } + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - else if ( -87. <= vz && vz < -29. ) { - b0=20.5875336291458; - b1=1.67371122493626; - b2=-0.00307534477962496; - b3=7.93755518827246e-06; - b4=-8.46257293600085e-09; - c0=-15.5923736275086; - c1=0.604206551537668; - c2=0.00131805594121643; - c3=-2.04753779335401e-06; - c4=5.73181898751325e-10; + else if ( mParameterIndex==39 ) { // Au+Au 14.6 GeV 2019 + b0 = 36.4811873257854; + b1 = 1.96363692967013; + b2 = -0.00491528146300182; + b3 = 1.45179464078414e-05;; + b4 = -1.82634741809226e-08; + c0 = -16.176117733536;; + c1 = 0.780745107634961; + c2 = -2.03347057620351e-05; + c3 = 3.80646723724747e-06; + c4 = -9.43403282145648e-09; + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - else if ( -29. <= vz && vz < 29. ) { - b0=15.1015102672534; - b1=1.53929151189229; - b2=-0.00269203062814483; - b3=6.488759952638e-06; - b4=-6.06073586314757e-09; - c0=-13.1157864223955; - c1=0.504707692972168; - c2=0.00187997948645203; - c3=-4.7317012773039e-06; - c4=4.8234194091071e-09; + else if ( mParameterIndex==40 ) { // Au+Au 200 GeV 2019 + + b0=18.0459; + b1=1.32913; + b2=-0.000929385; + b3=1.53176e-06; + b4=-9.911e-10; + c0=-18.7481; + c1=0.785467; + c2=2.12757e-05; + c3=3.4805e-07; + c4=-3.80776e-10; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - else if ( 29. <= vz && vz < 87. ) { - b0=20.7718852504153; - b1=1.67316129891511; - b2=-0.00315093393202473; - b3=8.35823870487966e-06; - b4=-9.14822467807924e-09; - c0=-15.9411138444366; - c1=0.61506063963685; - c2=0.0011824174541949; - c3=-1.48902496972716e-06; - c4=-2.29371463231934e-10; + else if ( mParameterIndex==41 ) { // Au+Au 7.7 GeV 2020 + + if ( -145. <= vz && vz < -87. ) { + b0=39.578630496797; + b1=1.46561577132993; + b2=0.006515367058115; + b3=-4.06391982010589e-05; + b4=5.51203917383809e-08; + c0=-14.8817460248614; + c1=0.764539480062978; + c2=0.00368901349656326; + c3=-1.27602217700865e-05; + c4=8.02618485000158e-10; + } + else if ( -87. <= vz && vz < -29. ) { + b0=26.1841414192908; + b1=1.73354655107464; + b2=-0.00280668326418846; + b3=1.22370803379957e-05; + b4=-3.15068617200212e-08; + c0=-13.1831127837376; + c1=0.760227210117286; + c2=0.00195873375843822; + c3=-2.69378951644624e-06; + c4=-1.05344843941749e-08; + } + else if ( -29. <= vz && vz < 29. ) { + b0=23.3635904884101; + b1=1.58179764458174; + b2=-0.00100184372825271; + b3=7.76378744751984e-07; + b4=-6.46469867000365e-09; + c0=-11.4340781454132; + c1=0.72398407747444; + c2=0.00121092416745035; + c3=1.17875404059176e-07; + c4=-9.81658682040738e-09; + } + else if ( 29. <= vz && vz < 87. ) { + b0=29.4343991835005; + b1=1.48353715105631; + b2=0.00106271734149745; + b3=-9.07835076338586e-06; + b4=6.7722581625238e-09; + c0=-9.97159163811459; + c1=0.591000613390771; + c2=0.00449768928484714; + c3=-1.71667412152202e-05; + c4=1.6467383813372e-08; + } + else if ( 87. <= vz && vz <= 145. ) { + b0=37.0772875081557; + b1=1.53484162926915; + b2=0.00471873506675937; + b3=-2.94958548877277e-05; + b4=3.60887574265838e-08; + c0=-13.3927733032856; + c1=0.704319390196747; + c2=0.00485360248820988; + c3=-2.10416804123978e-05; + c4=1.92342533435503e-08; + } + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); } - else if ( 87. <= vz && vz <= 145. ) { - b0=33.4926150575549; - b1=1.79372677959986; - b2=-0.00319461487211403; - b3=9.56612691680003e-06; - b4=-1.31049413530369e-08;; - c0=-22.4679773305418; - c1=0.83906220918966; - c2=-0.000106213494253586; - c3=4.93946486222714e-06; - c4=-1.1450298089717e-08; + else { + notPileUp = kTRUE; } - refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); - refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); - notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); - } - else if ( mParameterIndex==39 ) { // Au+Au 14.6 GeV 2019 - b0 = 36.4811873257854; - b1 = 1.96363692967013; - b2 = -0.00491528146300182; - b3 = 1.45179464078414e-05;; - b4 = -1.82634741809226e-08; - c0 = -16.176117733536;; - c1 = 0.780745107634961; - c2 = -2.03347057620351e-05; - c3 = 3.80646723724747e-06; - c4 = -9.43403282145648e-09; + } // if (mRefX == 1) { // refMult + else if ( mRefX == 5 ) { // fxtMult + if (mParameterIndex == 1) { // Run 19 Au+Au 4.59 GeV (sqrt(s_NN)=3.2 GeV) + b0=19.48; + b1=5.428; + b2=-0.007; + b3=-2.428e-4; + b4=1.197e-7; + c0=-13.59; + c1=1.515; + c2=0.02816; + c3=-1.195e-4; + c4=-9.639e-7; + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else if (mParameterIndex == 2) { // Run 20 Au+Au 5.75 GeV (sqrt(s_NN)=3.5 GeV) + b0=23.28; + b1=5.247; + b2=0.04037; + b3=-1.206e-3; + b4=5.792e-6; + c0=-14.82; + c1=1.583; + c2=0.02684; + c3=4.605e-5; + c4=-2.410e-6; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else if (mParameterIndex == 3) { // Run 19 Au+Au 7.3 GeV (sqrt(s_NN)=3.9 GeV) + b0=31.5858; + b1=4.29274; + b2=0.0485779; + b3=-1.039e-3; + b4=4.408e-6; + c0=-22.7905; + c1=2.6578; + c2=-0.03112; + c3=1.031e-3; + c4=-7.434e-6; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else if (mParameterIndex == 4) { // Run 20 Au+Au 7.3 GeV (sqrt(s_NN)=3.9 GeV) + b0=29.74; + b1=4.421; + b2=0.09139; + b3=-1.977e-3; + b4=9.435e-6; + c0=-20.53; + c1=2.557; + c2=-0.02094; + c3=8.943e-4; + c4=-6.879e-6; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else if (mParameterIndex == 5) { // Run 20 Au+Au 31.2 GeV (sqrt(s_NN)=7.7 GeV) + b0=24.7299053323955; + b1=7.79546460550082; + b2=-0.000336278299464254; + b3=-0.000549204114892259; + b4=1.89274000668251e-06; + c0=-24.3335976220474; + c1=1.93207052914575; + c2=0.0042539477677528; + c3=0.000725893349545147; + c4=-6.29726910263091e-06; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else if (mParameterIndex == 6) { // Run 20 Au+Au 5.75 GeV (sqrt(s_NN)=3.5 GeV) + b0=23.28; + b1=5.247; + b2=0.04037; + b3=-1.206e-3; + b4=5.792e-6; + c0=-14.82; + c1=1.583; + c2=0.02684; + c3=4.605e-5; + c4=-2.410e-6; + + refmultcutmax = calcPileUpRefMult(ntofmatch, b0, b1, b2, b3, b4); + refmultcutmin = calcPileUpRefMult(ntofmatch, c0, c1, c2, c3, c4); + notPileUp = isInPileUpRefMultLimits(refmult, refmultcutmin, refmultcutmax); + } + else { + notPileUp = kTRUE; + } } - else { - notPileUp = kTRUE; + + if (mVerbose) { + std::cout << "\t notPileUp: "; + if (notPileUp) { + std::cout << "TRUE"; + } + else { + std::cout << "FALSE"; + } + std::cout << "\t[DONE]\n"; } return notPileUp; @@ -370,13 +585,12 @@ Bool_t StRefMultCorr::isCentralityOk(const Int_t icent) const { const Bool_t isOK = ( mRefMult_corr > mCentrality_bins[icent][mParameterIndex] && mRefMult_corr <= mCentrality_bins[icent+1][mParameterIndex] ); - // if(isOK) - // { - // std::cout << "StRefMultCorr::isCentralityOk refmultcorr = " << mRefMult_corr - // << " min. bin = " << mCentrality_bins[icent][mParameterIndex] - // << " max. bin = " << mCentrality_bins[icent+1][mParameterIndex] - // << std::endl; - // } + if(mVerbose && isOK) { + std::cout << "StRefMultCorr::isCentralityOk refmultcorr = " << mRefMult_corr + << " min. bin = " << mCentrality_bins[icent][mParameterIndex] + << " max. bin = " << mCentrality_bins[icent+1][mParameterIndex] + << std::endl; + } return isOK ; } @@ -508,6 +722,10 @@ Int_t StRefMultCorr::setParameterIndex(const Int_t RunId) { } //else std::cout << "Parameter set = " << npar_set << std::endl; + if (mVerbose) { + std::cout << "Parameter index set to: " << mParameterIndex << std::endl; + } + return mParameterIndex ; } @@ -522,6 +740,10 @@ Double_t StRefMultCorr::luminosityCorrection(Double_t zdcCoincidenceRate) const Double_t lumiCorr = 1.; + if ( mVerbose ) { + std::cout << "Estimation of luminosity correction factor..." << std::endl; + std::cout << "\t ZDC coincidence rate: " << zdcCoincidenceRate << " BBC coincidence rate: " << 0 << std::endl; + } // 200 GeV only. correction = 1 for all the other energies for BES-I // the above statement may not true for BES-II, since the luminosity is much higher than BES-I, add by Zaochen // better to check the vs ZDCX to see whether they are flat or not, add by Zaochen @@ -557,12 +779,21 @@ Double_t StRefMultCorr::luminosityCorrection(Double_t zdcCoincidenceRate) const lumiCorr = (par0_lum==0.0) ? lumiCorr : lumiCorr*(par0_lum+par1_lum*zdcmean)/par0_lum; } + if (mVerbose) { + std::cout << "\tLuminosity correction factor: " << lumiCorr << std::endl; + std::cout << "\t[DONE]\n"; + } return lumiCorr; } //________________ Double_t StRefMultCorr::vzCorrection(Double_t z) const { + if ( mVerbose ) { + std::cout << "Estimation of acceptance correction factor..." << std::endl; + std::cout << "\t Vertex z position: " << z << " mParameterIndex: " << mParameterIndex << std::endl; + + } Double_t vzCorr = 1.; if ( mParameterIndex < 38 ) { // Old correction based on the 6th-order polynomial fit of the high-end point @@ -596,23 +827,39 @@ Double_t StRefMultCorr::vzCorrection(Double_t z) const { } else if ( mParameterIndex == 40 ) { // Au+Au 200 GeV Run 19 // New Vz correction. All vz bins bins are normalize to that at the center - vzCorr = auau14_run19_vzCorr[ getVzWindowForVzDepCentDef() ]; + vzCorr = auau200_run19_vzCorr[ getVzWindowForVzDepCentDef() ]; + } + else if ( mParameterIndex == 41 ) { // Au+Au 7.7 GeV Run 21 + // New Vz correction. All vz bins bins are normalize to that at the center + vzCorr = auau7_run21_vzCorr[ getVzWindowForVzDepCentDef() ]; } + if (mVerbose) { + std::cout << "\t Acceptance correction factor: " << vzCorr << std::endl; + std::cout << "\t[DONE]\n"; + } return vzCorr; } //________________ Double_t StRefMultCorr::sampleRefMult(Int_t refMult) const { + if (mVerbose) { + std::cout << "Sampling refMult value: " << refMult << std::endl; + } + Double_t refMult_d = -9999.; - if( mParameterIndex>=30 && mParameterIndex<=40 ) { + if( mParameterIndex>=30 && mParameterIndex<=41 ) { refMult_d = (Double_t)refMult - 0.5 + gRandom->Rndm(); } else { refMult_d = (Double_t)refMult + gRandom->Rndm(); } + if (mVerbose) { + std::cout << "\tSampled refMult value: " << refMult_d << std::endl; + std::cout << "\t[DONE]\n"; + } return refMult_d; } @@ -622,6 +869,12 @@ Double_t StRefMultCorr::getRefMultCorr(const UShort_t refMult, const Double_t zdcCoincidenceRate, const UInt_t flag) const { + if (mVerbose) { + std::cout << "Start refMultCorr calculations" << std::endl + << "Initial values refMult / vz / zdcX / flag: " + << refMult << " / " << z << " / " << zdcCoincidenceRate << " / " + << flag << std::endl; + } // Apply correction if parameter index & z-vertex are ok if (!isIndexOk() || !isZvertexOk()) return refMult ; @@ -641,6 +894,10 @@ Double_t StRefMultCorr::getRefMultCorr(const UShort_t refMult, } } // switch ( flag ) + if (mVerbose) { + std::cout << "Final refMultCorr value: " << refMultCorr << std::endl; + } + return refMultCorr; } @@ -704,12 +961,10 @@ void StRefMultCorr::readScaleForWeight(const Int_t nRefmultbin, const Double_t * std::cout << "StRefMultCorr::readScaleForWeight Read scale factor ..." << std::flush; - for(Int_t i=0; i auau200_run19_nVzBins) return 1.0; + + weight = auau7_run21_shapeWeightArray[iVzBinIndex][TMath::Nint(mRefMult_corr)]; + // Handle bad weight + if (weight == 0 || TMath::IsNaN(weight)) { + weight = 1.; + } + } else { weight = 1.0; } + + if (mVerbose) { + std::cout << "\tShape weight: " << weight << std::endl; + std::cout << "\t[DONE]\n"; + } + return weight; } //________________ Double_t StRefMultCorr::triggerWeight() const { + + if (mVerbose) { + std::cout << "Estimating the trigger weight" << std::endl; + } Double_t weight = 1.; @@ -899,6 +1178,18 @@ Double_t StRefMultCorr::triggerWeight() const { const Double_t par6 = mPar_weight[6][mParameterIndex]; const Double_t par7 = mPar_weight[7][mParameterIndex]; + if (mVerbose) { + std::cout << "Trigger efficiency parameters: " + << " [0]: " << par0 + << " [1]: " << par1 + << " [2]: " << par2 + << " [3]: " << par3 + << " [4]: " << par4 + << " A: " << A + << " [6]: " << par6 + << " [7]: " << par7 << std::endl; + } + // Additional z-vetex dependent correction //const Double_t A = ((1.27/1.21))/(30.0*30.0); // Don't ask... //const Double_t A = (0.05/0.21)/(30.0*30.0); // Don't ask... @@ -909,11 +1200,11 @@ Double_t StRefMultCorr::triggerWeight() const { && mRefMult_corr != -(par3/par2) ) { // avoid denominator = 0 // Parametrization of MC/data RefMult ratio - weight = (par0 + - par1 / (par2 * mRefMult_corr + par3) + - par4 * (par2 * mRefMult_corr + par3) + - par6 / TMath::Power(par2 * mRefMult_corr + par3, 2) + - par7 * TMath::Power(par2 * mRefMult_corr + par3, 2)); + weight = ( par0 + + par1 / (par2 * mRefMult_corr + par3) + + par4 * (par2 * mRefMult_corr + par3) + + par6 / ( (par2 * mRefMult_corr + par3) * (par2 * mRefMult_corr + par3) ) + + par7 * ( (par2 * mRefMult_corr + par3) * (par2 * mRefMult_corr + par3) ) ); /* std::cout << "par0: " << par0 << " par1: " << par1 << " par2: " << par2 << " par3: " << par3 << " par4: " << par4 << " A: " << A @@ -921,9 +1212,12 @@ Double_t StRefMultCorr::triggerWeight() const { << "refMultCorr: " << mRefMult_corr << " weight: " << weight << std::endl; */ - weight = weight + (weight-1.0)*(A*mVz*mVz); // z-dependent weight correction + weight = weight + (weight - 1.0) * (A * mVz * mVz); // z-dependent weight correction + } + if (mVerbose) { + std::cout << "\tTrigger weight: " << weight << std::endl; + std::cout << "\t[DONE]\n"; } - return weight; } @@ -953,6 +1247,10 @@ Double_t StRefMultCorr::getWeight() const { //_________________ Int_t StRefMultCorr::getCentralityBin16() const { + + if (mVerbose) { + std::cout << "Finding centrality bin (out of 16)\n"; + } Int_t CentBin16 = -1; // Invalid index @@ -971,12 +1269,21 @@ Int_t StRefMultCorr::getCentralityBin16() const { // std::cout <<"Vz dependent centrality definition for Vz<-27 and Vz>25 ... Vz="<< mVz <<" RefMult="<< mRefMult <<" RefMultCorr="<< mRefMult_corr <<" iCent="<< CentBin16 << std::endl; } + if (mVerbose) { + std::cout << "\tCentrality bin (out of 16): " << CentBin16 << "\t[DONE]" << std::endl; + } + // return -1 if CentBin16 = 16 (very large refmult, refmult>5000) return ( CentBin16==16 ) ? -1 : CentBin16; } //_________________ Int_t StRefMultCorr::getCentralityBin9() const { + + if (mVerbose) { + std::cout << "Finding centrality bin (out of 9)\n"; + } + Int_t CentBin9 = -1; // Invalid index @@ -1008,6 +1315,10 @@ Int_t StRefMultCorr::getCentralityBin9() const { CentBin9 = getCentralityBin9VzDep(); } + if (mVerbose) { + std::cout << "\tCentrality bin (out of 9): " << CentBin9 << "\t[DONE]" << std::endl; + } + return CentBin9; } @@ -1070,6 +1381,14 @@ Int_t StRefMultCorr::getVzWindowForVzDepCentDef() const { } } // for ( Int_t iVz=0; iVz sParam_ShapeWeight = StringSplit(getParamX_ShapeWeight(1,1),','); //for(int ib=0;ib10 + /// "fxtmult" - number of primary tracks for the fixed-target mode of the experiment /// Specify the type of data sets (in case there are multiple prameters/definitions in the same runs) /// "Def" /// "VpdMB5" @@ -114,8 +116,11 @@ class StRefMultCorr { /// Print all parameters void print(const Option_t* option="") const ; + /// Print debug information + void setVerbose(const Bool_t& verbose) { mVerbose = verbose; } + private: - /// refmult, refmult2, refmult3 or toftray (case insensitive) + /// grefmult, refmult, refmult2, refmult3 or toftray (case insensitive), fxtmult const TString mName; /// Specify triggers, in case there are multiple parameters/definitions in the same runs const TString mSubName; @@ -186,8 +191,21 @@ class StRefMultCorr { std::vector mVzEdgeForWeight ; /// vz edge value std::vector mgRefMultTriggerCorrDiffVzScaleRatio ; /// Scale factor for global refmult - /////// Added from official package in StRoot/StRefMultCorr - const Int_t getRefX() const; /// X= 1 (normal RefMult), 2, 3, 4 + /// @brief The choise of reference muliplicity to be used: + /// 0 gRefMult + /// 1 RefMult + /// 2 RefMult2 + /// 3 RefMult3 + /// 4 RefMult4 + /// 5 FxtMult + Short_t mRefX; + /// @brief Print debug information (default: kFALSE) + Bool_t mVerbose; + + /// @brief Return reference multiplicity specified by the constructer + /// @return 0 - gRefMult, 1 - refMult, 2 - refMult2, 3 - refMult3, 4 - refMult4, 5 - fxtMult + const Int_t getRefX() const; + const Int_t getNumberOfDatasets() const; /// Number of definitions for each X void readHeaderFile(); //// alternative of read() in rev<=1.9 void readBadRunsFromHeaderFile(); /// alternative of readBadRuns() in rev<=1.9 @@ -208,8 +226,6 @@ class StRefMultCorr { Bool_t isInPileUpRefMultLimits(Double_t refMult, Double_t low, Double_t hi) const { return ( low < refMult && refMult < hi); } - - ClassDef(StRefMultCorr, 0) }; #endif diff --git a/StRoot/StRefMultCorr/checkStRefMultCorr.C b/StRoot/StRefMultCorr/checkStRefMultCorr.C new file mode 100755 index 00000000000..cfdaec2b86f --- /dev/null +++ b/StRoot/StRefMultCorr/checkStRefMultCorr.C @@ -0,0 +1,186 @@ +// ROOT headers +#include "TH1.h" +#include "TChain.h" +#include "TSystem.h" +#include "TFile.h" + +// C++ headers +#include + +// Macro name +void checkStRefMultCorr(const char *inFileName = "/star/u/gnigmat/soft/u/prithwish/data/st_physics_adc_16064082_raw_5000007.MuDst.root", + const char *oFileName = "oFileForPrithwish.root") { + + gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); + loadSharedLibraries(); + gSystem->Load("StPicoEvent"); + gSystem->Load("StRefMultCorr"); + + std::cout << "Hi! Lets do some physics, Master!" << std::endl; + + StPicoDstReader* picoReader = new StPicoDstReader(inFileName); + picoReader->Init(); + + //Long64_t events2read = picoReader->chain()->GetEntries(); + + // This is a way if you want to spead up IO + std::cout << "Explicit read status for some branches" << std::endl; + picoReader->SetStatus("*",0); + picoReader->SetStatus("Event",1); + picoReader->SetStatus("BTofPidTraits",1); + std::cout << "Status has been set" << std::endl; + + std::cout << "Now I know what to read, Master!" << std::endl; + + if( !picoReader->chain() ) { + std::cout << "No chain has been found." << std::endl; + std::cout << "Terminating..." << std::endl; + exit(0); + } + Long64_t eventsInTree = picoReader->tree()->GetEntries(); + std::cout << "eventsInTree: " << eventsInTree << std::endl; + Long64_t events2read = picoReader->chain()->GetEntries(); + + std::cout << "Number of events to read: " << events2read << std::endl; + + // Histogramming + // Event + TH1F *hRefMult = new TH1F("hRefMult", "Reference multiplicity;refMult", 500, -0.5, 499.5); + TH2F *hTofMatchVsRefMultBeforeCut = new TH2F("hTofMatchVsRefMultBeforeCut", ";bTofMatched;refMult", + 500, -0.5, 499.5, 500, -0.5, 499.5); + TH2F *hTofMatchVsRefMultAfterCut = new TH2F("hTofMatchVsRefMultAfterCut", ";bTofMatched;refMult", + 500, -0.5, 499.5, 500, -0.5, 499.5); + TH2F *hWeightVsRefMultCorr = new TH2F("hWeightVsRefMultCorr",";refMult;weight", + 500, -0.5, 499.5, 125, 0.5, 3.); + TH1F *hRefMultCorr = new TH1F("hRefMultCorr", "Corrected reference multiplicity;refMult", 500, -0.5, 499.5); + TH1F *hCent16 = new TH1F("hCent16","Centrality bins;Centrality bin", 16, -0.5, 15.5); + TH2F *hVtxXvsY = new TH2F("hVtxXvsY", "hVtxXvsY", 200,-10.,10.,200,-10.,10.); + TH1F *hVtxZ = new TH1F("hVtxZ","hVtxZ", 210, -210., 210.); + + + // Initialize StRefMultCorr + StRefMultCorr *mRefMultCorrUtilFxt = new StRefMultCorr("fxtmult"); + mRefMultCorrUtilFxt->setVerbose(kFALSE); + + Int_t counter = 0; + Int_t loopSize = 1000; + Bool_t verbose = kTRUE; + + // Loop over events + for(Long64_t iEvent=0; iEvent= loopSize ) { + std::cout << "Working on event #[" << (iEvent+1) << "/" << events2read << "]" << std::endl; + counter = 0; + } + + + Bool_t readEvent = picoReader->readPicoEvent(iEvent); + if (!readEvent) { + std::cout << "No input was provided" << std::endl; + break; + } + + // Retrieve picoDst + StPicoDst *dst = picoReader->picoDst(); + + // Retrieve event information + StPicoEvent *event = dst->event(); + if( !event ) { + std::cout << "No event was found" << std::endl; + break; + } + + Int_t runId = event->runId(); + mRefMultCorrUtilFxt->init(runId); + + if (verbose) { + std::cout << "Checking bad run"; + } + + if ( mRefMultCorrUtilFxt->isBadRun( runId ) ) { + if (verbose) { + std::cout << "\t[failed]" << std::endl; + } + continue; + } + if (verbose) { + std::cout << "\t[passed]" << std::endl; + } + + if (verbose) { + std::cout << "Checking MB triggers"; + } + + // Check trigger (3.2 GeV) + if ( !event->isTrigger(680001) ) { + if (verbose) { + std::cout << "\t[failed]" << std::endl; + } + continue; + } + if (verbose) { + std::cout << "\t[passed]" << std::endl; + } + + // NOTE: Lets utilize refMult variable instead of fxtMult but will call the proper one from picoEvent + Int_t refMult = event->fxtMult(); + TVector3 pVtx = event->primaryVertex(); + Int_t nBTofMatched = event->nBTOFMatch(); + hTofMatchVsRefMultBeforeCut->Fill( nBTofMatched, refMult ); + + // IMPORTANT: vertex position is needed for Au+Au 19.6 GeV 2019 + if (mRefMultCorrUtilFxt->isPileUpEvent( refMult, nBTofMatched, pVtx.Z() ) ) continue; + + mRefMultCorrUtilFxt->initEvent(refMult, pVtx.Z(), event->ZDCx()); + + // In case centrality calculation is failed for the given event it will + if (mRefMultCorrUtilFxt->getCentralityBin16() < 0 || + mRefMultCorrUtilFxt->getCentralityBin9() < 0) { + if (verbose) { + std::cout << "\tBad centrality < 0" << std::endl; + } + continue; + } + + Int_t cent9 = mRefMultCorrUtilFxt->getCentralityBin9(); // 0: 70-80%, 1: 60-70%, ..., 6: 10-20%, 7: 5-10%, 8: 0-5% + Int_t cent16 = mRefMultCorrUtilFxt->getCentralityBin16(); // 0: 75-80%, 1: 70-75%, ..., 8: 0-5% + Double_t refMultCorr = mRefMultCorrUtilFxt->getRefMultCorr(); // Retrieve corrected refMult value + Double_t weight = mRefMultCorrUtilFxt->getWeight(); // Retrieve weight + + if (verbose) { + std::cout << "refMult: " << refMult << " refMultCorr: " << refMultCorr + << " cent16: " << cent16 << " cent9: " << cent9 + << " Total weight: " << weight << " trigger efficiency: " + << mRefMultCorrUtilFxt->triggerWeight() + << " z: " << pVtx.Z() + << " shape weight: " << mRefMultCorrUtilFxt->getShapeWeight_SubVz2Center() + << std::endl; + } + + hRefMult->Fill( refMult ); + hRefMultCorr->Fill( refMultCorr ); + hCent16->Fill( cent16 ); + hVtxXvsY->Fill( pVtx.X(), pVtx.Y() ); + hVtxZ->Fill( pVtx.Z() ); + hTofMatchVsRefMultAfterCut->Fill( nBTofMatched, refMult ); + hWeightVsRefMultCorr->Fill(refMultCorr, weight); + + } //for(Long64_t iEvent=0; iEventFinish(); + + TFile *oFile = new TFile(oFileName, "recreate"); + hRefMult->Write(); + hRefMultCorr->Write(); + hCent16->Write(); + hVtxXvsY->Write(); + hVtxZ->Write(); + hTofMatchVsRefMultBeforeCut->Write(); + hTofMatchVsRefMultAfterCut->Write(); + hWeightVsRefMultCorr->Write(); + oFile->Write(); + oFile->Close(); + + std::cout << "Analysis was finished" << std::endl; +}