set of macros to create plots (Michael Knichel)
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2010 08:51:40 +0000 (08:51 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2010 08:51:40 +0000 (08:51 +0000)
21 files changed:
PWG0/dNdPt/macros/plots/defineVariables.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/divide.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/logoPrelim.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/makeCompInel.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/makeCompNSD.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/makeCompYield.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/makePlotsAlice3.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readAliceInel.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readAliceNsd.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readAliceYield.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readAtlas.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readCms.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readPhojet.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readPythia109.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readPythia306.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readPythia320.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/readUa1.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/runMacro.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/setAttrib.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/settings.C [new file with mode: 0644]
PWG0/dNdPt/macros/plots/storeOutput.C [new file with mode: 0644]

diff --git a/PWG0/dNdPt/macros/plots/defineVariables.C b/PWG0/dNdPt/macros/plots/defineVariables.C
new file mode 100644 (file)
index 0000000..e6d8f11
--- /dev/null
@@ -0,0 +1,453 @@
+//------------------------------------------------------------------------------
+// defineVariables.C
+//
+// define all Variables that are needed to store data and uncertainties
+//------------------------------------------------------------------------------
+
+
+//
+// define more arrays to store ALICE NSD data points
+//     
+                                             // for NSD
+Double_t ptNsd2PiPtAlice[binsNsdAlice] = {0};            // pt   value (weighted)
+Double_t centerPtNsd2PiPtAlice[binsNsdAlice] = {0};      //      center of bin
+Double_t widthPtNsd2PiPtAlice[binsNsdAlice] = {0};       //      width
+Double_t errPtNsd2PiPtAlice[binsNsdAlice] = {0};         //      error (half width)
+Double_t lowPtNsd2PiPtAlice[binsNsdAlice] = {0};         //      lower edge
+Double_t highPtNsd2PiPtAlice[binsNsdAlice] = {0};        //      upper edge
+
+Double_t nsd2PiPtAlice[binsNsdAlice] = {0};                 // NSD
+Double_t statNsd2PiPtAlice[binsNsdAlice] = {0};             //      stat error
+Double_t lowStatNsd2PiPtAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highStatNsd2PiPtAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relStatNsd2PiPtAlice[binsNsdAlice] = {0};          //                  relative
+Double_t systNsd2PiPtAlice[binsNsdAlice] = {0};             //      syst error
+Double_t lowSystNsd2PiPtAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highSystNsd2PiPtAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relSystNsd2PiPtAlice[binsNsdAlice] = {0};          //                  relative
+Double_t errNsd2PiPtAlice[binsNsdAlice] = {0};              //      stat+syst added linearly
+Double_t lowErrNsd2PiPtAlice[binsNsdAlice] = {0};           //                  lower
+Double_t highErrNsd2PiPtAlice[binsNsdAlice] = {0};          //                  upper
+Double_t relErrNsd2PiPtAlice[binsNsdAlice] = {0};           //                  relative
+Double_t err2Nsd2PiPtAlice[binsNsdAlice] = {0};             //      stat+syst added quadratically
+Double_t lowErr2Nsd2PiPtAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highErr2Nsd2PiPtAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relErr2Nsd2PiPtAlice[binsNsdAlice] = {0};          //                  relative
+
+//
+// define more arrays to store ALICE INEL data points
+//  
+                                                // for INEL
+Double_t ptInel2PiPtAlice[binsInelAlice] = {0};          // pt   value (weighted)
+Double_t centerPtInel2PiPtAlice[binsInelAlice] = {0};    //      center of bin
+Double_t widthPtInel2PiPtAlice[binsInelAlice] = {0};     //      width
+Double_t errPtInel2PiPtAlice[binsInelAlice] = {0};       //      error (half width)
+Double_t lowPtInel2PiPtAlice[binsInelAlice] = {0};       //      lower edge
+Double_t highPtInel2PiPtAlice[binsInelAlice] = {0};      //      upper edge
+
+Double_t inel2PiPtAlice[binsInelAlice] = {0};                // INEL
+Double_t statInel2PiPtAlice[binsInelAlice] = {0};            //      stat error
+Double_t lowStatInel2PiPtAlice[binsInelAlice] = {0};         //                  lower
+Double_t highStatInel2PiPtAlice[binsInelAlice] = {0};        //                  upper
+Double_t relStatInel2PiPtAlice[binsInelAlice] = {0};         //                  relative
+Double_t systInel2PiPtAlice[binsInelAlice] = {0};            //      syst error
+Double_t lowSystInel2PiPtAlice[binsInelAlice] = {0};         //                  lower
+Double_t highSystInel2PiPtAlice[binsInelAlice] = {0};        //                  upper
+Double_t relSystInel2PiPtAlice[binsInelAlice] = {0};         //                  relative
+Double_t errInel2PiPtAlice[binsInelAlice] = {0};             //      stat+syst added linearly
+Double_t lowErrInel2PiPtAlice[binsInelAlice] = {0};          //                  lower
+Double_t highErrInel2PiPtAlice[binsInelAlice] = {0};         //                  upper
+Double_t relErrInel2PiPtAlice[binsInelAlice] = {0};          //                  relative
+Double_t err2Inel2PiPtAlice[binsInelAlice] = {0};            //      stat+syst added quadratically
+Double_t lowErr2Inel2PiPtAlice[binsInelAlice] = {0};         //                  lower
+Double_t highErr2Inel2PiPtAlice[binsInelAlice] = {0};        //                  upper
+Double_t relErr2Inel2PiPtAlice[binsInelAlice] = {0};         //                  relative
+
+//
+// define more arrays to store ALICE YIELD data points
+//  
+                                                // for YIELD
+Double_t ptYield2PiPtAlice[binsYieldAlice] = {0};        // pt   value (weighted)
+Double_t centerPtYield2PiPtAlice[binsYieldAlice] = {0};  //      center of bin
+Double_t widthPtYield2PiPtAlice[binsYieldAlice] = {0};   //      width
+Double_t errPtYield2PiPtAlice[binsYieldAlice] = {0};     //      error (half width)
+Double_t lowPtYield2PiPtAlice[binsYieldAlice] = {0};     //      lower edge
+Double_t highPtYield2PiPtAlice[binsYieldAlice] = {0};    //      upper edge
+
+Double_t yield2PiPtAlice[binsYieldAlice] = {0};               // Invariant Yield
+Double_t statYield2PiPtAlice[binsYieldAlice] = {0};           //      stat error
+Double_t lowStatYield2PiPtAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highStatYield2PiPtAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relStatYield2PiPtAlice[binsYieldAlice] = {0};        //                  relative
+Double_t systYield2PiPtAlice[binsYieldAlice] = {0};           //      syst error
+Double_t lowSystYield2PiPtAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highSystYield2PiPtAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relSystYield2PiPtAlice[binsYieldAlice] = {0};        //                  relative
+Double_t errYield2PiPtAlice[binsYieldAlice] = {0};            //      stat+syst added linearly
+Double_t lowErrYield2PiPtAlice[binsYieldAlice] = {0};         //                  lower
+Double_t highErrYield2PiPtAlice[binsYieldAlice] = {0};        //                  upper
+Double_t relErrYield2PiPtAlice[binsYieldAlice] = {0};         //                  relative
+Double_t err2Yield2PiPtAlice[binsYieldAlice] = {0};           //      stat+syst added quadratically
+Double_t lowErr2Yield2PiPtAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highErr2Yield2PiPtAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relErr2Yield2PiPtAlice[binsYieldAlice] = {0};        //                  relative
+
+
+
+
+
+
+//
+// define arrays to store ALICE NSD data points
+//     
+                                             // for NSD
+Double_t ptNsdAlice[binsNsdAlice] = {0};            // pt   value (weighted)
+Double_t centerPtNsdAlice[binsNsdAlice] = {0};      //      center of bin
+Double_t widthPtNsdAlice[binsNsdAlice] = {0};       //      width
+Double_t errPtNsdAlice[binsNsdAlice] = {0};         //      error (half width)
+Double_t lowPtNsdAlice[binsNsdAlice] = {0};         //      lower edge
+Double_t highPtNsdAlice[binsNsdAlice] = {0};        //      upper edge
+
+Double_t nsdAlice[binsNsdAlice] = {0};                 // NSD
+Double_t statNsdAlice[binsNsdAlice] = {0};             //      stat error
+Double_t lowStatNsdAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highStatNsdAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relStatNsdAlice[binsNsdAlice] = {0};          //                  relative
+Double_t systNsdAlice[binsNsdAlice] = {0};             //      syst error
+Double_t lowSystNsdAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highSystNsdAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relSystNsdAlice[binsNsdAlice] = {0};          //                  relative
+Double_t errNsdAlice[binsNsdAlice] = {0};              //      stat+syst added linearly
+Double_t lowErrNsdAlice[binsNsdAlice] = {0};           //                  lower
+Double_t highErrNsdAlice[binsNsdAlice] = {0};          //                  upper
+Double_t relErrNsdAlice[binsNsdAlice] = {0};           //                  relative
+Double_t err2NsdAlice[binsNsdAlice] = {0};             //      stat+syst added quadratically
+Double_t lowErr2NsdAlice[binsNsdAlice] = {0};          //                  lower
+Double_t highErr2NsdAlice[binsNsdAlice] = {0};         //                  upper
+Double_t relErr2NsdAlice[binsNsdAlice] = {0};          //                  relative
+
+//
+// define arrays to store ALICE INEL data points
+//  
+                                                // for INEL
+Double_t ptInelAlice[binsInelAlice] = {0};          // pt   value (weighted)
+Double_t centerPtInelAlice[binsInelAlice] = {0};    //      center of bin
+Double_t widthPtInelAlice[binsInelAlice] = {0};     //      width
+Double_t errPtInelAlice[binsInelAlice] = {0};       //      error (half width)
+Double_t lowPtInelAlice[binsInelAlice] = {0};       //      lower edge
+Double_t highPtInelAlice[binsInelAlice] = {0};      //      upper edge
+
+Double_t inelAlice[binsInelAlice] = {0};                // INEL
+Double_t statInelAlice[binsInelAlice] = {0};            //      stat error
+Double_t lowStatInelAlice[binsInelAlice] = {0};         //                  lower
+Double_t highStatInelAlice[binsInelAlice] = {0};        //                  upper
+Double_t relStatInelAlice[binsInelAlice] = {0};         //                  relative
+Double_t systInelAlice[binsInelAlice] = {0};            //      syst error
+Double_t lowSystInelAlice[binsInelAlice] = {0};         //                  lower
+Double_t highSystInelAlice[binsInelAlice] = {0};        //                  upper
+Double_t relSystInelAlice[binsInelAlice] = {0};         //                  relative
+Double_t errInelAlice[binsInelAlice] = {0};             //      stat+syst added linearly
+Double_t lowErrInelAlice[binsInelAlice] = {0};          //                  lower
+Double_t highErrInelAlice[binsInelAlice] = {0};         //                  upper
+Double_t relErrInelAlice[binsInelAlice] = {0};          //                  relative
+Double_t err2InelAlice[binsInelAlice] = {0};            //      stat+syst added quadratically
+Double_t lowErr2InelAlice[binsInelAlice] = {0};         //                  lower
+Double_t highErr2InelAlice[binsInelAlice] = {0};        //                  upper
+Double_t relErr2InelAlice[binsInelAlice] = {0};         //                  relative
+
+//
+// define arrays to store ALICE YIELD data points
+//  
+                                                // for YIELD
+Double_t ptYieldAlice[binsYieldAlice] = {0};        // pt   value (weighted)
+Double_t centerPtYieldAlice[binsYieldAlice] = {0};  //      center of bin
+Double_t widthPtYieldAlice[binsYieldAlice] = {0};   //      width
+Double_t errPtYieldAlice[binsYieldAlice] = {0};     //      error (half width)
+Double_t lowPtYieldAlice[binsYieldAlice] = {0};     //      lower edge
+Double_t highPtYieldAlice[binsYieldAlice] = {0};    //      upper edge
+
+Double_t yieldAlice[binsYieldAlice] = {0};               // Invariant Yield
+Double_t statYieldAlice[binsYieldAlice] = {0};           //      stat error
+Double_t lowStatYieldAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highStatYieldAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relStatYieldAlice[binsYieldAlice] = {0};        //                  relative
+Double_t systYieldAlice[binsYieldAlice] = {0};           //      syst error
+Double_t lowSystYieldAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highSystYieldAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relSystYieldAlice[binsYieldAlice] = {0};        //                  relative
+Double_t errYieldAlice[binsYieldAlice] = {0};            //      stat+syst added linearly
+Double_t lowErrYieldAlice[binsYieldAlice] = {0};         //                  lower
+Double_t highErrYieldAlice[binsYieldAlice] = {0};        //                  upper
+Double_t relErrYieldAlice[binsYieldAlice] = {0};         //                  relative
+Double_t err2YieldAlice[binsYieldAlice] = {0};           //      stat+syst added quadratically
+Double_t lowErr2YieldAlice[binsYieldAlice] = {0};        //                  lower
+Double_t highErr2YieldAlice[binsYieldAlice] = {0};       //                  upper
+Double_t relErr2YieldAlice[binsYieldAlice] = {0};        //                  relative
+
+//
+// used for fitting and shifting ALICE data
+//
+
+Double_t ptAliceFit[binsAlice] = {0};
+Double_t widthPtAliceFit[binsAlice] = {0};
+Double_t errPtAliceFit[binsAlice] = {0};
+Double_t lowPtAliceFit[binsAlice] = {0};
+Double_t highPtAliceFit[binsAlice] = {0};
+Double_t nsdAliceFit[binsAlice] = {0};
+Double_t errNsdAliceFit[binsAlice] = {0};
+Double_t statNsdAliceFit[binsAlice] = {0};
+Double_t systNsdAliceFit[binsAlice] = {0};
+
+Double_t pt2PiPtAliceFit[binsAlice] = {0};
+Double_t widthPt2PiPtAliceFit[binsAlice] = {0};
+Double_t errPt2PiPtAliceFit[binsAlice] = {0};
+Double_t lowPt2PiPtAliceFit[binsAlice] = {0};
+Double_t highPt2PiPtAliceFit[binsAlice] = {0};
+Double_t nsd2PiPtAliceFit[binsAlice] = {0};
+Double_t errNsd2PiPtAliceFit[binsAlice] = {0};
+Double_t statNsd2PiPtAliceFit[binsAlice] = {0};
+Double_t systNsd2PiPtAliceFit[binsAlice] = {0};
+
+
+//
+// define arrays to store ATLAS data points
+//
+
+Double_t ptAtlas[binsAtlas] = {0};              // pt   value (weighted)
+Double_t centerPtAtlas[binsAtlas] = {0};        //      center of bin
+Double_t widthPtAtlas[binsAtlas] = {0};         //      width
+Double_t errPtAtlas[binsAtlas] = {0};           //      error (half width)
+Double_t lowErrPtAtlas[binsAtlas] = {0};        //      lower error
+Double_t highErrPtAtlas[binsAtlas] = {0};       //      higher error
+Double_t lowPtAtlas[binsAtlas] = {0};           //      lower edge
+Double_t highPtAtlas[binsAtlas] = {0};          //      upper edge
+
+Double_t nsdAtlas[binsAtlas] = {0};             // NSD
+Double_t statNsdAtlas[binsAtlas] = {0};         //      stat error
+Double_t lowStatNsdAtlas[binsAtlas] = {0};      //                  lower
+Double_t highStatNsdAtlas[binsAtlas] = {0};     //                  upper
+Double_t relStatNsdAtlas[binsAtlas] = {0};      //                  relative
+Double_t systNsdAtlas[binsAtlas] = {0};         //      syst error
+Double_t lowSystNsdAtlas[binsAtlas] = {0};      //                  lower
+Double_t highSystNsdAtlas[binsAtlas] = {0};     //                  upper
+Double_t relSystNsdAtlas[binsAtlas] = {0};      //                  relative
+Double_t errNsdAtlas[binsAtlas] = {0};          //      stat+syst added linearly
+Double_t lowErrNsdAtlas[binsAtlas] = {0};       //                  lower
+Double_t highErrNsdAtlas[binsAtlas] = {0};      //                  upper
+Double_t relErrNsdAtlas[binsAtlas] = {0};       //                  relative
+Double_t err2NsdAtlas[binsAtlas] = {0};         //      stat+syst added quadratically
+Double_t lowErr2NsdAtlas[binsAtlas] = {0};      //                  lower
+Double_t highErr2NsdAtlas[binsAtlas] = {0};     //                  upper
+Double_t relErr2NsdAtlas[binsAtlas] = {0};      //                  relative
+
+//
+// define arrays to store CMS data points
+//
+
+Double_t ptCms[binsCms] = {0};                  // pt   value (weighted)
+Double_t centerPtCms[binsCms] = {0};            //      center of bin
+Double_t widthPtCms[binsCms] = {0};             //      width
+Double_t errPtCms[binsCms] = {0};               //      error (half width)
+Double_t lowPtCms[binsCms] = {0};               //      lower edge
+Double_t highPtCms[binsCms] = {0};              //      upper edge
+
+Double_t nsdCms[binsCms] = {0};                 // NSD
+/*
+Double_t statNsdCms[binsCms] = {0};             //      stat error
+Double_t lowStatNsdCms[binsCms] = {0};          //                  lower
+Double_t highStatNsdCms[binsCms] = {0};         //                  upper
+Double_t relStatNsdCms[binsCms] = {0};          //                  relative
+Double_t systNsdCms[binsCms] = {0};             //      syst error
+Double_t lowSystNsdCms[binsCms] = {0};          //                  lower
+Double_t highSystNsdCms[binsCms] = {0};         //                  upper
+Double_t relSystNsdCms[binsCms] = {0};          //                  relative
+*/
+Double_t errNsdCms[binsCms] = {0};              //      stat+syst added linearly
+Double_t lowErrNsdCms[binsCms] = {0};           //                  lower
+Double_t highErrNsdCms[binsCms] = {0};          //                  upper
+Double_t relErrNsdCms[binsCms] = {0};           //                  relative
+Double_t err2NsdCms[binsCms] = {0};             //      stat+syst added quadratically
+Double_t lowErr2NsdCms[binsCms] = {0};          //                  lower
+Double_t highErr2NsdCms[binsCms] = {0};         //                  upper
+Double_t relErr2NsdCms[binsCms] = {0};          //                  relative
+
+//
+// define arrays to store UA1 data points
+//
+
+Double_t ptUa1[binsUa1] = {0};                  // pt   value (weighted)
+Double_t centerPtUa1[binsUa1] = {0};            //      center of bin
+Double_t widthPtUa1[binsUa1] = {0};             //      width
+Double_t errPtUa1[binsUa1] = {0};               //      error (half width)
+Double_t lowPtUa1[binsUa1] = {0};               //      lower edge
+Double_t highPtUa1[binsUa1] = {0};              //      upper edge
+
+Double_t crossUa1[binsUa1] = {0};               // Invariant cross section
+/*
+Double_t statCrossUa1[binsUa1] = {0};           //      stat error
+Double_t lowStatCrossUa1[binsUa1] = {0};        //                  lower
+Double_t highStatCrossUa1[binsUa1] = {0};       //                  upper
+Double_t relStatCrossUa1[binsUa1] = {0};        //                  relative
+Double_t systCrossUa1[binsUa1] = {0};           //      syst error
+Double_t lowSystCrossUa1[binsUa1] = {0};        //                  lower
+Double_t highSystCrossUa1[binsUa1] = {0};       //                  upper
+Double_t relSystCrossUa1[binsUa1] = {0};        //                  relative
+*/
+Double_t errCrossUa1[binsUa1] = {0};            //      stat+syst added linearly
+Double_t lowErrCrossUa1[binsUa1] = {0};         //                  lower
+Double_t highErrCrossUa1[binsUa1] = {0};        //                  upper
+Double_t relErrCrossUa1[binsUa1] = {0};         //                  relative
+Double_t err2CrossUa1[binsUa1] = {0};           //      stat+syst added quadratically
+Double_t lowErr2CrossUa1[binsUa1] = {0};        //                  lower
+Double_t highErr2CrossUa1[binsUa1] = {0};       //                  upper
+Double_t relErr2CrossUa1[binsUa1] = {0};        //                  relative
+
+Double_t yieldUa1[binsUa1] = {0};               // Invariant Yield
+/*
+Double_t statYieldUa1[binsUa1] = {0};           //      stat error
+Double_t lowStatYieldUa1[binsUa1] = {0};        //                  lower
+Double_t highStatYieldUa1[binsUa1] = {0};       //                  upper
+Double_t relStatYieldUa1[binsUa1] = {0};        //                  relative
+Double_t systYieldUa1[binsUa1] = {0};           //      syst error
+Double_t lowSystYieldUa1[binsUa1] = {0};        //                  lower
+Double_t highSystYieldUa1[binsUa1] = {0};       //                  upper
+Double_t relSystYieldUa1[binsUa1] = {0};        //                  relative
+*/
+Double_t errYieldUa1[binsUa1] = {0};            //      stat+syst added linearly
+Double_t lowErrYieldUa1[binsUa1] = {0};         //                  lower
+Double_t highErrYieldUa1[binsUa1] = {0};        //                  upper
+Double_t relErrYieldUa1[binsUa1] = {0};         //                  relative
+Double_t err2YieldUa1[binsUa1] = {0};           //      stat+syst added quadratically
+Double_t lowErr2YieldUa1[binsUa1] = {0};        //                  lower
+Double_t highErr2YieldUa1[binsUa1] = {0};       //                  upper
+Double_t relErr2YieldUa1[binsUa1] = {0};        //                  relative
+
+//
+// define arrays to store PHOJET data points
+//
+
+Double_t nEventsPhojet = 0;
+
+Double_t centerPtPhojet[binsPhojet] = {0};     
+Double_t ptPhojet[binsPhojet] =  {0};
+Double_t widthPtPhojet[binsPhojet] =  {0};
+Double_t errPtPhojet[binsPhojet] =  {0};
+Double_t lowPtPhojet[binsPhojet] =  {0};
+Double_t highPtPhojet[binsPhojet] =  {0};
+
+Double_t inelPhojet[binsPhojet] = {0};
+Double_t errInelPhojet[binsPhojet] = {0}; 
+Double_t lowErrInelPhojet[binsPhojet] = {0};
+Double_t highErrInelPhojet[binsPhojet] = {0};
+Double_t relErrInelPhojet[binsPhojet] = {0};
+
+Double_t centerPt2PiPtPhojet[binsPhojet] = {0};     
+Double_t pt2PiPtPhojet[binsPhojet] =  {0};
+Double_t widthPt2PiPtPhojet[binsPhojet] =  {0};
+Double_t errPt2PiPtPhojet[binsPhojet] =  {0};
+Double_t lowPt2PiPtPhojet[binsPhojet] =  {0};
+Double_t highPt2PiPtPhojet[binsPhojet] =  {0};
+
+Double_t inel2PiPtPhojet[binsPhojet] = {0};
+Double_t errInel2PiPtPhojet[binsPhojet] = {0}; 
+Double_t lowErrInel2PiPtPhojet[binsPhojet] = {0};
+Double_t highErrInel2PiPtPhojet[binsPhojet] = {0};
+Double_t relErrInel2PiPtPhojet[binsPhojet] = {0};
+
+//
+// define arrays to store PYTHIA D6T (109) data points
+//
+
+Double_t nEventsPythia109 = 0;
+
+Double_t centerPtPythia109[binsPythia109] = {0};     
+Double_t ptPythia109[binsPythia109] =  {0};
+Double_t widthPtPythia109[binsPythia109] =  {0};
+Double_t errPtPythia109[binsPythia109] =  {0};
+Double_t lowPtPythia109[binsPythia109] =  {0};
+Double_t highPtPythia109[binsPythia109] =  {0};
+
+Double_t inelPythia109[binsPythia109] = {0};
+Double_t errInelPythia109[binsPythia109] = {0}; 
+Double_t lowErrInelPythia109[binsPythia109] = {0};
+Double_t highErrInelPythia109[binsPythia109] = {0};
+Double_t relErrInelPythia109[binsPythia109] = {0};
+
+Double_t centerPt2PiPtPythia109[binsPythia109] = {0};     
+Double_t pt2PiPtPythia109[binsPythia109] =  {0};
+Double_t widthPt2PiPtPythia109[binsPythia109] =  {0};
+Double_t errPt2PiPtPythia109[binsPythia109] =  {0};
+Double_t lowPt2PiPtPythia109[binsPythia109] =  {0};
+Double_t highPt2PiPtPythia109[binsPythia109] =  {0};
+
+Double_t inel2PiPtPythia109[binsPythia109] = {0};
+Double_t errInel2PiPtPythia109[binsPythia109] = {0}; 
+Double_t lowErrInel2PiPtPythia109[binsPythia109] = {0};
+Double_t highErrInel2PiPtPythia109[binsPythia109] = {0};
+Double_t relErrInel2PiPtPythia109[binsPythia109] = {0};
+
+
+//
+// define arrays to store PYTHIA ATLAS-CSC (306) data points
+//
+
+Double_t nEventsPythia306 = 0;
+
+Double_t centerPtPythia306[binsPythia306] = {0};     
+Double_t ptPythia306[binsPythia306] =  {0};
+Double_t widthPtPythia306[binsPythia306] =  {0};
+Double_t errPtPythia306[binsPythia306] =  {0};
+Double_t lowPtPythia306[binsPythia306] =  {0};
+Double_t highPtPythia306[binsPythia306] =  {0};
+
+Double_t inelPythia306[binsPythia306] = {0};
+Double_t errInelPythia306[binsPythia306] = {0}; 
+Double_t lowErrInelPythia306[binsPythia306] = {0};
+Double_t highErrInelPythia306[binsPythia306] = {0};
+Double_t relErrInelPythia306[binsPythia306] = {0};
+
+Double_t centerPt2PiPtPythia306[binsPythia306] = {0};     
+Double_t pt2PiPtPythia306[binsPythia306] =  {0};
+Double_t widthPt2PiPtPythia306[binsPythia306] =  {0};
+Double_t errPt2PiPtPythia306[binsPythia306] =  {0};
+Double_t lowPt2PiPtPythia306[binsPythia306] =  {0};
+Double_t highPt2PiPtPythia306[binsPythia306] =  {0};
+
+Double_t inel2PiPtPythia306[binsPythia306] = {0};
+Double_t errInel2PiPtPythia306[binsPythia306] = {0}; 
+Double_t lowErrInel2PiPtPythia306[binsPythia306] = {0};
+Double_t highErrInel2PiPtPythia306[binsPythia306] = {0};
+Double_t relErrInel2PiPtPythia306[binsPythia306] = {0};
+
+//
+// define arrays to store PYTHIA PERUGIA0 (320) data points
+//
+
+Double_t nEventsPythia320 = 0;
+
+Double_t centerPtPythia320[binsPythia320] = {0};     
+Double_t ptPythia320[binsPythia320] =  {0};
+Double_t widthPtPythia320[binsPythia320] =  {0};
+Double_t errPtPythia320[binsPythia320] =  {0};
+Double_t lowPtPythia320[binsPythia320] =  {0};
+Double_t highPtPythia320[binsPythia320] =  {0};
+
+Double_t inelPythia320[binsPythia320] = {0};
+Double_t errInelPythia320[binsPythia320] = {0}; 
+Double_t lowErrInelPythia320[binsPythia320] = {0};
+Double_t highErrInelPythia320[binsPythia320] = {0};
+Double_t relErrInelPythia320[binsPythia320] = {0};
+
+Double_t centerPt2PiPtPythia320[binsPythia320] = {0};     
+Double_t pt2PiPtPythia320[binsPythia320] =  {0};
+Double_t widthPt2PiPtPythia320[binsPythia320] =  {0};
+Double_t errPt2PiPtPythia320[binsPythia320] =  {0};
+Double_t lowPt2PiPtPythia320[binsPythia320] =  {0};
+Double_t highPt2PiPtPythia320[binsPythia320] =  {0};
+
+Double_t inel2PiPtPythia320[binsPythia320] = {0};
+Double_t errInel2PiPtPythia320[binsPythia320] = {0}; 
+Double_t lowErrInel2PiPtPythia320[binsPythia320] = {0};
+Double_t highErrInel2PiPtPythia320[binsPythia320] = {0};
+Double_t relErrInel2PiPtPythia320[binsPythia320] = {0};
+
diff --git a/PWG0/dNdPt/macros/plots/divide.C b/PWG0/dNdPt/macros/plots/divide.C
new file mode 100644 (file)
index 0000000..25e9afb
--- /dev/null
@@ -0,0 +1,120 @@
+//------------------------------------------------------------------------------
+// divide.C
+//
+// macro to divide two TGraphs using Exponential interpolation
+//------------------------------------------------------------------------------
+
+using namespace std;
+
+Double_t ExtrapolateExp(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t x)
+{
+        // extra/interpolates using an exponential defined by (x0,y0) and (x1,y1) to x
+
+        Double_t b = (TMath::Log(y0) - TMath::Log(y1)) / (x0 - x1);
+        Double_t a = TMath::Log(y0) - b * x0;
+        Double_t a2 = TMath::Log(y1) - b * x1;
+
+        //Printf("%f %f %f", b, a, a2);
+
+        return TMath::Exp(a + b * x);
+} 
+
+
+TGraphErrors* divide(TGraph* dividend, TGraph* divisor, Bool_t exp = kTRUE)
+{
+
+cout << "---------------------------------------------------------" << endl;
+cout << "starting macro: << divide.C >> " << endl;
+cout << "---------------------------------------------------------" << endl;
+
+Double_t x=0;
+Double_t y=0;
+Double_t y1;
+Double_t y2;
+Double_t ex;
+Double_t ey;
+Double_t e1;
+Double_t e2;
+
+
+divisor->GetPoint(0,x,y);
+Double_t minx = x;
+cout << "divisor: minx = " << minx << endl;
+
+divisor->GetPoint(divisor->GetN()-1,x,y);
+Double_t maxx = x;
+cout << "divisor: maxx = " << maxx << endl;
+
+dividend->GetPoint(0,x,y);
+if (x > minx) { minx = x; } 
+
+dividend->GetPoint(dividend->GetN()-1,x,y);
+if (x < maxx) { maxx = x; } 
+
+cout << "minx = " << minx << endl;
+cout << "maxx = " << maxx << endl;
+
+Int_t bins = 0;
+
+for (int i=0; i < dividend->GetN(); i++) {
+    dividend->GetPoint(i,x,y);
+    if ((x <= maxx) && (x >= minx)) {bins++;}
+}
+
+TGraphErrors* result = new TGraphErrors(bins);
+TGraph* errors = new TGraph(divisor->GetN(),divisor->GetX(),divisor->GetEY());
+
+Int_t j=0;
+
+for (int i=0; i < dividend->GetN(); i++) {
+    dividend->GetPoint(i,x,y1);
+    if (!((x <= maxx) && (x >= minx))) { continue; }            
+    if (exp) {
+        Double_t x1temp = 0;
+        Double_t y1temp = 0;
+        for (int n=0; n < divisor->GetN(); n++) {
+            divisor->GetPoint(n,x1temp,y1temp);
+            
+            if (x1temp >= x)  break;
+        }
+        cout << "x=" << x;
+        cout << "x1temp=" << x1temp;
+        if (x1temp == x) { y2 = y1temp; }
+        if (x1temp > x) { 
+            Double_t x0temp = 0;
+            Double_t y0temp = 0;
+            cout << "nfortemp=" << n << endl;
+            divisor->GetPoint(n-1,x0temp,y0temp);
+            y2 = ExtrapolateExp(x0temp,y0temp,x1temp,y1temp,x);
+            cout << "exp extrapolation used" << endl;
+        }
+    } else {
+        y2 = divisor->Eval(x);
+    }
+    
+    y = y1/y2;
+    e1 = dividend->GetErrorY(i);
+    //e2 = errors->Eval(x);
+    e2 = 0;    
+    ex = 0;
+    ey = y*sqrt((e1/y1)*(e1/y1) + (e2/y2)*(e2/y2));    
+    result->SetPoint(j,x,y);
+    result->SetPointError(j,ex,ey);
+    j++;
+    cout << "data point # " << j << endl;
+    cout << "   x= " << x << " +- " << ex <<endl;
+    cout << "   y= " << y << " +- " << ey <<endl;
+}
+delete errors;
+errors = 0;
+
+
+
+cout << "min:" << minx <<endl;
+cout << "max:" << maxx <<endl;
+
+cout << "---------------------------------------------------------" << endl;
+cout << "finished macro: << divide.C >> " << endl;
+cout << "---------------------------------------------------------" << endl;
+return result;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/logoPrelim.C b/PWG0/dNdPt/macros/plots/logoPrelim.C
new file mode 100644 (file)
index 0000000..3f46b83
--- /dev/null
@@ -0,0 +1,35 @@
+//------------------------------------------------------------------------------
+// logoPrelim.C
+//
+// insert alice logo and/or Preliminiary tag
+//------------------------------------------------------------------------------
+
+
+
+logoPrelim(TCanvas* can) {
+
+if (SHOW_LOGO) {
+    TPad *pad_logo = new TPad("pad_logo","pad_logo",0.754,0.829,0.930,0.957);
+    pad_logo->SetMargin(0,0,0,0);
+//     pad_logo->SetBorderMode(1);
+//     pad_logo->SetBorderSize(1);
+    can->cd();
+    pad_logo->Draw();
+    pad_logo->cd();
+    logo->Draw();
+}
+
+if (SHOW_PRELIM) {
+//     TPad *pad_prel = new TPad("pad_prel","pad_prel",0.587,0.914,0.947,0.964);
+    TPad *pad_prel = new TPad("pad_prel","pad_prel",0.200,0.650,0.560,0.700);
+    pad_prel->SetMargin(0,0,0,0);
+//     pad_prel->SetBorderMode(1);
+    can->cd();
+    pad_prel->Draw();
+    pad_prel->cd();
+    TLatex lprel;
+    lprel.SetTextColor(kRed);
+    lprel.SetTextSizePixels(24);
+    lprel.DrawLatex(0.04,0.3,"ALICE Preliminary"); 
+}
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/makeCompInel.C b/PWG0/dNdPt/macros/plots/makeCompInel.C
new file mode 100644 (file)
index 0000000..4d3c622
--- /dev/null
@@ -0,0 +1,271 @@
+//------------------------------------------------------------------------------
+// makeCompInel.C
+//
+// create figure with MC model comparisons
+//------------------------------------------------------------------------------
+
+
+
+
+void makeCompInel()
+{
+using namespace std;
+
+TGraphErrors *graphInelAliceFit = new TGraphErrors(binsInelAlice,ptInelAlice,inelAlice,0,err2InelAlice);
+graphInelAliceFit->SetMarkerColor(colorAliceFit);
+graphInelAliceFit->SetLineColor(colorAliceFit);
+graphInelAliceFit->SetLineWidth(1);
+graphInelAliceFit->SetMarkerStyle(20);
+
+TGraphErrors *graphInelAlice     = new TGraphErrors(binsInelAlice,centerPtInelAlice,inelAlice,0,0);
+graphInelAlice->SetMarkerColor(colorAlice);
+graphInelAlice->SetLineColor(colorAlice);
+graphInelAlice->SetMarkerStyle(20);
+
+TGraphErrors *graphPhojet = new TGraphErrors(binsPhojet,ptPhojet,inelPhojet,errPtPhojet,errInelPhojet);
+graphPhojet->SetMarkerColor(colorPhojet);
+graphPhojet->SetLineColor(colorPhojet);
+graphPhojet->SetMarkerStyle(10);
+graphPhojet->SetLineWidth(2);
+graphPhojet->SetLineStyle(1);
+
+TGraphErrors *graphPythia109 = new TGraphErrors(binsPythia109,ptPythia109,inelPythia109,errPtPythia109,errInelPythia109);
+graphPythia109->SetMarkerColor(colorPythia109);
+graphPythia109->SetLineColor(colorPythia109);
+graphPythia109->SetMarkerStyle(10);
+graphPythia109->SetLineWidth(2);
+graphPythia109->SetLineStyle(7);
+
+TGraphErrors *graphPythia306 = new TGraphErrors(binsPythia306,ptPythia306,inelPythia306,errPtPythia306,errInelPythia306);
+graphPythia306->SetMarkerColor(colorPythia306);
+graphPythia306->SetLineColor(colorPythia306);
+graphPythia306->SetMarkerStyle(10);
+graphPythia306->SetLineWidth(2);
+graphPythia306->SetLineStyle(3);
+
+TGraphErrors *graphPythia320 = new TGraphErrors(binsPythia320,ptPythia320,inelPythia320,errPtPythia320,errInelPythia320);
+graphPythia320->SetMarkerColor(colorPythia320);
+graphPythia320->SetLineColor(colorPythia320);
+graphPythia320->SetMarkerStyle(10);
+graphPythia320->SetLineWidth(2);
+graphPythia320->SetLineStyle(9);
+
+Double_t one[binsInelAlice];  
+for (Int_t i=0; i < binsInelAlice; i++) { 
+    one[i] = 1.0;
+}
+
+TGraphErrors *ratioAliceAlice = new TGraphErrors(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioAliceAlice->SetPoint(i*2,lowPtInelAlice[i],1);
+   ratioAliceAlice->SetPointError(i*2,0,relErr2InelAlice[i]);
+   ratioAliceAlice->SetPoint(i*2+1,highPtInelAlice[i],1);   
+   ratioAliceAlice->SetPointError(i*2+1,0,relErr2InelAlice[i]);
+}
+//TGraphErrors *ratioAliceAlice = new TGraphErrors(binsInelAlice,centerPtInelAlice,one,0,relErr2InelAlice);
+ratioAliceAlice->SetFillColor(colorAliceErrors);
+ratioAliceAlice->SetLineColor(20);
+
+TGraph *ratioPhojetAlice = new TGraph(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioPhojetAlice->SetPoint(i*2,lowPtInelAlice[i],inelPhojet[i+3]/inelAlice[i]);
+   ratioPhojetAlice->SetPoint(i*2+1,highPtInelAlice[i],inelPhojet[i+3]/inelAlice[i]);
+   cout << "inelAlice[" << i << "]           = " << inelAlice[i] <<endl;
+   cout << "centerPtInelAlice[" << i << "]   = " << centerPtInelAlice[i] <<endl;
+   cout << "inelPhojet[" << i+3 << "]          = " << inelPhojet[i+3] <<endl;
+   cout << "ptPhojet[" << i+3 << "]            = " << ptPhojet[i+3] <<endl;
+}
+//TGraphErrors *ratioPhojetAlice = divide(graphPhojet,graphInelAlice);
+ratioPhojetAlice->SetFillColor(colorPhojet);
+ratioPhojetAlice->SetLineColor(colorPhojet);
+ratioPhojetAlice->SetLineWidth(2);
+ratioPhojetAlice->SetLineStyle(1);
+ratioPhojetAlice->SetMarkerStyle(26);
+ratioPhojetAlice->SetFillStyle(3354);
+
+
+TGraph *ratioPythia109Alice = new TGraph(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioPythia109Alice->SetPoint(i*2,lowPtInelAlice[i],inelPythia109[i+3]/inelAlice[i]);
+   ratioPythia109Alice->SetPoint(i*2+1,highPtInelAlice[i],inelPythia109[i+3]/inelAlice[i]);
+   cout << "inelAlice[" << i << "]           = " << inelAlice[i] <<endl;
+   cout << "centerPtInelAlice[" << i << "]   = " << centerPtInelAlice[i] <<endl;
+   cout << "inelPythia109[" << i+3 << "]          = " << inelPythia109[i+3] <<endl;
+   cout << "ptPythia109[" << i+3 << "]            = " << ptPythia109[i+3] <<endl;
+}
+//TGraphErrors *ratioPythia109Alice = divide(graphPythia109,graphInelAlice);
+ratioPythia109Alice->SetFillColor(colorPythia109);
+ratioPythia109Alice->SetLineColor(colorPythia109);
+ratioPythia109Alice->SetLineWidth(2);
+ratioPythia109Alice->SetLineStyle(7);
+ratioPythia109Alice->SetMarkerStyle(26);
+ratioPythia109Alice->SetFillStyle(3354);
+
+TGraph *ratioPythia306Alice = new TGraph(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioPythia306Alice->SetPoint(i*2,lowPtInelAlice[i],inelPythia306[i+3]/inelAlice[i]);
+   ratioPythia306Alice->SetPoint(i*2+1,highPtInelAlice[i],inelPythia306[i+3]/inelAlice[i]);
+   cout << "inelAlice[" << i << "]           = " << inelAlice[i] <<endl;
+   cout << "centerPtInelAlice[" << i << "]   = " << centerPtInelAlice[i] <<endl;
+   cout << "inelPythia306[" << i+3 << "]          = " << inelPythia306[i+3] <<endl;
+   cout << "ptPythia306[" << i+3 << "]            = " << ptPythia306[i+3] <<endl;
+}
+//TGraphErrors *ratioPythia306Alice = divide(graphPythia306,graphInelAlice);
+ratioPythia306Alice->SetFillColor(colorPythia306);
+ratioPythia306Alice->SetLineColor(colorPythia306);
+ratioPythia306Alice->SetLineWidth(2);
+ratioPythia306Alice->SetLineStyle(3);
+ratioPythia306Alice->SetMarkerStyle(26);
+ratioPythia306Alice->SetFillStyle(3354);
+
+TGraph *ratioPythia320Alice = new TGraph(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioPythia320Alice->SetPoint(i*2,lowPtInelAlice[i],inelPythia320[i+3]/inelAlice[i]);
+   ratioPythia320Alice->SetPoint(i*2+1,highPtInelAlice[i],inelPythia320[i+3]/inelAlice[i]);
+   cout << "inelAlice[" << i << "]           = " << inelAlice[i] <<endl;
+   cout << "centerPtInelAlice[" << i << "]   = " << centerPtInelAlice[i] <<endl;
+   cout << "inelPythia320[" << i+3 << "]          = " << inelPythia320[i+3] <<endl;
+   cout << "ptPythia320[" << i+3 << "]            = " << ptPythia320[i+3] <<endl;
+}
+//TGraphErrors *ratioPythia320Alice = divide(graphPythia320,graphInelAlice);
+ratioPythia320Alice->SetFillColor(colorPythia320);
+ratioPythia320Alice->SetLineColor(colorPythia320);
+ratioPythia320Alice->SetLineWidth(2);
+ratioPythia320Alice->SetLineStyle(9);
+ratioPythia320Alice->SetMarkerStyle(26);
+ratioPythia320Alice->SetFillStyle(3354);
+
+
+TCanvas *can5 = new TCanvas("can5","CompInel",520,700);
+
+TPad *pad5_1 = new TPad("pad5_1","pad5_1",0.0,0.35,1.0,1.0);
+setAttrib(pad5_1);
+
+TPad *pad5_2 = new TPad("pad5_2","pad5_2",0.0,0.0,1.0,0.35);
+setAttrib(pad5_2);
+
+
+//
+can5->cd();
+
+pad5_1->Draw();
+pad5_1->cd();
+pad5_1->SetLogx();
+pad5_1->SetLogy();
+//all->Draw("AE4");
+
+TMultiGraph *all = new TMultiGraph("all","");
+
+all->Add(graphPhojet);
+
+all->Add(graphPythia109);
+all->Add(graphPythia306);
+all->Add(graphPythia320);
+all->Draw("AXL");
+all->GetXaxis()->SetLimits(minPt,maxPt);
+all->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+all->GetXaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitle("1/N_{evt} 1/(2#pi p_{T}) (d^{2}N_{ch})/(d#eta dp_{T}) (GeV/c)^{-2}");
+all->GetXaxis()->SetLimits(minPt,maxPt);
+all->GetYaxis()->SetRangeUser(5e-8,10);
+all->GetYaxis()->SetLimits(5e-8,10);
+setAttrib(all);
+graphInelAliceFit->Draw("PZ");
+
+TLegend *l5_1 = new TLegend(0.200,0.03,0.65,0.376);
+l5_1->SetHeader("pp, INEL, #sqrt{s} = 900 GeV, | #eta | < 0.8");
+l5_1->AddEntry(graphInelAliceFit,"ALICE data","PL");
+l5_1->AddEntry(graphPhojet,"PHOJET","L");
+l5_1->AddEntry(graphPythia109,"PYTHIA D6T (109)","L");
+l5_1->AddEntry(graphPythia306,"PYTHIA ATLAS-CSC (306)","L");
+l5_1->AddEntry(graphPythia320,"PYTHIA Perugia0 (320)","L");
+
+//l1->AddEntry(graphCms,"CMS |#eta|<2.4","LP");
+//la->AddEntry(graphUA1,"UA1","p");
+//la->AddEntry(graphCMS,"CMS","p");
+//la->AddEntry(graphCMSred,"CMS, #eta<0.8","p");
+//la->AddEntry(graphATLAS,"ATLAS","p");
+l5_1->SetFillColor(0);
+l5_1->SetLineColor(0);
+l5_1->SetTextSize(legendTextSize);
+l5_1->Draw();
+
+
+//histo1->GetXaxis()->SetNdivisions(405);
+
+can5->cd();
+pad5_2->Draw();
+pad5_2->cd();
+pad5_2->SetLogx();
+
+TMultiGraph *ratios = new TMultiGraph("ratios","");
+
+
+//ratios->Add(ratioAliceAlice);
+//ratios->Add(ratioAtlasAlice);
+ratios->Add(ratioPhojetAlice);
+ratios->Add(ratioPythia109Alice);
+ratios->Add(ratioPythia306Alice);
+ratios->Add(ratioPythia320Alice);
+
+ratioAliceAlice->Draw("AE3");
+ratioAliceAlice->SetTitle("");
+ratioAliceAlice->GetXaxis()->SetLimits(minPt,maxPt);
+ratioAliceAlice->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+ratioAliceAlice->GetXaxis()->SetTitleOffset(1.4);
+ratioAliceAlice->GetYaxis()->SetTitleOffset(0.9);
+ratioAliceAlice->GetYaxis()->SetTitle("ratio");
+ratioAliceAlice->GetYaxis()->SetLabelSize(0.07);
+ratioAliceAlice->GetXaxis()->SetLabelSize(0.07);
+ratioAliceAlice->GetXaxis()->SetTitleSize(0.07);
+ratioAliceAlice->GetYaxis()->SetTitleSize(0.07);
+ratioAliceAlice->GetYaxis()->SetRangeUser(0.3,1.7);
+ratioAliceAlice->GetYaxis()->SetLimits(0.3,1.7);
+ratioAliceAlice->GetYaxis()->CenterTitle();
+setAttrib(ratioAliceAlice);
+ratioAliceAlice->GetYaxis()->SetLabelOffset(0.023); 
+
+
+//ratio->SetTitle("ratio ALICE/ATLAS (different #eta)");
+//ratios->Draw("XL");
+ratios->Draw("XL");
+//ratios->GetYaxis()->SetRangeUser(0.41,1.49);
+//ratios->GetYaxis()->SetLimits(0.41,1.49);
+
+
+graphInelAlice->SetFillColor(2);
+
+TGraph* tmpG = new TGraph();
+tmpG->SetMarkerColor(colorAliceFit);
+tmpG->SetLineColor(colorAliceFit);
+tmpG->SetMarkerStyle(10);
+tmpG->SetLineWidth(2);
+tmpG->SetLineStyle(1);
+
+TLegend *l5_2 = new TLegend(0.200,0.759+0.005,0.65,0.973);
+l5_2->AddEntry(ratioAliceAlice,"ALICE data uncertainties","F");
+l5_2->AddEntry(tmpG,"MC / data","L");
+//l2->AddEntry(ratioCmsAlice,"CMS / ALICE","F");
+l5_2->SetFillColor(0);
+l5_2->SetLineColor(0);
+l5_2->SetTextSize(legendTextSize);
+l5_2->Draw();
+
+
+
+TF1 *fOne = new TF1("one","1",0.1,20);
+fOne->SetRange(0.1,20);
+fOne->SetLineWidth(1);
+fOne->Draw("SAME");
+//ratio->GetYaxis()->SetTitle("ratio ALICE/ATLAS"); 
+/*
+histo1c->Draw();
+histo1c->GetXaxis()->SetLabelSize(0.08);
+histo1c->GetYaxis()->SetLabelSize(0.08);
+histo1c->GetXaxis()->SetNdivisions(405);
+histo1c->GetYaxis()->SetNdivisions(405);
+*/
+
+logoPrelim(can5);
+}
diff --git a/PWG0/dNdPt/macros/plots/makeCompNSD.C b/PWG0/dNdPt/macros/plots/makeCompNSD.C
new file mode 100644 (file)
index 0000000..288740a
--- /dev/null
@@ -0,0 +1,191 @@
+//------------------------------------------------------------------------------
+// makeCompNSD.C
+//
+// create figure with ALICE comparison to CMS and ATLAS
+//------------------------------------------------------------------------------
+
+
+
+void makeCompNSD()
+{
+
+gROOT->LoadMacro("divide.C");
+TGraphErrors *graphCms = new TGraphErrors(binsCms,ptCms,nsdCms,errPtCms,err2NsdCms);
+graphCms->SetMarkerColor(colorCms);
+graphCms->SetLineColor(colorCms);
+graphCms->SetMarkerStyle(26);
+TGraphAsymmErrors *graphAtlas = new TGraphAsymmErrors(binsAtlas,ptAtlas,nsdAtlas,lowErrPtAtlas,highErrPtAtlas,err2NsdAtlas,err2NsdAtlas);
+graphAtlas->SetMarkerColor(colorAtlas);
+graphAtlas->SetLineColor(colorAtlas);
+graphAtlas->SetMarkerStyle(25);
+
+TGraphErrors *graphAlice     = new TGraphErrors(binsNsdAlice,ptNsdAlice,nsdAlice,0,err2NsdAlice);
+graphAlice->SetMarkerColor(colorAliceFit);
+graphAlice->SetLineColor(colorAliceFit);
+graphAlice->SetMarkerStyle(20);
+
+TMultiGraph *all = new TMultiGraph("all","");
+
+
+all->Add(graphAtlas);
+all->Add(graphCms);
+//all->Add(graphAlice);
+all->Add(graphAlice);
+//all->Draw("AP");
+//setAttrib(all);
+
+
+TGraphErrors *ratioAtlasAlice = divide(graphAtlas,graphAlice);
+ratioAtlasAlice->SetFillColor(colorAtlas);
+ratioAtlasAlice->SetLineColor(colorAtlas);
+ratioAtlasAlice->SetFillStyle(3354);
+
+TGraphErrors *ratioCmsAlice = divide(graphCms,graphAlice);
+ratioCmsAlice->SetFillColor(colorCms);
+ratioCmsAlice->SetLineColor(colorCms);
+ratioCmsAlice->SetFillStyle(3345);
+
+Double_t one[binsNsdAlice];  
+for (Int_t i=0; i < binsNsdAlice; i++) { 
+    one[i] = 1.0;
+}
+
+TGraphErrors *ratioAliceAlice = new TGraphErrors(binsNsdAlice,ptNsdAlice,one,0,relErr2NsdAlice);
+ratioAliceAlice->SetFillColor(colorAliceErrors);
+ratioAliceAlice->SetLineColor(20);
+
+TCanvas *can3 = new TCanvas("can3","CompNSD",520,700);
+
+TPad *pad3_1 = new TPad("pad3_1","pad3_1",0.0,0.35,1.0,1.0);
+setAttrib(pad3_1);
+
+TPad *pad3_2 = new TPad("pad3_2","pad3_2",0.0,0.0,1.0,0.35);
+setAttrib(pad3_2);
+//
+can3->cd();
+
+pad3_1->Draw();
+pad3_1->cd();
+pad3_1->SetLogx();
+pad3_1->SetLogy();
+//all->Draw("AE4");
+all->Draw("APZ");
+all->GetXaxis()->SetTitle("p_{T} [GeV/c]");
+all->GetXaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitle("1/N_{evt} 1/(2#pi p_{T}) (d^{2}N_{ch})/(d#eta dp_{T}) (GeV/c)^{-2}");
+all->GetXaxis()->SetLimits(minPt,maxPt);
+setAttrib(all);
+/*
+all->SetTitle("");
+all->UseCurrentStyle();
+all->GetXaxis()->SetRangeUser(minPt,maxPt);
+all->GetXaxis()->SetLabelOffset(0.0);
+all->GetXaxis()->SetTitleOffset(1.0);
+all->GetYaxis()->SetTitleOffset(1.5);
+all->GetYaxis()->SetTitleSize(0.06);
+all->GetYaxis()->SetLabelSize(0.06);
+all->GetXaxis()->SetNdivisions(405);
+all->GetXaxis()->SetLabelSize(0.0);
+*/
+
+
+
+graphAlice->SetFillColor(2);
+TLegend *l3_1 = new TLegend(0.2,0.03,0.65,0.261);
+l3_1->SetHeader("pp, NSD, #sqrt{s} = 900 GeV");
+l3_1->AddEntry(graphAlice,"ALICE | #eta | < 0.8","LP");
+l3_1->AddEntry(graphAtlas,"ATLAS | #eta | < 2.5","LP");
+l3_1->AddEntry(graphCms,"CMS | #eta | < 2.4","LP");
+//la->AddEntry(graphUA1,"UA1","p");
+//la->AddEntry(graphCMS,"CMS","p");
+//la->AddEntry(graphCMSred,"CMS, #eta<0.8","p");
+//la->AddEntry(graphATLAS,"ATLAS","p");
+l3_1->SetTextSize(legendTextSize);
+l3_1->SetFillColor(0);
+l3_1->SetLineColor(0);
+l3_1->Draw();
+
+
+//histo1->GetXaxis()->SetNdivisions(405);
+
+can3->cd();
+pad3_2->Draw();
+pad3_2->cd();
+pad3_2->SetLogx();
+
+TMultiGraph *ratios = new TMultiGraph("ratios","");
+
+
+ratios->Add(ratioAliceAlice);
+ratios->Add(ratioAtlasAlice);
+ratios->Add(ratioCmsAlice);
+
+;
+//ratio->SetTitle("ratio ALICE/ATLAS (different #eta)");
+ratios->Draw("AE3");
+ratios->GetXaxis()->SetLimits(minPt,maxPt);
+ratios->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+ratios->GetXaxis()->SetTitleOffset(1.4);
+ratios->GetYaxis()->SetTitleOffset(0.9);
+ratios->GetYaxis()->SetTitle("ratio");
+ratios->GetYaxis()->SetLabelSize(0.07);
+ratios->GetXaxis()->SetLabelSize(0.07);
+ratios->GetXaxis()->SetTitleSize(0.07);
+ratios->GetYaxis()->SetTitleSize(0.07);
+ratios->GetYaxis()->CenterTitle();
+setAttrib(ratios);
+
+ratios->GetYaxis()->SetLabelOffset(0.023);
+
+//ratios->GetYaxis()->SetRangeUser(0.2,1.7);
+//ratios->GetYaxis()->SetLimits(0.2,1.7);
+
+/*
+ratios->UseCurrentStyle();
+ratios->GetXaxis()->SetTitleOffset(1.2);
+ratios->GetYaxis()->SetTitleOffset(0.6);
+ratios->GetXaxis()->SetTitleSize(0.135);
+ratios->GetYaxis()->SetTitleSize(0.135);
+ratios->GetXaxis()->SetLabelSize(0.135);
+ratios->GetYaxis()->SetLabelSize(0.135);
+ratios->GetXaxis()->SetLabelOffset(0.025);
+ratios->GetYaxis()->SetLabelOffset(0.06);
+ratios->GetXaxis()->SetTickLength(0.09);
+ratios->GetYaxis()->SetLabelOffset(0.025);
+ratios->GetXaxis()->SetNdivisions(405);
+ratios->GetYaxis()->SetNdivisions(402);
+ratios->GetXaxis()->SetRangeUser(minPt,maxPt);
+*/
+
+graphAlice->SetFillColor(2);
+TLegend *l3_2 = new TLegend(0.2,0.323,0.65,0.637);
+l3_2->AddEntry(ratioAliceAlice,"ALICE uncertainties","F");
+l3_2->AddEntry(ratioAtlasAlice,"ATLAS / ALICE","F");
+l3_2->AddEntry(ratioCmsAlice,"CMS / ALICE","F");
+l3_2->SetFillColor(0);
+l3_2->SetLineColor(0);
+l3_2->SetTextSize(legendTextSize);
+l3_2->Draw();
+
+
+//aliceData->Draw("AE4");
+TF1 *fOne = new TF1("one","1",0.1,20);
+fOne->SetRange(0.1,20);
+fOne->SetLineWidth(1);
+fOne->Draw("SAME");
+//ratio->GetYaxis()->SetTitle("ratio ALICE/ATLAS");
+/*
+histo1c->Draw();
+histo1c->GetXaxis()->SetLabelSize(0.08);
+histo1c->GetYaxis()->SetLabelSize(0.08);
+histo1c->GetXaxis()->SetNdivisions(405);
+histo1c->GetYaxis()->SetNdivisions(405);
+*/
+
+ratios->Draw("E3");
+fOne->Draw("SAME");
+logoPrelim(can3);
+}
diff --git a/PWG0/dNdPt/macros/plots/makeCompYield.C b/PWG0/dNdPt/macros/plots/makeCompYield.C
new file mode 100644 (file)
index 0000000..60c083c
--- /dev/null
@@ -0,0 +1,151 @@
+//------------------------------------------------------------------------------
+// makeCompYield.C
+//
+// create figure with ALICE vs. UA1 data
+//------------------------------------------------------------------------------
+
+
+void makeCompYield()
+{
+using namespace std;
+TGraphErrors *graphYieldUa1 = new TGraphErrors(binsUa1,ptUa1,yieldUa1,errPtUa1,err2YieldUa1);
+graphYieldUa1->SetMarkerColor(colorUa1);
+graphYieldUa1->SetLineColor(colorUa1);
+graphYieldUa1->SetMarkerStyle(26);
+
+TGraphErrors *graphYieldAlice = new TGraphErrors(binsYieldAlice,ptYieldAlice,yieldAlice,0,err2YieldAlice);
+graphYieldAlice->SetMarkerColor(colorAliceFit);
+graphYieldAlice->SetLineColor(colorAliceFit);
+graphYieldAlice->SetLineWidth(1);
+graphYieldAlice->SetMarkerStyle(20);
+
+
+TMultiGraph *all = new TMultiGraph("all","");
+
+
+all->Add(graphYieldUa1);
+//all->Add(graphCms);
+//all->Add(graphAlice);
+all->Add(graphYieldAlice);
+//all->Draw("AP");
+
+Double_t one[binsYieldAlice];  
+for (Int_t i=0; i < binsYieldAlice; i++) { 
+    one[i] = 1.0;
+}
+
+TGraphErrors *ratioUa1Alice = divide(graphYieldUa1,graphYieldAlice);
+ratioUa1Alice->SetFillColor(colorUa1);
+ratioUa1Alice->SetLineColor(colorUa1);
+ratioUa1Alice->SetFillStyle(3345);
+
+
+TGraphErrors *ratioAliceAlice = new TGraphErrors(binsYieldAlice,ptYieldAlice,one,0,relErr2YieldAlice);
+ratioAliceAlice->SetFillColor(colorAliceErrors);
+ratioAliceAlice->SetLineColor(20);
+
+TCanvas *can4 = new TCanvas("can4","CompYield",520,700);
+
+TPad *pad4_1 = new TPad("pad4_1","pad4_1",0.0,0.35,1.0,1.0);
+setAttrib(pad4_1);
+
+TPad *pad4_2 = new TPad("pad4_2","pad4_2",0.0,0.0,1.0,0.35);
+setAttrib(pad4_2);
+
+//
+can4->cd();
+
+pad4_1->Draw();
+pad4_1->cd();
+pad4_1->SetLogx();
+pad4_1->SetLogy();
+//all->Draw("AE4");
+all->Draw("APZ");
+all->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+all->GetXaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitleOffset(1.6);
+all->GetYaxis()->SetTitle("1/N_{evt} 1/(2#pi p_{T}) (d^{2}N_{ch})/(dy dp_{T}) (GeV/c)^{-2}");
+all->GetXaxis()->SetLimits(minPt,maxPt);
+setAttrib(all);
+
+
+graphYieldAlice->SetFillColor(2);
+
+TLegend *l4_1 = new TLegend(0.200,0.03,0.65,0.203);
+//TLegend *l4_1 = new TLegend(0.200,0.031,0.302,0.137);
+l4_1->SetHeader("#sqrt{s} = 900 GeV");
+l4_1->AddEntry(graphYieldAlice,"ALICE pp, NSD, | #eta | < 0.8","LP");
+l4_1->AddEntry(graphYieldUa1,"UA1 p#bar{p}, NSD, | #eta | < 2.5","LP");
+//l1->AddEntry(graphCms,"CMS |#eta|<2.4","LP");
+//la->AddEntry(graphUA1,"UA1","p");
+//la->AddEntry(graphCMS,"CMS","p");
+//la->AddEntry(graphCMSred,"CMS, #eta<0.8","p");
+//la->AddEntry(graphATLAS,"ATLAS","p");
+l4_1->SetFillColor(0);
+l4_1->SetLineColor(0);
+l4_1->SetTextSize(legendTextSize);
+l4_1->Draw();
+
+
+//histo1->GetXaxis()->SetNdivisions(405);
+
+can4->cd();
+pad4_2->Draw();
+pad4_2->cd();
+pad4_2->SetLogx();
+
+TMultiGraph *ratios = new TMultiGraph("ratios","");
+
+
+ratios->Add(ratioAliceAlice);
+//ratios->Add(ratioAtlasAlice);
+ratios->Add(ratioUa1Alice);
+
+
+//ratio->SetTitle("ratio ALICE/ATLAS (different #eta)");
+ratios->Draw("AE3");
+ratios->GetXaxis()->SetLimits(minPt,maxPt);
+ratios->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+ratios->GetXaxis()->SetTitleOffset(1.4);
+ratios->GetYaxis()->SetTitleOffset(0.9);
+ratios->GetYaxis()->SetTitle("ratio");
+ratios->GetYaxis()->SetLabelSize(0.07);
+ratios->GetXaxis()->SetLabelSize(0.07);
+ratios->GetXaxis()->SetTitleSize(0.07);
+ratios->GetYaxis()->SetTitleSize(0.07);
+ratios->GetYaxis()->CenterTitle();
+setAttrib(ratios);
+//ratios->GetYaxis()->SetRangeUser(0.2,1.5);
+//ratios->GetYaxis()->SetLimits(0.2,1.5);
+
+ratios->GetYaxis()->SetLabelOffset(0.023);
+
+graphYieldAlice->SetFillColor(2);
+
+TLegend *l4_2 = new TLegend(0.200,0.323,0.65,0.537);
+l4_2->AddEntry(ratioAliceAlice,"ALICE uncertainties","F");
+l4_2->AddEntry(ratioUa1Alice,"UA1 / ALICE","F");
+//l2->AddEntry(ratioCmsAlice,"CMS / ALICE","F");
+l4_2->SetFillColor(0);
+l4_2->SetLineColor(0);
+l4_2->SetTextSize(legendTextSize);
+l4_2->Draw();
+
+
+//aliceData->Draw("AE4");
+TF1 *fOne = new TF1("one","1",0.1,20);
+fOne->SetRange(0.1,20);
+fOne->SetLineWidth(1);
+fOne->Draw("SAME");
+//ratio->GetYaxis()->SetTitle("ratio ALICE/ATLAS");
+/*
+histo1c->Draw();
+histo1c->GetXaxis()->SetLabelSize(0.08);
+histo1c->GetYaxis()->SetLabelSize(0.08);
+histo1c->GetXaxis()->SetNdivisions(405);
+histo1c->GetYaxis()->SetNdivisions(405);
+*/
+
+logoPrelim(can4);
+}
diff --git a/PWG0/dNdPt/macros/plots/makePlotsAlice3.C b/PWG0/dNdPt/macros/plots/makePlotsAlice3.C
new file mode 100644 (file)
index 0000000..9c6df65
--- /dev/null
@@ -0,0 +1,332 @@
+//------------------------------------------------------------------------------
+// makePlotsAlice3.C
+//
+// create figure with ALICE INEL data and ratios to mod Hagedorn and powerlaw fit
+// fit ratios in seperate panels
+//------------------------------------------------------------------------------
+
+
+void makePlotsAlice3() 
+{
+
+TGraphErrors *graphStatNsdAlice = new TGraphErrors(binsNsdAlice,ptNsdAlice,nsdAlice,0,statNsdAlice);
+graphStatNsdAlice->SetMarkerColor(colorAliceFit);
+graphStatNsdAlice->SetLineColor(colorAliceFit);
+graphStatNsdAlice->SetLineWidth(1);
+graphStatNsdAlice->SetMarkerStyle(20);
+graphStatNsdAlice->SetTitle("");
+
+TGraphErrors *graphStatInelAlice = new TGraphErrors(binsInelAlice,ptInelAlice,inelAlice,0,statInelAlice);
+graphStatInelAlice->SetMarkerColor(colorAliceFit);
+graphStatInelAlice->SetLineColor(colorAliceFit);
+graphStatInelAlice->SetLineWidth(1);
+graphStatInelAlice->SetMarkerStyle(20);
+graphStatInelAlice->SetTitle("");
+
+TGraphErrors *graphSystNsdAlice = new TGraphErrors(binsNsdAlice,centerPtNsdAlice,nsdAlice,0,systNsdAlice);
+graphSystNsdAlice->SetMarkerColor(colorAlice);
+graphSystNsdAlice->SetFillColor(colorAliceErrors);
+graphSystNsdAlice->SetLineColor(20);
+graphSystNsdAlice->SetTitle("");
+graphSystNsdAlice->SetMarkerStyle(20);
+
+TGraphErrors *graphSystInelAlice =  new TGraphErrors(binsInelAlice,centerPtInelAlice,inelAlice,0,systInelAlice);
+graphSystInelAlice->SetMarkerColor(colorAlice);
+graphSystInelAlice->SetFillColor(colorAliceErrors);
+graphSystInelAlice->SetLineColor(20);
+graphSystInelAlice->SetTitle("");
+graphSystInelAlice->SetMarkerStyle(20);
+
+
+
+
+
+TCanvas *can23 = new TCanvas("can23","PlotsAlice3_INEL",520,876);
+
+TPad *pad23_1 = new TPad("pad23_1","pad23_1",0.0,425.0/876.0,1.0,1.0);
+setAttrib(pad23_1);
+pad23_1->SetBottomMargin(0);
+//pad23_1->SetTopMargin(0);
+pad23_1->SetBorderSize(0);
+
+
+
+TPad *pad23_2 = new TPad("pad23_2","pad23_2",0.0,(425.0-175.0)/876.0,1.0,425.0/876.0);
+setAttrib(pad23_2);.
+pad23_2->SetTopMargin(0.0);
+pad23_2->SetBottomMargin(0.0);
+pad23_2->SetBorderSize(0);
+
+TPad *pad23_3 = new TPad("pad23_2","pad23_2",0.0,0.0,1.0,(425.0-175.0)/876.0);
+setAttrib(pad23_3);
+pad23_3->SetTopMargin(0.0);
+//pad23_3->SetBottomMargin(0);
+pad23_3->SetBottomMargin(0.30);
+pad23_3->SetBorderSize(0);
+
+
+can23->cd();
+
+pad23_1->Draw();
+pad23_1->cd();
+pad23_1->SetLogx();
+pad23_1->SetLogy();
+
+graphStatInelAlice->Draw("APZ");
+//graphSystInelAlice->Draw("AE3");
+graphStatInelAlice->GetXaxis()->SetLimits(minPt,maxPt);
+graphStatInelAlice->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+graphStatInelAlice->GetXaxis()->SetTitleOffset(1.6);
+graphStatInelAlice->GetYaxis()->SetTitleOffset(1.6);
+graphStatInelAlice->GetYaxis()->SetTitle("1/N_{evt} 1/(2#pi p_{T}) (d^{2}N_{ch})/(d#eta dp_{T}) (GeV/c)^{-2}");
+graphStatInelAlice->GetYaxis()->SetLimits(1.01e-7,10);
+graphStatInelAlice->GetYaxis()->SetRangeUser(1.01e-7,10);
+setAttrib(graphStatInelAlice);
+graphStatInelAlice->GetYaxis()->SetTitleOffset(2.8);
+
+//ptfunction2 = new TF1("ptfunction2","[0]*(1+(sqrt(0.14*0.14+x*x)-0.14)/([1]*[2]))^ ((-1) * [1])",0,12.0); 
+ptfunction2 = new TF1("ptfunction2","[0]*(x/sqrt(0.14*0.14+x*x))*(1+(x)/([2]))^((-1) * [1])",0.0,10.0); 
+
+powerlaw4 = new TF1("powerlaw4","[0]*x^[1]",0.0,10.0);
+
+ptfunction2->SetParameter(0,54.931915);
+ptfunction2->SetParameter(1,7.931081);
+ptfunction2->SetParameter(2,0.148710);
+ptfunction2->SetLineWidth(2);
+
+graphStatInelAlice->Fit("ptfunction2","MN","",0.0,10.0);
+graphStatInelAlice->Fit("powerlaw4","MN","",3.0,10.0);
+
+ptfunction2->SetLineColor(colorCms);
+powerlaw4->SetLineWidth(2);
+powerlaw4->SetLineColor(colorAtlas);
+
+powerlaw4->SetLineStyle(7); //was 7 for dashed
+powerlaw4->SetRange(1,3);
+powerlaw4->DrawCopy("SAME");
+
+ptfunction2->SetLineStyle(1); //was 7 for dashed
+ptfunction2->SetRange(4,10);
+ptfunction2->DrawCopy("SAME");
+
+powerlaw4->SetLineStyle(7);
+powerlaw4->SetRange(3,10);
+powerlaw4->DrawCopy("SAME");
+
+ptfunction2->SetLineStyle(1);
+ptfunction2->SetRange(0,4);
+ptfunction2->DrawCopy("SAME");
+
+
+
+//TLegend *leg23_1 = new TLegend(0.2,0.145,0.65,0.376);
+TLegend *leg23_1 = new TLegend(0.2,0.03,0.65,0.261);
+leg23_1->SetHeader("pp, INEL, #sqrt{s} = 900 GeV, | #eta | < 0.8");
+//leg23_1->AddEntry("","ALICE pp, INEL","");
+//leg23_1->AddEntry("","#sqrt{s} = 900 GeV, | #eta | < 0.8","");
+//leg23_1->AddEntry("","#LT p_{T} #GT = (469 #pm 1 #pm 12) MeV/c","");
+leg23_1->AddEntry(graphStatInelAlice,"ALICE data","LP");
+leg23_1->AddEntry(ptfunction2,"mod. Hagedorn fit","L");
+leg23_1->AddEntry(powerlaw4,"power law fit, p_{T} > 3 GeV/c","L");
+//leg23_1->AddEntry("","n (3-10 GeV/c) = 6.63 #pm 0.12 #pm 0.01","");
+
+leg23_1->SetFillColor(0);
+leg23_1->SetLineColor(0);
+leg23_1->SetTextSize(legendTextSize);
+leg23_1->Draw();
+/*
+TLegend *leg23_11 = new TLegend(0.2,0.03,0.3,0.088);
+leg23_11->SetFillColor(0);
+leg23_11->SetLineColor(0);
+leg23_11->SetTextSize(legendTextSize);
+leg23_11->AddEntry("","A*p_{T}^{-n}; n = 6.63 #pm 0.12","");
+leg23_11->Draw();
+*/
+
+can23->cd();
+/*
+pad23_11->Draw();
+pad23_11->cd();
+*/
+pad23_2->SetTopMargin(0.0);
+pad23_2->SetBottomMargin(0.0);
+pad23_2->Draw();
+pad23_2->cd();
+pad23_2->SetLogx();
+
+
+Double_t one[binsInelAlice];  
+for (Int_t i=0; i < binsInelAlice; i++) { 
+    one[i] = 1.0;
+}
+
+TGraphErrors *systInelAlice = new TGraphErrors(binsInelAlice*2);
+for (int i=0; i < binsInelAlice; i++) {
+   systInelAlice->SetPoint(i*2,lowPtInelAlice[i],1);
+   systInelAlice->SetPointError(i*2,0,relSystInelAlice[i]);
+   systInelAlice->SetPoint(i*2+1,highPtInelAlice[i],1);   
+   systInelAlice->SetPointError(i*2+1,0,relSystInelAlice[i]);
+}
+//TGraphErrors *ratioAliceAlice = new TGraphErrors(binsInelAlice,centerPtInelAlice,one,0,relErr2InelAlice);
+   
+systInelAlice->Draw("AE3");
+systInelAlice->SetFillColor(colorAliceErrors);
+systInelAlice->SetLineColor(colorAliceErrors);
+systInelAlice->SetTitle("");
+systInelAlice->SetLineWidth(0);
+systInelAlice->GetXaxis()->SetLimits(minPt,maxPt);
+systInelAlice->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+systInelAlice->GetXaxis()->SetTitleOffset(1.4);
+systInelAlice->GetYaxis()->SetTitleOffset(0.9);
+systInelAlice->GetYaxis()->SetTitle("fit / data");
+systInelAlice->GetYaxis()->CenterTitle();
+systInelAlice->GetYaxis()->SetLabelSize(0.07);
+systInelAlice->GetXaxis()->SetLabelSize(0.07);
+systInelAlice->GetXaxis()->SetTitleSize(0.07);
+systInelAlice->GetYaxis()->SetTitleSize(0.07);
+systInelAlice->GetYaxis()->SetRangeUser(0.1,1.9);
+systInelAlice->GetYaxis()->SetLimits(0.1,1.9);
+setAttrib(systInelAlice);
+systInelAlice->GetYaxis()->SetNdivisions(505);
+systInelAlice->SetFillColor(colorAliceErrors);
+systInelAlice->SetLineColor(20);
+//systInelAlice->Clone()->Draw("L");
+systInelAlice->GetYaxis()->SetTitleOffset(2.8);
+
+TGraphErrors *ratioFitInelAlice = new TGraphErrors(binsInelAlice);
+for (int i=0; i < binsInelAlice; i++) {
+   if (ptInelAlice[i] > 4.0) break;
+   ratioFitInelAlice->SetPoint(i,ptInelAlice[i],ptfunction2->Eval(ptInelAlice[i])/inelAlice[i]);
+   ratioFitInelAlice->SetPointError(i,0,statInelAlice[i]*ptfunction2->Eval(ptInelAlice[i])/(inelAlice[i]*inelAlice[i]));
+}
+
+TGraphErrors *ratioPFitInelAlice = new TGraphErrors(binsInelAlice);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioPFitInelAlice->SetPoint(i,ptInelAlice[i],powerlaw4->Eval(ptInelAlice[i])/inelAlice[i]);
+   ratioPFitInelAlice->SetPointError(i,0,statInelAlice[i]*powerlaw4->Eval(ptInelAlice[i])/(inelAlice[i]*inelAlice[i]));
+}
+
+TGraphErrors *ratioFitInelAliceNF = new TGraphErrors(binsInelAlice);
+for (int i=0; i < binsInelAlice; i++) {
+   ratioFitInelAliceNF->SetPoint(i,ptInelAlice[i],ptfunction2->Eval(ptInelAlice[i])/inelAlice[i]);
+   ratioFitInelAliceNF->SetPointError(i,0,statInelAlice[i]*ptfunction2->Eval(ptInelAlice[i])/(inelAlice[i]*inelAlice[i]));
+}
+
+TGraphErrors *ratioPFitInelAliceNF = new TGraphErrors(binsInelAlice);
+for (int i=0; i < binsInelAlice; i++) {
+   if (ptInelAlice[i] > 3.0) break;
+   ratioPFitInelAliceNF->SetPoint(i,ptInelAlice[i],powerlaw4->Eval(ptInelAlice[i])/inelAlice[i]);
+   ratioPFitInelAliceNF->SetPointError(i,0,statInelAlice[i]*powerlaw4->Eval(ptInelAlice[i])/(inelAlice[i]*inelAlice[i]));
+}
+
+
+systInelAlice->GetYaxis()->SetLabelOffset(0.023);
+
+setAttrib(ratioFitInelAliceNF);
+ratioFitInelAliceNF->SetLineWidth(1);
+ratioFitInelAliceNF->SetMarkerStyle(20);
+ratioFitInelAliceNF->SetMarkerColor(colorCms);
+ratioFitInelAliceNF->SetLineColor(colorCms);
+ratioFitInelAliceNF->Draw("PZ");
+
+setAttrib(ratioFitInelAlice);
+ratioFitInelAlice->SetLineWidth(1);
+ratioFitInelAlice->SetMarkerStyle(20);
+ratioFitInelAlice->SetMarkerColor(colorCms);
+ratioFitInelAlice->SetLineColor(colorCms);
+ratioFitInelAlice->Draw("PZ");
+
+
+setAttrib(ratioPFitInelAlice);
+ratioPFitInelAlice->SetLineWidth(1);
+ratioPFitInelAlice->SetMarkerStyle(20);
+ratioPFitInelAlice->SetMarkerColor(colorAtlas);
+ratioPFitInelAlice->SetLineColor(colorAtlas);
+//ratioPFitInelAlice->Draw("PZ");
+
+
+
+
+
+TF1 *fOne = new TF1("one","1",0.1,20);
+fOne->SetRange(0.1,20);
+fOne->SetLineWidth(1);
+fOne->Draw("SAME");
+
+TLegend *l23_2 = new TLegend(0.200,0.053,0.65,0.353);
+l23_2->AddEntry(systInelAlice,"ALICE systematic uncertainties","F");
+l23_2->AddEntry(ratioFitInelAlice,"mod. Hagedorn","LP");
+l23_2->SetFillColor(0);
+l23_2->SetLineColor(0);
+l23_2->SetTextSize(legendTextSize);
+l23_2->Draw();
+
+//ratioPFitInelAlice->Draw("PZ");
+
+
+
+can23->cd();
+// pad23_11->cd();
+
+pad23_3->Draw();
+pad23_3->cd();
+pad23_3->SetLogx();
+
+systInelAlice->Draw("AE3");
+systInelAlice->SetFillColor(colorAliceErrors);
+systInelAlice->SetLineColor(colorAliceErrors);
+systInelAlice->SetTitle("");
+systInelAlice->SetLineWidth(0);
+systInelAlice->GetXaxis()->SetLimits(minPt,maxPt);
+systInelAlice->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+systInelAlice->GetXaxis()->SetTitleOffset(3.6);
+systInelAlice->GetYaxis()->SetTitleOffset(0.9);
+systInelAlice->GetYaxis()->SetTitle("fit / data");
+systInelAlice->GetYaxis()->CenterTitle();
+systInelAlice->GetYaxis()->SetLabelSize(0.07);
+systInelAlice->GetXaxis()->SetLabelSize(0.07);
+systInelAlice->GetXaxis()->SetTitleSize(0.07);
+systInelAlice->GetYaxis()->SetTitleSize(0.07);
+systInelAlice->GetYaxis()->SetRangeUser(0.1,1.9);
+systInelAlice->GetYaxis()->SetLimits(0.1,1.9);
+systInelAlice->GetYaxis()->SetNdivisions(505);
+setAttrib(systInelAlice);
+systInelAlice->SetFillColor(colorAliceErrors);
+systInelAlice->SetLineColor(20);
+systInelAlice->GetYaxis()->SetTitleOffset(2.8);
+systInelAlice->GetXaxis()->SetTitleOffset(4.6);
+
+setAttrib(ratioPFitInelAlice);
+ratioPFitInelAlice->SetLineWidth(1);
+ratioPFitInelAlice->SetMarkerStyle(20);
+ratioPFitInelAlice->SetMarkerColor(colorAtlas);
+ratioPFitInelAlice->SetLineColor(colorAtlas);
+ratioPFitInelAlice->Draw("PZ");
+
+setAttrib(ratioPFitInelAliceNF);
+ratioPFitInelAliceNF->SetLineWidth(1);
+ratioPFitInelAliceNF->SetMarkerStyle(20);
+ratioPFitInelAliceNF->SetMarkerColor(kWhite);
+ratioPFitInelAliceNF->SetLineColor(kWhite);
+ratioPFitInelAliceNF->DrawClone("PZ");
+
+setAttrib(ratioPFitInelAliceNF);
+ratioPFitInelAliceNF->SetLineWidth(1);
+ratioPFitInelAliceNF->SetMarkerStyle(24);
+ratioPFitInelAliceNF->SetMarkerColor(colorAtlas);
+ratioPFitInelAliceNF->SetLineColor(colorAtlas);
+ratioPFitInelAliceNF->Draw("PZ");
+
+fOne->Draw("SAME");
+
+
+TLegend *l23_3 = new TLegend(0.200,0.323,0.65,0.537);
+l23_3->AddEntry(systInelAlice,"ALICE systematic uncertainties","F");
+l23_3->AddEntry(ratioPFitInelAlice,"power law","LP");
+l23_3->SetFillColor(0);
+l23_3->SetLineColor(0);
+l23_3->SetTextSize(legendTextSize);
+l23_3->Draw();
+
+logoPrelim(can23);
+}
diff --git a/PWG0/dNdPt/macros/plots/readAliceInel.C b/PWG0/dNdPt/macros/plots/readAliceInel.C
new file mode 100644 (file)
index 0000000..6213cce
--- /dev/null
@@ -0,0 +1,130 @@
+Int_t readAliceInel() 
+{
+// read ALICE INEL data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read ALICE INEL data from file" <<endl;
+cout << "Number of bins: " << binsInelAlice <<endl;
+cout << "Filename:       " << filenameInelAlice <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileInelAlice;
+fileInelAlice.open(filenameInelAlice);
+
+Int_t i = 0;
+while(!fileInelAlice.eof()) {
+    if(i == binsInelAlice) break;    
+    fileInelAlice >> centerPtInelAlice[i] >>  inelAlice[i] >> statInelAlice[i] >> systInelAlice[i];
+    //systInelAlice[i] = 0.15*inelAlice[i]+1e-7; // sys error has to be provided, currently 10%
+    
+    // the width of the pt bins, currently hardwired....
+    widthPtInelAlice[i] = 0.05;
+    if (centerPtInelAlice[i] > 1) widthPtInelAlice[i] = 0.1;
+    if (centerPtInelAlice[i] > 2) widthPtInelAlice[i] = 0.2;
+    if (centerPtInelAlice[i] > 4) widthPtInelAlice[i] = 0.5;
+    if (centerPtInelAlice[i] > 7) widthPtInelAlice[i] = 1.0;
+    
+    ptInelAlice[i]       = centerPtInelAlice[i];
+    errPtInelAlice[i]    = widthPtInelAlice[i] / 2.0;
+    lowPtInelAlice[i]    = centerPtInelAlice[i] - errPtInelAlice[i];
+    highPtInelAlice[i]   = centerPtInelAlice[i] + errPtInelAlice[i];      
+            
+    lowStatInelAlice[i]  = inelAlice[i] - statInelAlice[i];
+    highStatInelAlice[i] = inelAlice[i] + statInelAlice[i];
+    relStatInelAlice[i]  = statInelAlice[i] / inelAlice[i];    
+    lowSystInelAlice[i]  = inelAlice[i] - systInelAlice[i];
+    highSystInelAlice[i] = inelAlice[i] + systInelAlice[i];
+    relSystInelAlice[i]  = systInelAlice[i] / inelAlice[i];    
+    errInelAlice[i]      = systInelAlice[i] + statInelAlice[i];
+    lowErrInelAlice[i]   = inelAlice[i] - errInelAlice[i];
+    highErrInelAlice[i]  = inelAlice[i] + errInelAlice[i];
+    relErrInelAlice[i]   = errInelAlice[i] / inelAlice[i];
+    err2InelAlice[i]     = sqrt(systInelAlice[i]*systInelAlice[i] + statInelAlice[i]*statInelAlice[i]);
+    lowErr2InelAlice[i]  = inelAlice[i] - err2InelAlice[i];
+    highErr2InelAlice[i] = inelAlice[i] + errInelAlice[i];
+    relErr2InelAlice[i]  = err2InelAlice[i] / inelAlice[i];
+    
+    
+    
+    ptInel2PiPtAlice[i]       = ptInelAlice[i];
+    centerPtInel2PiPtAlice[i] = centerPtInelAlice[i];
+    widthPtInel2PiPtAlice[i]  = widthPtInelAlice[i];
+    errPtInel2PiPtAlice[i]    = errPtInelAlice[i];
+    lowPtInel2PiPtAlice[i]    = lowPtInelAlice[i];
+    highPtInel2PiPtAlice[i]   = highPtInelAlice[i];
+
+    inel2PiPtAlice[i]         = inelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    statInel2PiPtAlice[i]     = statInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    lowStatInel2PiPtAlice[i]  = lowStatInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    highStatInel2PiPtAlice[i] = highStatInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    relStatInel2PiPtAlice[i]  = relStatInelAlice[i];
+    systInel2PiPtAlice[i]     = systInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    lowSystInel2PiPtAlice[i]  = lowSystInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    highSystInel2PiPtAlice[i] = highSystInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    relSystInel2PiPtAlice[i]  = relSystInelAlice[i];
+    errInel2PiPtAlice[i]      = errInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    lowErrInel2PiPtAlice[i]   = lowErrInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    highErrInel2PiPtAlice[i]  = highErrInelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    relErrInel2PiPtAlice[i]   = relErrInelAlice[i];
+    err2Inel2PiPtAlice[i]     = err2InelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    lowErr2Inel2PiPtAlice[i]  = lowErr2InelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    highErr2Inel2PiPtAlice[i] = highErr2InelAlice[i]*centerPtInelAlice[i]*2*M_PI;
+    relErr2Inel2PiPtAlice[i]  = relErr2InelAlice[i];
+    
+        
+    
+    cout << "ptInelAlice[" << i << "]          = " << ptInelAlice[i] <<endl;
+    cout << "   centerPtInelAlice[" << i << "] = " << centerPtInelAlice[i] <<endl;
+    cout << "   widthPtInelAlice[" << i << "]  = " << widthPtInelAlice[i] <<endl;
+    cout << "   errPtInelAlice[" << i << "]    = " << errPtInelAlice[i] <<endl;
+    cout << "   lowPtInelAlice[" << i << "]    = " << lowPtInelAlice[i] <<endl;
+    cout << "   highPtInelAlice[" << i << "]   = " << highPtInelAlice[i] <<endl;
+    cout << "inelAlice[" << i << "]            = " << inelAlice[i] <<endl;
+    cout << "   statInelAlice[" << i << "]     = " << statInelAlice[i] <<endl;
+    cout << "   lowStatInelAlice[" << i << "]  = " << lowStatInelAlice[i] <<endl;
+    cout << "   highStatInelAlice[" << i << "] = " << highStatInelAlice[i] <<endl;
+    cout << "   relStatInelAlice[" << i << "]  = " << relStatInelAlice[i] <<endl;
+    cout << "   systInelAlice[" << i << "]     = " << systInelAlice[i] <<endl;
+    cout << "   lowSystInelAlice[" << i << "]  = " << lowSystInelAlice[i] <<endl;
+    cout << "   highSystInelAlice[" << i << "] = " << highSystInelAlice[i] <<endl;
+    cout << "   relSystInelAlice[" << i << "]  = " << relSystInelAlice[i] <<endl;
+    cout << "errInelAlice[" << i << "]         = " << errInelAlice[i] <<endl;
+    cout << "   lowErrInelAlice[" << i << "]   = " << lowErrInelAlice[i] <<endl;
+    cout << "   highErrInelAlice[" << i << "]  = " << highErrInelAlice[i] <<endl;
+    cout << "   relErrInelAlice[" << i << "]   = " << relErrInelAlice[i] <<endl;
+    cout << "err2InelAlice[" << i << "]        = " << err2InelAlice[i] <<endl;
+    cout << "   lowErr2InelAlice[" << i << "]  = " << lowErr2InelAlice[i] <<endl;
+    cout << "   highErr2InelAlice[" << i << "] = " << highErr2InelAlice[i] <<endl;
+    cout << "   relErr2InelAlice[" << i << "]  = " << relErr2InelAlice[i] <<endl;
+    cout << endl;
+    /*
+    ptInelAliceFit[i]      = ptInelAlice[i];
+    InelInelAliceFit[i]     = InelInelAlice[i]*ptInelAlice[i];
+    errInelInelAliceFit[i]  = errInelInelAlice[i];
+    widthPtInelAliceFit[i] = widthPtInelAlice[i];
+    errPtInelAliceFit[i]  = 0; //errPtInelAlice[i];
+    lowPtInelAliceFit[i]  = lowPtInelAlice[i];
+    highPtInelAliceFit[i] = highPtInelAlice[i];
+    */
+        
+   i++;
+} // while(!fileInelAlice.eof())
+fileInelAlice.close();
+//if (fileInelAlice) { delete fileInelAlice; }
+//fileInelAlice=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading ALICE INEL data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readAliceNsd.C b/PWG0/dNdPt/macros/plots/readAliceNsd.C
new file mode 100644 (file)
index 0000000..7220f46
--- /dev/null
@@ -0,0 +1,137 @@
+Int_t readAliceNsd() 
+{
+// read ALICE NSD data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read ALICE NSD data from file" <<endl;
+cout << "Number of bins: " << binsNsdAlice <<endl;
+cout << "Filename:       " << filenameNsdAlice <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileNsdAlice;
+fileNsdAlice.open(filenameNsdAlice);
+
+Int_t i = 0;
+while(!fileNsdAlice.eof()) {
+    if(i == binsNsdAlice) break;
+    // textfile content: pt_bin_center:NSD_yield:errNSD_yield
+    fileNsdAlice >> centerPtNsdAlice[i] >>  nsdAlice[i] >> statNsdAlice[i] >> systNsdAlice[i];
+    //systNsdAlice[i] = 0.15*nsdAlice[i]+1e-7; // sys error has to be provided, currently 10%
+    
+    // the width of the pt bins, currently hardwired....
+    widthPtNsdAlice[i] = 0.05;
+    if (centerPtNsdAlice[i] > 1) widthPtNsdAlice[i] = 0.1;
+    if (centerPtNsdAlice[i] > 2) widthPtNsdAlice[i] = 0.2;
+    if (centerPtNsdAlice[i] > 4) widthPtNsdAlice[i] = 0.5;
+    if (centerPtNsdAlice[i] > 7) widthPtNsdAlice[i] = 1.0;
+    
+    ptNsdAlice[i]       = centerPtNsdAlice[i];
+    errPtNsdAlice[i]    = widthPtNsdAlice[i] / 2.0;
+    lowPtNsdAlice[i]    = centerPtNsdAlice[i] - errPtNsdAlice[i];
+    highPtNsdAlice[i]   = centerPtNsdAlice[i] + errPtNsdAlice[i];      
+            
+    lowStatNsdAlice[i]  = nsdAlice[i] - statNsdAlice[i];
+    highStatNsdAlice[i] = nsdAlice[i] + statNsdAlice[i];
+    relStatNsdAlice[i]  = statNsdAlice[i] / nsdAlice[i];    
+    lowSystNsdAlice[i]  = nsdAlice[i] - systNsdAlice[i];
+    highSystNsdAlice[i] = nsdAlice[i] + systNsdAlice[i];
+    relSystNsdAlice[i]  = systNsdAlice[i] / nsdAlice[i];    
+    errNsdAlice[i]      = systNsdAlice[i] + statNsdAlice[i];
+    lowErrNsdAlice[i]   = nsdAlice[i] - errNsdAlice[i];
+    highErrNsdAlice[i]  = nsdAlice[i] + errNsdAlice[i];
+    relErrNsdAlice[i]   = errNsdAlice[i] / nsdAlice[i];
+    err2NsdAlice[i]     = sqrt(systNsdAlice[i]*systNsdAlice[i] + statNsdAlice[i]*statNsdAlice[i]);
+    lowErr2NsdAlice[i]  = nsdAlice[i] - err2NsdAlice[i];
+    highErr2NsdAlice[i] = nsdAlice[i] + errNsdAlice[i];
+    relErr2NsdAlice[i]  = err2NsdAlice[i] / nsdAlice[i];
+        
+        
+        
+        
+    ptNsd2PiPtAlice[i]       = ptNsdAlice[i];
+    centerPtNsd2PiPtAlice[i] = centerPtNsdAlice[i];
+    widthPtNsd2PiPtAlice[i]  = widthPtNsdAlice[i];
+    errPtNsd2PiPtAlice[i]    = errPtNsdAlice[i];
+    lowPtNsd2PiPtAlice[i]    = lowPtNsdAlice[i];
+    highPtNsd2PiPtAlice[i]   = highPtNsdAlice[i];
+
+    nsd2PiPtAlice[i]         = nsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    statNsd2PiPtAlice[i]     = statNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    lowStatNsd2PiPtAlice[i]  = lowStatNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    highStatNsd2PiPtAlice[i] = highStatNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    relStatNsd2PiPtAlice[i]  = relStatNsdAlice[i];
+    systNsd2PiPtAlice[i]     = systNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    lowSystNsd2PiPtAlice[i]  = lowSystNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    highSystNsd2PiPtAlice[i] = highSystNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    relSystNsd2PiPtAlice[i]  = relSystNsdAlice[i];
+    errNsd2PiPtAlice[i]      = errNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    lowErrNsd2PiPtAlice[i]   = lowErrNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    highErrNsd2PiPtAlice[i]  = highErrNsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    relErrNsd2PiPtAlice[i]   = relErrNsdAlice[i];
+    err2Nsd2PiPtAlice[i]     = err2NsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    lowErr2Nsd2PiPtAlice[i]  = lowErr2NsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    highErr2Nsd2PiPtAlice[i] = highErr2NsdAlice[i]*centerPtNsdAlice[i]*2*M_PI;
+    relErr2Nsd2PiPtAlice[i]  = relErr2NsdAlice[i];        
+        
+        
+        
+        
+        
+        
+        
+    
+    cout << "ptNsdAlice[" << i << "]          = " << ptNsdAlice[i] <<endl;
+    cout << "   centerPtNsdAlice[" << i << "] = " << centerPtNsdAlice[i] <<endl;
+    cout << "   widthPtNsdAlice[" << i << "]  = " << widthPtNsdAlice[i] <<endl;
+    cout << "   errPtNsdAlice[" << i << "]    = " << errPtNsdAlice[i] <<endl;
+    cout << "   lowPtNsdAlice[" << i << "]    = " << lowPtNsdAlice[i] <<endl;
+    cout << "   highPtNsdAlice[" << i << "]   = " << highPtNsdAlice[i] <<endl;
+    cout << "nsdAlice[" << i << "]            = " << nsdAlice[i] <<endl;
+    cout << "   statNsdAlice[" << i << "]     = " << statNsdAlice[i] <<endl;
+    cout << "   lowStatNsdAlice[" << i << "]  = " << lowStatNsdAlice[i] <<endl;
+    cout << "   highStatNsdAlice[" << i << "] = " << highStatNsdAlice[i] <<endl;
+    cout << "   relStatNsdAlice[" << i << "]  = " << relStatNsdAlice[i] <<endl;
+    cout << "   systNsdAlice[" << i << "]     = " << systNsdAlice[i] <<endl;
+    cout << "   lowSystNsdAlice[" << i << "]  = " << lowSystNsdAlice[i] <<endl;
+    cout << "   highSystNsdAlice[" << i << "] = " << highSystNsdAlice[i] <<endl;
+    cout << "   relSystNsdAlice[" << i << "]  = " << relSystNsdAlice[i] <<endl;
+    cout << "errNsdAlice[" << i << "]         = " << errNsdAlice[i] <<endl;
+    cout << "   lowErrNsdAlice[" << i << "]   = " << lowErrNsdAlice[i] <<endl;
+    cout << "   highErrNsdAlice[" << i << "]  = " << highErrNsdAlice[i] <<endl;
+    cout << "   relErrNsdAlice[" << i << "]   = " << relErrNsdAlice[i] <<endl;
+    cout << "err2NsdAlice[" << i << "]        = " << err2NsdAlice[i] <<endl;
+    cout << "   lowErr2NsdAlice[" << i << "]  = " << lowErr2NsdAlice[i] <<endl;
+    cout << "   highErr2NsdAlice[" << i << "] = " << highErr2NsdAlice[i] <<endl;
+    cout << "   relErr2NsdAlice[" << i << "]  = " << relErr2NsdAlice[i] <<endl;
+    cout << endl;
+    /*
+    ptNsdAliceFit[i]      = ptNsdAlice[i];
+    NsdNsdAliceFit[i]     = NsdNsdAlice[i]*ptNsdAlice[i];
+    errNsdNsdAliceFit[i]  = errNsdNsdAlice[i];
+    widthPtNsdAliceFit[i] = widthPtNsdAlice[i];
+    errPtNsdAliceFit[i]  = 0; //errPtNsdAlice[i];
+    lowPtNsdAliceFit[i]  = lowPtNsdAlice[i];
+    highPtNsdAliceFit[i] = highPtNsdAlice[i];
+    */
+        
+   i++;
+} // while(!fileNsdAlice.eof())
+fileNsdAlice.close();
+//if (fileNsdAlice) { delete fileNsdAlice; }
+//fileNsdAlice=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading ALICE NSD data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readAliceYield.C b/PWG0/dNdPt/macros/plots/readAliceYield.C
new file mode 100644 (file)
index 0000000..8c5f53c
--- /dev/null
@@ -0,0 +1,134 @@
+Int_t readAliceYield() 
+{
+// read ALICE INVARIANT YIELD data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read ALICE INVARIANT YIELD data from file" <<endl;
+cout << "Number of bins: " << binsYieldAlice <<endl;
+cout << "Filename:       " << filenameYieldAlice <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileYieldAlice;
+fileYieldAlice.open(filenameYieldAlice);
+
+Int_t i = 0;
+while(!fileYieldAlice.eof()) {
+    if(i == binsYieldAlice) break;    
+    fileYieldAlice >> centerPtYieldAlice[i] >>  yieldAlice[i] >> statYieldAlice[i] >> systYieldAlice[i];
+    //systYieldAlice[i] = 0.15*yieldAlice[i]+1e-7; // sys error has to be provided, currently 10%
+    
+    // the width of the pt bins, currently hardwired....
+    widthPtYieldAlice[i] = 0.05;
+    if (centerPtYieldAlice[i] > 1) widthPtYieldAlice[i] = 0.1;
+    if (centerPtYieldAlice[i] > 2) widthPtYieldAlice[i] = 0.2;
+    if (centerPtYieldAlice[i] > 4) widthPtYieldAlice[i] = 0.5;
+    if (centerPtYieldAlice[i] > 7) widthPtYieldAlice[i] = 1.0;
+    
+    ptYieldAlice[i]       = centerPtYieldAlice[i];
+    errPtYieldAlice[i]    = widthPtYieldAlice[i] / 2.0;
+    lowPtYieldAlice[i]    = centerPtYieldAlice[i] - errPtYieldAlice[i];
+    highPtYieldAlice[i]   = centerPtYieldAlice[i] + errPtYieldAlice[i];      
+            
+    lowStatYieldAlice[i]  = yieldAlice[i] - statYieldAlice[i];
+    highStatYieldAlice[i] = yieldAlice[i] + statYieldAlice[i];
+    relStatYieldAlice[i]  = statYieldAlice[i] / yieldAlice[i];    
+    lowSystYieldAlice[i]  = yieldAlice[i] - systYieldAlice[i];
+    highSystYieldAlice[i] = yieldAlice[i] + systYieldAlice[i];
+    relSystYieldAlice[i]  = systYieldAlice[i] / yieldAlice[i];    
+    errYieldAlice[i]      = systYieldAlice[i] + statYieldAlice[i];
+    lowErrYieldAlice[i]   = yieldAlice[i] - errYieldAlice[i];
+    highErrYieldAlice[i]  = yieldAlice[i] + errYieldAlice[i];
+    relErrYieldAlice[i]   = errYieldAlice[i] / yieldAlice[i];
+    err2YieldAlice[i]     = sqrt(systYieldAlice[i]*systYieldAlice[i] + statYieldAlice[i]*statYieldAlice[i]);
+    lowErr2YieldAlice[i]  = yieldAlice[i] - err2YieldAlice[i];
+    highErr2YieldAlice[i] = yieldAlice[i] + errYieldAlice[i];
+    relErr2YieldAlice[i]  = err2YieldAlice[i] / yieldAlice[i];
+        
+        
+        
+        
+    ptYield2PiPtAlice[i]       = ptYieldAlice[i];
+    centerPtYield2PiPtAlice[i] = centerPtYieldAlice[i];
+    widthPtYield2PiPtAlice[i]  = widthPtYieldAlice[i];
+    errPtYield2PiPtAlice[i]    = errPtYieldAlice[i];
+    lowPtYield2PiPtAlice[i]    = lowPtYieldAlice[i];
+    highPtYield2PiPtAlice[i]   = highPtYieldAlice[i];
+
+    yield2PiPtAlice[i]         = yieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    statYield2PiPtAlice[i]     = statYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    lowStatYield2PiPtAlice[i]  = lowStatYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    highStatYield2PiPtAlice[i] = highStatYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    relStatYield2PiPtAlice[i]  = relStatYieldAlice[i];
+    systYield2PiPtAlice[i]     = systYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    lowSystYield2PiPtAlice[i]  = lowSystYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    highSystYield2PiPtAlice[i] = highSystYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    relSystYield2PiPtAlice[i]  = relSystYieldAlice[i];
+    errYield2PiPtAlice[i]      = errYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    lowErrYield2PiPtAlice[i]   = lowErrYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    highErrYield2PiPtAlice[i]  = highErrYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    relErrYield2PiPtAlice[i]   = relErrYieldAlice[i];
+    err2Yield2PiPtAlice[i]     = err2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    lowErr2Yield2PiPtAlice[i]  = lowErr2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    highErr2Yield2PiPtAlice[i] = highErr2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
+    relErr2Yield2PiPtAlice[i]  = relErr2YieldAlice[i];                
+        
+        
+        
+        
+        
+    
+    cout << "ptYieldAlice[" << i << "]          = " << ptYieldAlice[i] <<endl;
+    cout << "   centerPtYieldAlice[" << i << "] = " << centerPtYieldAlice[i] <<endl;
+    cout << "   widthPtYieldAlice[" << i << "]  = " << widthPtYieldAlice[i] <<endl;
+    cout << "   errPtYieldAlice[" << i << "]    = " << errPtYieldAlice[i] <<endl;
+    cout << "   lowPtYieldAlice[" << i << "]    = " << lowPtYieldAlice[i] <<endl;
+    cout << "   highPtYieldAlice[" << i << "]   = " << highPtYieldAlice[i] <<endl;
+    cout << "yieldAlice[" << i << "]            = " << yieldAlice[i] <<endl;
+    cout << "   statYieldAlice[" << i << "]     = " << statYieldAlice[i] <<endl;
+    cout << "   lowStatYieldAlice[" << i << "]  = " << lowStatYieldAlice[i] <<endl;
+    cout << "   highStatYieldAlice[" << i << "] = " << highStatYieldAlice[i] <<endl;
+    cout << "   relStatYieldAlice[" << i << "]  = " << relStatYieldAlice[i] <<endl;
+    cout << "   systYieldAlice[" << i << "]     = " << systYieldAlice[i] <<endl;
+    cout << "   lowSystYieldAlice[" << i << "]  = " << lowSystYieldAlice[i] <<endl;
+    cout << "   highSystYieldAlice[" << i << "] = " << highSystYieldAlice[i] <<endl;
+    cout << "   relSystYieldAlice[" << i << "]  = " << relSystYieldAlice[i] <<endl;
+    cout << "errYieldAlice[" << i << "]         = " << errYieldAlice[i] <<endl;
+    cout << "   lowErrYieldAlice[" << i << "]   = " << lowErrYieldAlice[i] <<endl;
+    cout << "   highErrYieldAlice[" << i << "]  = " << highErrYieldAlice[i] <<endl;
+    cout << "   relErrYieldAlice[" << i << "]   = " << relErrYieldAlice[i] <<endl;
+    cout << "err2YieldAlice[" << i << "]        = " << err2YieldAlice[i] <<endl;
+    cout << "   lowErr2YieldAlice[" << i << "]  = " << lowErr2YieldAlice[i] <<endl;
+    cout << "   highErr2YieldAlice[" << i << "] = " << highErr2YieldAlice[i] <<endl;
+    cout << "   relErr2YieldAlice[" << i << "]  = " << relErr2YieldAlice[i] <<endl;
+    cout << endl;
+    /*
+    ptYieldAliceFit[i]      = ptYieldAlice[i];
+    YieldYieldAliceFit[i]     = YieldYieldAlice[i]*ptYieldAlice[i];
+    errYieldYieldAliceFit[i]  = errYieldYieldAlice[i];
+    widthPtYieldAliceFit[i] = widthPtYieldAlice[i];
+    errPtYieldAliceFit[i]  = 0; //errPtYieldAlice[i];
+    lowPtYieldAliceFit[i]  = lowPtYieldAlice[i];
+    highPtYieldAliceFit[i] = highPtYieldAlice[i];
+    */
+        
+   i++;
+} // while(!fileYieldAlice.eof())
+fileYieldAlice.close();
+//if (fileYieldAlice) { delete fileYieldAlice; }
+//fileYieldAlice=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading ALICE INVARIANT YIELD data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readAtlas.C b/PWG0/dNdPt/macros/plots/readAtlas.C
new file mode 100644 (file)
index 0000000..d01fd6b
--- /dev/null
@@ -0,0 +1,88 @@
+Int_t readAtlas() 
+{
+// read ATLAS NSD data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read ATLAS NSD data from file" <<endl;
+cout << "Number of bins: " << binsAtlas <<endl;
+cout << "Filename:       " << filenameAtlas <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileNsdAtlas;
+fileNsdAtlas.open(filenameAtlas);
+
+Int_t i = 0;
+while(!fileNsdAtlas.eof()) {
+    if(i == binsAtlas) break;
+    // textfile content: pt:pt_low:pt_high:NSD_yield:stat_error:syst_error
+    fileNsdAtlas >> ptAtlas[i] >> lowPtAtlas[i] >> highPtAtlas[i] >> nsdAtlas[i] >> statNsdAtlas[i] >> systNsdAtlas[i];
+    
+    centerPtAtlas[i]    = (highPtAtlas[i] + lowPtAtlas[i]) / 2.0;
+    widthPtAtlas[i]     = highPtAtlas[i] - lowPtAtlas[i];
+    errPtAtlas[i]       = widthPtAtlas[i] / 2.0;
+    lowErrPtAtlas[i] = ptAtlas[i] - lowPtAtlas[i];
+    highErrPtAtlas[i] = highPtAtlas[i] - ptAtlas[i];
+            
+    lowStatNsdAtlas[i]  = nsdAtlas[i] - statNsdAtlas[i];
+    highStatNsdAtlas[i] = nsdAtlas[i] + statNsdAtlas[i];
+    relStatNsdAtlas[i]  = statNsdAtlas[i] / nsdAtlas[i];    
+    lowSystNsdAtlas[i]  = nsdAtlas[i] - systNsdAtlas[i];
+    highSystNsdAtlas[i] = nsdAtlas[i] + systNsdAtlas[i];
+    relSystNsdAtlas[i]  = systNsdAtlas[i] / nsdAtlas[i];    
+    errNsdAtlas[i]      = systNsdAtlas[i] + statNsdAtlas[i];
+    lowErrNsdAtlas[i]   = nsdAtlas[i] - errNsdAtlas[i];
+    highErrNsdAtlas[i]  = nsdAtlas[i] + errNsdAtlas[i];
+    relErrNsdAtlas[i]   = errNsdAtlas[i] / nsdAtlas[i];
+    err2NsdAtlas[i]     = sqrt(systNsdAtlas[i]*systNsdAtlas[i] + statNsdAtlas[i]*statNsdAtlas[i]);
+    lowErr2NsdAtlas[i]  = nsdAtlas[i] - err2NsdAtlas[i];
+    highErr2NsdAtlas[i] = nsdAtlas[i] + errNsdAtlas[i];
+    relErr2NsdAtlas[i]  = err2NsdAtlas[i] / nsdAtlas[i];
+        
+    cout << "ptAtlas[" << i << "]             = " << ptAtlas[i] <<endl;
+    cout << "   centerPtAtlas[" << i << "]    = " << centerPtAtlas[i] <<endl;
+    cout << "   widthPtAtlas[" << i << "]     = " << widthPtAtlas[i] <<endl;
+    cout << "   errPtAtlas[" << i << "]       = " << errPtAtlas[i] <<endl;
+    cout << "   lowErrPtAtlas[" << i << "]    = " << lowErrPtAtlas[i] <<endl;
+    cout << "   highErrPtAtlas[" << i << "]   = " << highErrPtAtlas[i] <<endl;
+    cout << "   lowPtAtlas[" << i << "]       = " << lowPtAtlas[i] <<endl;
+    cout << "   highPtAtlas[" << i << "]      = " << highPtAtlas[i] <<endl;
+    cout << "nsdAtlas[" << i << "]            = " << nsdAtlas[i] <<endl;
+    cout << "   statNsdAtlas[" << i << "]     = " << statNsdAtlas[i] <<endl;
+    cout << "   lowStatNsdAtlas[" << i << "]  = " << lowStatNsdAtlas[i] <<endl;
+    cout << "   highStatNsdAtlas[" << i << "] = " << highStatNsdAtlas[i] <<endl;
+    cout << "   relStatNsdAtlas[" << i << "]  = " << relStatNsdAtlas[i] <<endl;
+    cout << "   systNsdAtlas[" << i << "]     = " << systNsdAtlas[i] <<endl;
+    cout << "   lowSystNsdAtlas[" << i << "]  = " << lowSystNsdAtlas[i] <<endl;
+    cout << "   highSystNsdAtlas[" << i << "] = " << highSystNsdAtlas[i] <<endl;
+    cout << "   relSystNsdAtlas[" << i << "]  = " << relSystNsdAtlas[i] <<endl;
+    cout << "errNsdAtlas[" << i << "]         = " << errNsdAtlas[i] <<endl;
+    cout << "   lowErrNsdAtlas[" << i << "]   = " << lowErrNsdAtlas[i] <<endl;
+    cout << "   highErrNsdAtlas[" << i << "]  = " << highErrNsdAtlas[i] <<endl;
+    cout << "   relErrNsdAtlas[" << i << "]   = " << relErrNsdAtlas[i] <<endl;
+    cout << "err2NsdAtlas[" << i << "]        = " << err2NsdAtlas[i] <<endl;
+    cout << "   lowErr2NsdAtlas[" << i << "]  = " << lowErr2NsdAtlas[i] <<endl;
+    cout << "   highErr2NsdAtlas[" << i << "] = " << highErr2NsdAtlas[i] <<endl;
+    cout << "   relErr2NsdAtlas[" << i << "]  = " << relErr2NsdAtlas[i] <<endl;
+    cout << endl;
+     
+   i++;
+} // while(!fileNsdAtlas.eof())
+fileNsdAtlas.close();
+//if (fileNsdAtlas) { delete fileNsdAtlas; }
+//fileNsdAtlas=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading ATLAS NSD data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readCms.C b/PWG0/dNdPt/macros/plots/readCms.C
new file mode 100644 (file)
index 0000000..f8fa3b2
--- /dev/null
@@ -0,0 +1,93 @@
+Int_t readCms() 
+{
+// read CMS NSD data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read CMS NSD data from file" <<endl;
+cout << "Number of bins: " << binsCms <<endl;
+cout << "Filename:       " << filenameCms <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileNsdCms;
+fileNsdCms.open(filenameCms);
+
+Int_t i = 0;
+while(!fileNsdCms.eof()) {
+    if(i == binsCms) break;
+    // textfile content: pt:NSD_yield:(stat + syst error added linerarly)
+    fileNsdCms >> centerPtCms[i] >> nsdCms[i] >> errNsdCms[i];
+    
+    ptCms[i]          = centerPtCms[i];
+    
+    // the width of the pt bins, currently hardwired....
+    widthPtCms[i] = 0.1;
+    if (centerPtCms[i] > 1) widthPtCms[i] = 0.2;
+    
+    errPtCms[i]       = widthPtCms[i] / 2.0;              
+    lowPtCms[i]       = centerPtCms[i] - errPtCms[i];
+    highPtCms[i]      = centerPtCms[i] + errPtCms[i];
+    
+    /*
+    lowStatNsdCms[i]  = nsdCms[i] - statNsdCms[i];
+    highStatNsdCms[i] = nsdCms[i] + statNsdCms[i];
+    relStatNsdCms[i]  = statNsdCms[i] / nsdCms[i];    
+    lowSystNsdCms[i]  = nsdCms[i] - systNsdCms[i];
+    highSystNsdCms[i] = nsdCms[i] + systNsdCms[i];
+    relSystNsdCms[i]  = systNsdCms[i] / nsdCms[i];    
+    */    
+    lowErrNsdCms[i]   = nsdCms[i] - errNsdCms[i];
+    highErrNsdCms[i]  = nsdCms[i] + errNsdCms[i];
+    relErrNsdCms[i]   = errNsdCms[i] / nsdCms[i];
+    err2NsdCms[i]     = errNsdCms[i];
+    lowErr2NsdCms[i]  = lowErrNsdCms[i];
+    highErr2NsdCms[i] = highErrNsdCms[i];
+    relErr2NsdCms[i]  = relErrNsdCms[i];
+        
+    cout << "ptCms[" << i << "]             = " << ptCms[i] <<endl;
+    cout << "   centerPtCms[" << i << "]    = " << centerPtCms[i] <<endl;
+    cout << "   widthPtCms[" << i << "]     = " << widthPtCms[i] <<endl;
+    cout << "   errPtCms[" << i << "]       = " << errPtCms[i] <<endl;
+    cout << "   lowPtCms[" << i << "]       = " << lowPtCms[i] <<endl;
+    cout << "   highPtCms[" << i << "]      = " << highPtCms[i] <<endl;
+    cout << "nsdCms[" << i << "]            = " << nsdCms[i] <<endl;
+    /*
+    cout << "   statNsdCms[" << i << "]     = " << statNsdCms[i] <<endl;
+    cout << "   lowStatNsdCms[" << i << "]  = " << lowStatNsdCms[i] <<endl;
+    cout << "   highStatNsdCms[" << i << "] = " << highStatNsdCms[i] <<endl;
+    cout << "   relStatNsdCms[" << i << "]  = " << relStatNsdCms[i] <<endl;
+    cout << "   systNsdCms[" << i << "]     = " << systNsdCms[i] <<endl;
+    cout << "   lowSystNsdCms[" << i << "]  = " << lowSystNsdCms[i] <<endl;
+    cout << "   highSystNsdCms[" << i << "] = " << highSystNsdCms[i] <<endl;
+    cout << "   relSystNsdCms[" << i << "]  = " << relSystNsdCms[i] <<endl;
+    */
+    cout << "errNsdCms[" << i << "]         = " << errNsdCms[i] <<endl;
+    cout << "   lowErrNsdCms[" << i << "]   = " << lowErrNsdCms[i] <<endl;
+    cout << "   highErrNsdCms[" << i << "]  = " << highErrNsdCms[i] <<endl;
+    cout << "   relErrNsdCms[" << i << "]   = " << relErrNsdCms[i] <<endl;
+    cout << "err2NsdCms[" << i << "]        = " << err2NsdCms[i] <<endl;
+    cout << "   lowErr2NsdCms[" << i << "]  = " << lowErr2NsdCms[i] <<endl;
+    cout << "   highErr2NsdCms[" << i << "] = " << highErr2NsdCms[i] <<endl;
+    cout << "   relErr2NsdCms[" << i << "]  = " << relErr2NsdCms[i] <<endl;
+    cout << endl;
+     
+   i++;
+} // while(!fileNsdCms.eof())
+fileNsdCms.close();
+//if (fileNsdCms) { delete fileNsdCms; }
+//fileNsdCms=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading CMS NSD data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readPhojet.C b/PWG0/dNdPt/macros/plots/readPhojet.C
new file mode 100644 (file)
index 0000000..f60cfc1
--- /dev/null
@@ -0,0 +1,75 @@
+Int_t readPhojet() 
+{
+// read PHOJET INEL data from file
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read PHOJET INEL data from file" <<endl;
+cout << "Number of bins: " << binsPhojet <<endl;
+cout << "Filename:       " << filenamePhojet <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+TFile* filePhojet = new TFile(filenamePhojet,"OPEN");
+Double_t nEventsPhojet = ((TH1F*)filePhojet->Get("eventsINEL"))->GetBinContent(1);
+
+TH1F* histPhojet = (TH1F*)filePhojet->Get("ptINEL");
+
+int bins = 0;
+for (int i=0; i < histPhojet->GetNbinsX(); i++) {
+    if (histPhojet->GetBinContent(i) > 0 ) {
+        centerPtPhojet[bins]    = histPhojet->GetBinCenter(i);
+        ptPhojet[bins]          = centerPtPhojet[bins];
+        widthPtPhojet[bins]     = histPhojet->GetBinWidth(i);        
+        errPtPhojet[bins]       = widthPtPhojet[bins] / 2.0;
+        lowPtPhojet[bins]       = centerPtPhojet[bins] - errPtPhojet[bins];
+        highPtPhojet[bins]      = centerPtPhojet[bins] + errPtPhojet[bins];
+        
+        inelPhojet[bins]        = histPhojet->GetBinContent(i) / (nEventsPhojet * etaRange * 2 * M_PI * ptPhojet[bins]);
+        errInelPhojet[bins]     = histPhojet->GetBinError(i) / (nEventsPhojet * etaRange * 2 * M_PI * ptPhojet[bins]);
+        lowErrInelPhojet[bins]  = inelPhojet[bins] - errInelPhojet[bins];
+        highErrInelPhojet[bins] = inelPhojet[bins] + errInelPhojet[bins];
+        relErrInelPhojet[bins]  = errInelPhojet[bins] / inelPhojet[bins];
+     
+        centerPt2PiPtPhojet[bins]    = histPhojet->GetBinCenter(i);
+        pt2PiPtPhojet[bins]          = centerPt2PiPtPhojet[bins];
+        widthPt2PiPtPhojet[bins]     = histPhojet->GetBinWidth(i);        
+        errPt2PiPtPhojet[bins]       = widthPt2PiPtPhojet[bins] / 2.0;
+        lowPt2PiPtPhojet[bins]       = centerPt2PiPtPhojet[bins] - errPt2PiPtPhojet[bins];
+        highPt2PiPtPhojet[bins]      = centerPt2PiPtPhojet[bins] + errPt2PiPtPhojet[bins];        
+        inel2PiPtPhojet[bins]        = histPhojet->GetBinContent(i) / (nEventsPhojet * etaRange);
+        errInel2PiPtPhojet[bins]     = histPhojet->GetBinError(i) / (nEventsPhojet * etaRange);
+        lowErrInel2PiPtPhojet[bins]  = inel2PiPtPhojet[bins] - errInel2PiPtPhojet[bins];
+        highErrInel2PiPtPhojet[bins] = inel2PiPtPhojet[bins] + errInel2PiPtPhojet[bins];
+        relErrInel2PiPtPhojet[bins]  = errInel2PiPtPhojet[bins] / inel2PiPtPhojet[bins];
+        
+        cout << "ptPhojet[" << bins << "]              = " << ptPhojet[bins] <<endl;
+        cout << "   centerPtPhojet[" << bins << "]     = " << centerPtPhojet[bins] <<endl;
+        cout << "   widthPtPhojet[" << bins << "]      = " << widthPtPhojet[bins] <<endl;
+        cout << "   errPtPhojet[" << bins << "]        = " << errPtPhojet[bins] <<endl;
+        cout << "   lowPtPhojet[" << bins << "]        = " << lowPtPhojet[bins] <<endl;
+        cout << "   highPtPhojet[" << bins << "]       = " << highPtPhojet[bins] <<endl;
+        cout << "inelPhojet[" << bins << "]            = " << inelPhojet[bins] <<endl;        
+        cout << "errInelPhojet[" << bins << "]         = " << errInelPhojet[bins] <<endl;
+        cout << "   lowErrInelPhojet[" << bins << "]   = " << lowErrInelPhojet[bins] <<endl;
+        cout << "   highErrInelPhojet[" << bins << "]  = " << highErrInelPhojet[bins] <<endl;
+        cout << "   relErrInelPhojet[" << bins << "]   = " << relErrInelPhojet[bins] <<endl;
+        cout << endl;
+        bins++;
+    }
+}
+
+filePhojet->Close();
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading PHOJET INEL data" <<endl;
+cout << "Number of bins read: " << bins <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return bins;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readPythia109.C b/PWG0/dNdPt/macros/plots/readPythia109.C
new file mode 100644 (file)
index 0000000..859a005
--- /dev/null
@@ -0,0 +1,79 @@
+Int_t readPythia109() 
+{
+// read PYTHIA 109 INEL data from file
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read PHYTIA 109 INEL data from file" <<endl;
+cout << "Number of bins: " << binsPythia109 <<endl;
+cout << "Filename:       " << filenamePythia109 <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+TFile* filePythia109 = new TFile(filenamePythia109,"OPEN");
+nEventsPythia109 = ((TH1F*)filePythia109->Get("eventsINEL"))->GetBinContent(1);
+
+TH1F* histPythia109 = (TH1F*)filePythia109->Get("ptINEL");
+
+int bins = 0;
+for (int i=0; i < histPythia109->GetNbinsX(); i++) {
+    if (histPythia109->GetBinContent(i) > 0 ) {
+        centerPtPythia109[bins]    = histPythia109->GetBinCenter(i);
+        ptPythia109[bins]          = centerPtPythia109[bins];
+        widthPtPythia109[bins]     = histPythia109->GetBinWidth(i);        
+        errPtPythia109[bins]       = widthPtPythia109[bins] / 2.0;
+        lowPtPythia109[bins]       = centerPtPythia109[bins] - errPtPythia109[bins];
+        highPtPythia109[bins]      = centerPtPythia109[bins] + errPtPythia109[bins];
+        
+        inelPythia109[bins]        = histPythia109->GetBinContent(i) / (nEventsPythia109 * etaRange * 2 * M_PI * ptPythia109[bins]);
+        errInelPythia109[bins]     = histPythia109->GetBinError(i) / (nEventsPythia109 * etaRange * 2 * M_PI * ptPythia109[bins]);
+        lowErrInelPythia109[bins]  = inelPythia109[bins] - errInelPythia109[bins];
+        highErrInelPythia109[bins] = inelPythia109[bins] + errInelPythia109[bins];
+        relErrInelPythia109[bins]  = errInelPythia109[bins] / inelPythia109[bins];
+        
+        
+        
+        centerPt2PiPtPythia109[bins]    = histPythia109->GetBinCenter(i);
+        pt2PiPtPythia109[bins]          = centerPt2PiPtPythia109[bins];
+        widthPt2PiPtPythia109[bins]     = histPythia109->GetBinWidth(i);        
+        errPt2PiPtPythia109[bins]       = widthPt2PiPtPythia109[bins] / 2.0;
+        lowPt2PiPtPythia109[bins]       = centerPt2PiPtPythia109[bins] - errPt2PiPtPythia109[bins];
+        highPt2PiPtPythia109[bins]      = centerPt2PiPtPythia109[bins] + errPt2PiPtPythia109[bins];        
+        inel2PiPtPythia109[bins]        = histPythia109->GetBinContent(i) / (nEventsPythia109 * etaRange);
+        errInel2PiPtPythia109[bins]     = histPythia109->GetBinError(i) / (nEventsPythia109 * etaRange);
+        lowErrInel2PiPtPythia109[bins]  = inel2PiPtPythia109[bins] - errInel2PiPtPythia109[bins];
+        highErrInel2PiPtPythia109[bins] = inel2PiPtPythia109[bins] + errInel2PiPtPythia109[bins];
+        relErrInel2PiPtPythia109[bins]  = errInel2PiPtPythia109[bins] / inel2PiPtPythia109[bins];         
+        
+        
+        
+        cout << "ptPythia109[" << bins << "]              = " << ptPythia109[bins] <<endl;
+        cout << "   centerPtPythia109[" << bins << "]     = " << centerPtPythia109[bins] <<endl;
+        cout << "   widthPtPythia109[" << bins << "]      = " << widthPtPythia109[bins] <<endl;
+        cout << "   errPtPythia109[" << bins << "]        = " << errPtPythia109[bins] <<endl;
+        cout << "   lowPtPythia109[" << bins << "]        = " << lowPtPythia109[bins] <<endl;
+        cout << "   highPtPythia109[" << bins << "]       = " << highPtPythia109[bins] <<endl;
+        cout << "inelPythia109[" << bins << "]            = " << inelPythia109[bins] <<endl;        
+        cout << "errInelPythia109[" << bins << "]         = " << errInelPythia109[bins] <<endl;
+        cout << "   lowErrInelPythia109[" << bins << "]   = " << lowErrInelPythia109[bins] <<endl;
+        cout << "   highErrInelPythia109[" << bins << "]  = " << highErrInelPythia109[bins] <<endl;
+        cout << "   relErrInelPythia109[" << bins << "]   = " << relErrInelPythia109[bins] <<endl;
+        cout << endl;
+        bins++;
+    }
+}
+
+filePythia109->Close();
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading PYTHIA 109 INEL data" <<endl;
+cout << "Number of bins read: " << bins <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return bins;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readPythia306.C b/PWG0/dNdPt/macros/plots/readPythia306.C
new file mode 100644 (file)
index 0000000..3c4440a
--- /dev/null
@@ -0,0 +1,86 @@
+Int_t readPythia306() 
+{
+// read PYTHIA 306 INEL data from file
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read PHYTIA 306 INEL data from file" <<endl;
+cout << "Number of bins: " << binsPythia306 <<endl;
+cout << "Filename:       " << filenamePythia306 <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+TFile* filePythia306 = new TFile(filenamePythia306,"OPEN");
+nEventsPythia306 = ((TH1F*)filePythia306->Get("eventsINEL"))->GetBinContent(1);
+
+TH1F* histPythia306 = (TH1F*)filePythia306->Get("ptINEL");
+
+int bins = 0;
+for (int i=0; i < histPythia306->GetNbinsX(); i++) {
+    if (histPythia306->GetBinContent(i) > 0 ) {
+        centerPtPythia306[bins]    = histPythia306->GetBinCenter(i);
+        ptPythia306[bins]          = centerPtPythia306[bins];
+        widthPtPythia306[bins]     = histPythia306->GetBinWidth(i);        
+        errPtPythia306[bins]       = widthPtPythia306[bins] / 2.0;
+        lowPtPythia306[bins]       = centerPtPythia306[bins] - errPtPythia306[bins];
+        highPtPythia306[bins]      = centerPtPythia306[bins] + errPtPythia306[bins];
+        
+        inelPythia306[bins]        = histPythia306->GetBinContent(i) / (nEventsPythia306 * etaRange * 2 * M_PI * ptPythia306[bins]);
+        errInelPythia306[bins]     = histPythia306->GetBinError(i) / (nEventsPythia306 * etaRange * 2 * M_PI * ptPythia306[bins]);
+        lowErrInelPythia306[bins]  = inelPythia306[bins] - errInelPythia306[bins];
+        highErrInelPythia306[bins] = inelPythia306[bins] + errInelPythia306[bins];
+        relErrInelPythia306[bins]  = errInelPythia306[bins] / inelPythia306[bins];
+        
+        
+        
+        
+        
+        centerPt2PiPtPythia306[bins]    = histPythia306->GetBinCenter(i);
+        pt2PiPtPythia306[bins]          = centerPt2PiPtPythia306[bins];
+        widthPt2PiPtPythia306[bins]     = histPythia306->GetBinWidth(i);        
+        errPt2PiPtPythia306[bins]       = widthPt2PiPtPythia306[bins] / 2.0;
+        lowPt2PiPtPythia306[bins]       = centerPt2PiPtPythia306[bins] - errPt2PiPtPythia306[bins];
+        highPt2PiPtPythia306[bins]      = centerPt2PiPtPythia306[bins] + errPt2PiPtPythia306[bins];        
+        inel2PiPtPythia306[bins]        = histPythia306->GetBinContent(i) / (nEventsPythia306 * etaRange);
+        errInel2PiPtPythia306[bins]     = histPythia306->GetBinError(i) / (nEventsPythia306 * etaRange);
+        lowErrInel2PiPtPythia306[bins]  = inel2PiPtPythia306[bins] - errInel2PiPtPythia306[bins];
+        highErrInel2PiPtPythia306[bins] = inel2PiPtPythia306[bins] + errInel2PiPtPythia306[bins];
+        relErrInel2PiPtPythia306[bins]  = errInel2PiPtPythia306[bins] / inel2PiPtPythia306[bins];         
+        
+        
+        
+        
+        
+        
+        
+        
+        cout << "ptPythia306[" << bins << "]              = " << ptPythia306[bins] <<endl;
+        cout << "   centerPtPythia306[" << bins << "]     = " << centerPtPythia306[bins] <<endl;
+        cout << "   widthPtPythia306[" << bins << "]      = " << widthPtPythia306[bins] <<endl;
+        cout << "   errPtPythia306[" << bins << "]        = " << errPtPythia306[bins] <<endl;
+        cout << "   lowPtPythia306[" << bins << "]        = " << lowPtPythia306[bins] <<endl;
+        cout << "   highPtPythia306[" << bins << "]       = " << highPtPythia306[bins] <<endl;
+        cout << "inelPythia306[" << bins << "]            = " << inelPythia306[bins] <<endl;        
+        cout << "errInelPythia306[" << bins << "]         = " << errInelPythia306[bins] <<endl;
+        cout << "   lowErrInelPythia306[" << bins << "]   = " << lowErrInelPythia306[bins] <<endl;
+        cout << "   highErrInelPythia306[" << bins << "]  = " << highErrInelPythia306[bins] <<endl;
+        cout << "   relErrInelPythia306[" << bins << "]   = " << relErrInelPythia306[bins] <<endl;
+        cout << endl;
+        bins++;
+    }
+}
+
+filePythia306->Close();
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading PYTHIA 306 INEL data" <<endl;
+cout << "Number of bins read: " << bins <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return bins;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readPythia320.C b/PWG0/dNdPt/macros/plots/readPythia320.C
new file mode 100644 (file)
index 0000000..2aef5c7
--- /dev/null
@@ -0,0 +1,85 @@
+Int_t readPythia320() 
+{
+// read PYTHIA 320 INEL data from file
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read PHYTIA 320 INEL data from file" <<endl;
+cout << "Number of bins: " << binsPythia320 <<endl;
+cout << "Filename:       " << filenamePythia320 <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+TFile* filePythia320 = new TFile(filenamePythia320,"OPEN");
+nEventsPythia320 = ((TH1F*)filePythia320->Get("eventsINEL"))->GetBinContent(1);
+
+TH1F* histPythia320 = (TH1F*)filePythia320->Get("ptINEL");
+
+int bins = 0;
+for (int i=0; i < histPythia320->GetNbinsX(); i++) {
+    if (histPythia320->GetBinContent(i) > 0 ) {
+        centerPtPythia320[bins]    = histPythia320->GetBinCenter(i);
+        ptPythia320[bins]          = centerPtPythia320[bins];
+        widthPtPythia320[bins]     = histPythia320->GetBinWidth(i);        
+        errPtPythia320[bins]       = widthPtPythia320[bins] / 2.0;
+        lowPtPythia320[bins]       = centerPtPythia320[bins] - errPtPythia320[bins];
+        highPtPythia320[bins]      = centerPtPythia320[bins] + errPtPythia320[bins];
+        
+        inelPythia320[bins]        = histPythia320->GetBinContent(i) / (nEventsPythia320 * etaRange * 2 * M_PI * ptPythia320[bins]);
+        errInelPythia320[bins]     = histPythia320->GetBinError(i) / (nEventsPythia320 * etaRange * 2 * M_PI * ptPythia320[bins]);
+        lowErrInelPythia320[bins]  = inelPythia320[bins] - errInelPythia320[bins];
+        highErrInelPythia320[bins] = inelPythia320[bins] + errInelPythia320[bins];
+        relErrInelPythia320[bins]  = errInelPythia320[bins] / inelPythia320[bins];
+        
+        
+        
+        
+        
+        
+        centerPt2PiPtPythia320[bins]    = histPythia320->GetBinCenter(i);
+        pt2PiPtPythia320[bins]          = centerPt2PiPtPythia320[bins];
+        widthPt2PiPtPythia320[bins]     = histPythia320->GetBinWidth(i);        
+        errPt2PiPtPythia320[bins]       = widthPt2PiPtPythia320[bins] / 2.0;
+        lowPt2PiPtPythia320[bins]       = centerPt2PiPtPythia320[bins] - errPt2PiPtPythia320[bins];
+        highPt2PiPtPythia320[bins]      = centerPt2PiPtPythia320[bins] + errPt2PiPtPythia320[bins];        
+        inel2PiPtPythia320[bins]        = histPythia320->GetBinContent(i) / (nEventsPythia320 * etaRange);
+        errInel2PiPtPythia320[bins]     = histPythia320->GetBinError(i) / (nEventsPythia320 * etaRange);
+        lowErrInel2PiPtPythia320[bins]  = inel2PiPtPythia320[bins] - errInel2PiPtPythia320[bins];
+        highErrInel2PiPtPythia320[bins] = inel2PiPtPythia320[bins] + errInel2PiPtPythia320[bins];
+        relErrInel2PiPtPythia320[bins]  = errInel2PiPtPythia320[bins] / inel2PiPtPythia320[bins];         
+        
+        
+        
+        
+        
+        
+        cout << "ptPythia320[" << bins << "]              = " << ptPythia320[bins] <<endl;
+        cout << "   centerPtPythia320[" << bins << "]     = " << centerPtPythia320[bins] <<endl;
+        cout << "   widthPtPythia320[" << bins << "]      = " << widthPtPythia320[bins] <<endl;
+        cout << "   errPtPythia320[" << bins << "]        = " << errPtPythia320[bins] <<endl;
+        cout << "   lowPtPythia320[" << bins << "]        = " << lowPtPythia320[bins] <<endl;
+        cout << "   highPtPythia320[" << bins << "]       = " << highPtPythia320[bins] <<endl;
+        cout << "inelPythia320[" << bins << "]            = " << inelPythia320[bins] <<endl;        
+        cout << "errInelPythia320[" << bins << "]         = " << errInelPythia320[bins] <<endl;
+        cout << "   lowErrInelPythia320[" << bins << "]   = " << lowErrInelPythia320[bins] <<endl;
+        cout << "   highErrInelPythia320[" << bins << "]  = " << highErrInelPythia320[bins] <<endl;
+        cout << "   relErrInelPythia320[" << bins << "]   = " << relErrInelPythia320[bins] <<endl;
+        cout << endl;
+        bins++;
+    }
+}
+
+filePythia320->Close();
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading PYTHIA 320 INEL data" <<endl;
+cout << "Number of bins read: " << bins <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return bins;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/readUa1.C b/PWG0/dNdPt/macros/plots/readUa1.C
new file mode 100644 (file)
index 0000000..3081f86
--- /dev/null
@@ -0,0 +1,134 @@
+Int_t readUa1() 
+{
+// read UA1 data from file
+//
+
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+cout << "read UA1 YIELD data from file" <<endl;
+cout << "Number of bins: " << binsUa1 <<endl;
+cout << "Filename:       " << filenameUa1 <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+ifstream fileCrossUa1;
+fileCrossUa1.open(filenameUa1);
+
+Int_t i = 0;
+while(!fileCrossUa1.eof()) {
+    if(i == binsUa1) break;
+    // textfile content: pt:cross_yield:(stat + syst error added linerarly)
+    fileCrossUa1 >> centerPtUa1[i] >> crossUa1[i] >> errCrossUa1[i];
+    
+    ptUa1[i]          = centerPtUa1[i];
+    
+    // the width of the pt bins, currently hardwired....
+    widthPtUa1[i] = 0.1;
+    if (centerPtUa1[i] > 4) widthPtUa1[i] = 0.2;
+    if (centerPtUa1[i] > 6) widthPtUa1[i] = 1.0;
+    
+    errPtUa1[i]       = widthPtUa1[i] / 2.0;              
+    lowPtUa1[i]       = centerPtUa1[i] - errPtUa1[i];
+    highPtUa1[i]      = centerPtUa1[i] + errPtUa1[i];
+    
+    /*
+    lowStatCrossUa1[i]  = crossUa1[i] - statCrossUa1[i];
+    highStatCrossUa1[i] = crossUa1[i] + statCrossUa1[i];
+    relStatCrossUa1[i]  = statCrossUa1[i] / crossUa1[i];    
+    lowSystCrossUa1[i]  = crossUa1[i] - systCrossUa1[i];
+    highSystCrossUa1[i] = crossUa1[i] + systCrossUa1[i];
+    relSystCrossUa1[i]  = systCrossUa1[i] / crossUa1[i];    
+    */    
+    lowErrCrossUa1[i]   = crossUa1[i] - errCrossUa1[i];
+    highErrCrossUa1[i]  = crossUa1[i] + errCrossUa1[i];
+    relErrCrossUa1[i]   = errCrossUa1[i] / crossUa1[i];
+    err2CrossUa1[i]     = errCrossUa1[i];
+    lowErr2CrossUa1[i]  = lowErrCrossUa1[i];
+    highErr2CrossUa1[i] = highErrCrossUa1[i];
+    relErr2CrossUa1[i]  = relErrCrossUa1[i];
+    
+    yieldUa1[i]         = crossUa1[i] * (avgToHadr / sigmaInelUa1);
+    /*
+    statYieldUa1[i]     = 
+    lowStatYieldUa1[i]  = 
+    highStatYieldUa1[i] = 
+    relStatYieldUa1[i]  = 
+    systYieldUa1[i]     = 
+    lowSystYieldUa1[i]  = 
+    highSystYieldUa1[i] = 
+    relSystYieldUa1[i]  = 
+    */
+    errYieldUa1[i]      = errCrossUa1[i] * (avgToHadr / sigmaInelUa1);
+    lowErrYieldUa1[i]   = yieldUa1[i] - errYieldUa1[i];
+    highErrYieldUa1[i]  = yieldUa1[i] + errYieldUa1[i];
+    relErrYieldUa1[i]   = errYieldUa1[i] / yieldUa1[i];
+    err2YieldUa1[i]     = errYieldUa1[i];
+    lowErr2YieldUa1[i]  = lowErrYieldUa1[i];
+    highErr2YieldUa1[i] = highErrYieldUa1[i];
+    relErr2YieldUa1[i]  = relErrYieldUa1[i];
+        
+    cout << "ptUa1[" << i << "]               = " << ptUa1[i] <<endl;
+    cout << "   centerPtUa1[" << i << "]      = " << centerPtUa1[i] <<endl;
+    cout << "   widthPtUa1[" << i << "]       = " << widthPtUa1[i] <<endl;
+    cout << "   errPtUa1[" << i << "]         = " << errPtUa1[i] <<endl;
+    cout << "   lowPtUa1[" << i << "]         = " << lowPtUa1[i] <<endl;
+    cout << "   highPtUa1[" << i << "]        = " << highPtUa1[i] <<endl;
+    cout << "crossUa1[" << i << "]            = " << crossUa1[i] <<endl;
+    /*
+    cout << "   statCrossUa1[" << i << "]     = " << statCrossUa1[i] <<endl;
+    cout << "   lowStatCrossUa1[" << i << "]  = " << lowStatCrossUa1[i] <<endl;
+    cout << "   highStatCrossUa1[" << i << "] = " << highStatCrossUa1[i] <<endl;
+    cout << "   relStatCrossUa1[" << i << "]  = " << relStatCrossUa1[i] <<endl;
+    cout << "   systCrossUa1[" << i << "]     = " << systCrossUa1[i] <<endl;
+    cout << "   lowSystCrossUa1[" << i << "]  = " << lowSystCrossUa1[i] <<endl;
+    cout << "   highSystCrossUa1[" << i << "] = " << highSystCrossUa1[i] <<endl;
+    cout << "   relSystCrossUa1[" << i << "]  = " << relSystCrossUa1[i] <<endl;
+    */
+    cout << "errCrossUa1[" << i << "]         = " << errCrossUa1[i] <<endl;
+    cout << "   lowErrCrossUa1[" << i << "]   = " << lowErrCrossUa1[i] <<endl;
+    cout << "   highErrCrossUa1[" << i << "]  = " << highErrCrossUa1[i] <<endl;
+    cout << "   relErrCrossUa1[" << i << "]   = " << relErrCrossUa1[i] <<endl;
+    cout << "err2CrossUa1[" << i << "]        = " << err2CrossUa1[i] <<endl;
+    cout << "   lowErr2CrossUa1[" << i << "]  = " << lowErr2CrossUa1[i] <<endl;
+    cout << "   highErr2CrossUa1[" << i << "] = " << highErr2CrossUa1[i] <<endl;
+    cout << "   relErr2CrossUa1[" << i << "]  = " << relErr2CrossUa1[i] <<endl;
+
+    cout << "yieldUa1[" << i << "]            = " << yieldUa1[i] <<endl;
+    /*
+    cout << "   statYieldUa1[" << i << "]     = " << statYieldUa1[i] <<endl;
+    cout << "   lowStatYieldUa1[" << i << "]  = " << lowStatYieldUa1[i] <<endl;
+    cout << "   highStatYieldUa1[" << i << "] = " << highStatYieldUa1[i] <<endl;
+    cout << "   relStatYieldUa1[" << i << "]  = " << relStatYieldUa1[i] <<endl;
+    cout << "   systYieldUa1[" << i << "]     = " << systYieldUa1[i] <<endl;
+    cout << "   lowSystYieldUa1[" << i << "]  = " << lowSystYieldUa1[i] <<endl;
+    cout << "   highSystYieldUa1[" << i << "] = " << highSystYieldUa1[i] <<endl;
+    cout << "   relSystYieldUa1[" << i << "]  = " << relSystYieldUa1[i] <<endl;
+    */
+    cout << "errYieldUa1[" << i << "]         = " << errYieldUa1[i] <<endl;
+    cout << "   lowErrYieldUa1[" << i << "]   = " << lowErrYieldUa1[i] <<endl;
+    cout << "   highErrYieldUa1[" << i << "]  = " << highErrYieldUa1[i] <<endl;
+    cout << "   relErrYieldUa1[" << i << "]   = " << relErrYieldUa1[i] <<endl;
+    cout << "err2YieldUa1[" << i << "]        = " << err2YieldUa1[i] <<endl;
+    cout << "   lowErr2YieldUa1[" << i << "]  = " << lowErr2YieldUa1[i] <<endl;
+    cout << "   highErr2YieldUa1[" << i << "] = " << highErr2YieldUa1[i] <<endl;
+    cout << "   relErr2YieldUa1[" << i << "]  = " << relErr2YieldUa1[i] <<endl;
+    cout << endl;
+     
+   i++;
+} // while(!fileCrossUa1.eof())
+fileCrossUa1.close();
+//if (fileCrossUa1) { delete fileCrossUa1; }
+//fileCrossUa1=0;
+
+cout << "================================" << endl;
+cout << endl;
+cout << "Finished reading UA1 YIELD data" <<endl;
+cout << "Number of bins read: " << i <<endl;
+cout << endl;
+cout << "================================" << endl;
+cout << endl;
+
+return i;
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/runMacro.C b/PWG0/dNdPt/macros/plots/runMacro.C
new file mode 100644 (file)
index 0000000..1eb1865
--- /dev/null
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+// runMacro.C
+//
+// steering macro to create figures for paper 3
+// settings are in settings.C
+//------------------------------------------------------------------------------
+
+
+{
+//
+// Init
+//
+using namespace std;
+gROOT->Reset();
+gROOT->SetStyle("Plain");
+
+//
+// load Settings & define Variables
+//
+gROOT->LoadMacro("settings.C");
+gROOT->LoadMacro("defineVariables.C");
+cout << "---------------------------------------------------------" << endl;
+cout << "using fit function (nsd) " << endl;
+cout << fitNsd->GetExpFormula() << endl;
+cout << "---------------------------------------------------------" << endl;
+
+
+//
+// graphics and plot options
+//
+gStyle->SetTextFont(textFont);
+gStyle->SetTitleFont(titleFont);
+gStyle->SetTitleFont(titleFont,"xy");
+gStyle->SetLabelFont(labelFont,"xyz");
+gStyle->SetLabelSize(labelSize);
+gStyle->SetTitleSize(titleSize);
+gStyle->SetTitleFontSize(titleFontSize);
+gStyle->SetMarkerSize(markerSize);
+gStyle->SetHatchesSpacing(0.8);
+gStyle->SetHatchesLineWidth(2.0);
+
+//
+// load macros
+//
+gROOT->LoadMacro("divide.C");
+gROOT->LoadMacro("setAttrib.C");
+gROOT->LoadMacro("logoPrelim.C");
+
+gROOT->LoadMacro("readAliceNsd.C");
+gROOT->LoadMacro("readAliceInel.C");
+gROOT->LoadMacro("readAliceYield.C");
+gROOT->LoadMacro("readAtlas.C");
+gROOT->LoadMacro("readCms.C");
+gROOT->LoadMacro("readUa1.C");
+gROOT->LoadMacro("readPhojet.C");
+gROOT->LoadMacro("readPythia109.C");
+gROOT->LoadMacro("readPythia306.C");
+gROOT->LoadMacro("readPythia320.C");
+
+gROOT->LoadMacro("makePlotsAlice3.C");
+gROOT->LoadMacro("makeCompNSD.C");
+gROOT->LoadMacro("makeCompYield.C");
+gROOT->LoadMacro("makeCompInel.C");
+
+gROOT->LoadMacro("storeOutput.C");
+
+
+//
+// read data
+//
+readAliceNsd();
+readAliceInel();
+readAliceYield();
+
+readAtlas();
+readCms();
+readUa1();
+readPhojet();
+readPythia109();
+readPythia306();
+readPythia320();
+
+//
+// pt range to plot
+//
+Double_t minPt = 0.1;
+Double_t maxPt = 10;
+
+//
+// generate plots & store output
+//
+makePlotsAlice3(); // figure 2 in paper
+makeCompYield(); // figure 3 (b)
+makeCompInel(); // figure 5
+
+// different pt range for atlas comparison
+maxPt = 20; 
+makeCompNSD(); // figure 3 (a)
+
+storeOutput();
+
+
+}
diff --git a/PWG0/dNdPt/macros/plots/setAttrib.C b/PWG0/dNdPt/macros/plots/setAttrib.C
new file mode 100644 (file)
index 0000000..354e859
--- /dev/null
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+// setAttrib.C
+//
+// helper class to set various attributes for Tgraphs/TPads
+//------------------------------------------------------------------------------
+
+
+
+void setAttrib(TGraph* g) 
+{
+    if (!g) return;
+    if (g->GetXaxis()) {
+        g->GetXaxis()->SetLabelSize(labelSize);
+        g->GetXaxis()->SetTitleSize(titleSize);
+        g->GetXaxis()->SetLabelFont(font);
+        g->GetXaxis()->SetTitleFont(font);
+        g->GetXaxis()->SetTitleOffset(3.8);
+//         g->GetXaxis()->SetLabelOffset(0.02); 
+    }
+
+    if (g->GetYaxis()) {
+        g->GetYaxis()->SetLabelSize(labelSize);
+        g->GetYaxis()->SetTitleSize(titleSize);
+        g->GetYaxis()->SetLabelFont(font);
+        g->GetYaxis()->SetTitleFont(font);
+        g->GetYaxis()->SetTitleOffset(2.2);       
+    }
+}
+
+void setAttrib(TMultiGraph* g) 
+{
+    if (!g) return;
+    if (g->GetXaxis()) {
+        g->GetXaxis()->SetLabelSize(labelSize);
+        g->GetXaxis()->SetTitleSize(titleSize);
+        g->GetXaxis()->SetLabelFont(font);
+        g->GetXaxis()->SetTitleFont(font);
+        g->GetXaxis()->SetTitleOffset(3.8); // was 3.8
+// //         g->GetXaxis()->SetLabelOffset(0.02); 
+    }
+
+    if (g->GetYaxis()) {
+        g->GetYaxis()->SetLabelSize(labelSize);
+        g->GetYaxis()->SetTitleSize(titleSize);
+        g->GetXaxis()->SetLabelFont(font);
+        g->GetYaxis()->SetTitleFont(font);
+        g->GetYaxis()->SetTitleOffset(2.2); // was 2.4
+//         g->GetYaxis()->SetLabelOffset(0.02); 
+    }
+}
+
+void setAttrib(TPad* p) 
+{
+    if (!p) return;
+    if (p->GetYlowNDC() > 0.01 ) {
+        p->SetTopMargin(0.03);
+        p->SetBottomMargin(0.0);
+        p->SetLeftMargin(0.16);
+        p->SetRightMargin(0.03);
+        p->SetTicks(1,1);
+    }
+    if (p->GetYlowNDC() < 0.01 ) {
+        p->SetTopMargin(0.0);
+        p->SetLeftMargin(0.16);
+        p->SetRightMargin(0.03);
+        p->SetBottomMargin(0.28);
+        p->SetTicks(1,1);
+    }
+}
\ No newline at end of file
diff --git a/PWG0/dNdPt/macros/plots/settings.C b/PWG0/dNdPt/macros/plots/settings.C
new file mode 100644 (file)
index 0000000..266ec4b
--- /dev/null
@@ -0,0 +1,131 @@
+//------------------------------------------------------------------------------
+// settings.C
+//
+// setting for all data files and folder
+// plot options are not set exclusively here
+//------------------------------------------------------------------------------
+
+
+//
+// store output plots? (gif+eps) directory?
+//
+Bool_t SAVE_FIGURES = kTRUE;
+// Bool_t SAVE_FIGURES = kFALSE;
+TString outputDir = "/u/jacek/CMS_ALICE_UA1_Michael/figures/";
+
+//
+// draw ALICE logo and/or PRELIMINARY tag?
+//
+Bool_t SHOW_LOGO = kTRUE;
+Bool_t SHOW_PRELIM = kTRUE;
+//Bool_t SHOW_LOGO = kFALSE;
+//Bool_t SHOW_PRELIM = kFALSE;
+
+//
+// graphics and plot options
+//
+Int_t textFont = 43;
+Int_t titleFont = 43;
+Int_t labelFont = 43;
+Int_t font = 43;
+
+Float_t titleFontSize = 24;
+Float_t markerSize = 1.25;
+Float_t legendTextSize = 20;
+Float_t labelSize = 24;
+Float_t titleSize = 24;
+
+Float_t leftMargin = 0.16; 
+
+const Color_t colorAlice = kGray+2;
+const Color_t colorAliceFit = kBlack;
+const Color_t colorPhojet = kMagenta+2;
+const Color_t colorPythia109 = kCyan+3;
+const Color_t colorPythia306 = kRed+2;
+const Color_t colorPythia320 = kBlue+1;
+const Color_t colorAtlas = kBlue+1;
+const Color_t colorCms = kRed+2;
+const Color_t colorAliceErrors = kGray; //kSpring-8;
+const Color_t colorUa1 = kRed+2;
+
+
+//
+// various settings
+//
+
+// limit for shifting pt bins
+const Double_t fit_limit = 1e-14;
+const Double_t fit_limit2 = 1e-14;
+
+
+// ua1 inelastic cross section (mb); used to calculate yield/
+const Double_t sigmaInelUa1 = 43.5;  
+// yields for (h+ + h-)/2
+const Double_t avgToHadr = 2.0; 
+
+// eta range used for model comparison
+// -0.8 < eta < 0.8 
+const Double_t etaRange = 1.6;
+
+// pi
+const Double_t M_PI = 3.1415926535897932384626433832795028841971693993751;
+
+
+//
+// set filenames and number of data points
+//
+
+// compatibility setting
+const Int_t binsAlice = 46;
+
+// ALICE INEL data file (for comparison to models)
+Char_t* filenameInelAlice = "/u/jacek/alice/dNdPt/output/data_points/ALICE_Yield_INEL_900GeV.txt";
+const Int_t binsInelAlice = 46;                 // number of bins (= lines in data textfile)
+
+// ALICE NSD data file (for comparison to ATLAS and CMS)
+Char_t* filenameNsdAlice = "/u/jacek/alice/dNdPt/output/data_points/ALICE_Yield_NSD_900GeV.txt";
+const Int_t binsNsdAlice = 46;                 // number of bins (= lines in data textfile)
+
+// ALICE NSD Invariant Yield data file (for comparison to UA1)
+Char_t* filenameYieldAlice = "/u/jacek/alice/dNdPt/output/data_points/ALICE_InvYield_NSD_900GeV.txt";
+const Int_t binsYieldAlice = 46;                 // number of bins (= lines in data textfile)
+
+// ATLAS NSD data file
+Char_t* filenameAtlas = "/u/mknichel/dNdPt/data/atlas_data.txt";
+const Int_t binsAtlas = 33;                 // number of bins (= lines in data textfile)
+
+// CMS NSD data file
+Char_t* filenameCms = "/u/mknichel/dNdPt/data/cms_data.txt";
+const Int_t binsCms = 24;                   // number of bins (= lines in data textfile)
+
+// UA1 invariant Cross section data file
+Char_t* filenameUa1 = "/u/mknichel/dNdPt/data/UA1data_0.9TeV_pt_CrossSec_errCrossSec.txt";
+const Int_t binsUa1 = 52;              // number of bins (= lines in data textfile)
+
+// photjet root file
+Char_t* filenamePhojet = "/u/jacek/alice/dNdPt/output/fastsim/out_fastsim_900Phojet_EtaRange0.8.root";   
+const Int_t binsPhojet = 54;   // number of bins
+
+// Pythia D6T (109) root file
+Char_t* filenamePythia109 = "/u/jacek/alice/dNdPt/output/fastsim/out_fastsim_900Pythia109_EtaRange0.8.root";
+const Int_t binsPythia109 = 54;   // number of bins
+
+// Pythia ATLAS-CSC (306) root file
+Char_t* filenamePythia306 = "/u/jacek/alice/dNdPt/output/fastsim/out_fastsim_900Pythia306_EtaRange0.8.root";
+const Int_t binsPythia306 = 54;   // number of bins
+
+// Pythia Perugia0 (320) root file
+Char_t* filenamePythia320 = "/u/jacek/alice/dNdPt/output/fastsim/out_fastsim_900Pythia320_EtaRange0.8.root";
+const Int_t binsPythia320 = 54;   // number of bins
+
+// ALICE Logo file
+Char_t* filenameAliceLogo = "/u/mknichel/dNdPt/LogoALICE-DEF-transp.png";
+TImage* logo = TImage::Open(filenameAliceLogo);
+
+//
+// fit functions
+// these have to be set also in shiftPtxxx.C and makePlotsxxx.C
+//
+TF1* fitNsd = new TF1("fitNsd","[0]*(x*x/sqrt(0.14*0.14+x*x))*(1+x/[2])^((-1) * [1])",0.0,10.0); 
+TF1* fitInel = new TF1("fitInel","[0]*(x*x/sqrt(0.14*0.14+x*x))*(1+x/[2])^((-1) * [1])",0.0,10.0); 
+TF1* fitYield = new TF1("fitYield","[0]*(x*x/sqrt(0.14*0.14+x*x))*(1+x/[2])^((-1) * [1])",0.0,10.0); 
diff --git a/PWG0/dNdPt/macros/plots/storeOutput.C b/PWG0/dNdPt/macros/plots/storeOutput.C
new file mode 100644 (file)
index 0000000..7ad93c5
--- /dev/null
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+// storeOutput.C
+//
+// store figures as eps+gif
+//------------------------------------------------------------------------------
+
+
+void storeOutput()
+{
+if (!SAVE_FIGURES) { return; }
+
+TString outname = outputDir + "/ALICE_";
+if (SHOW_PRELIM) { outname += "Preliminary_"; }
+TString tmp;
+
+
+tmp = outname+"Yield_INEL_2PiPt_dNdPt_withPowerLaw_noBinShift_sepRatios.eps";
+can23->SaveAs(tmp.Data());
+
+tmp = outname+"ATLAS_CMS_Yield_NSD_2PiPt_dNdPt_noBinShift.eps";
+can3->SaveAs(tmp.Data());
+
+tmp = outname+"UA1_InvYield_NSD_Ep_2PiPt_dNdPt_noBinShift.eps";
+can4->SaveAs(tmp.Data());
+
+tmp = outname+"PHOJET_PYTHIA_Yield_INEL_2PiPt_dNdPt_noBinShift.eps";
+can5->SaveAs(tmp.Data());
+
+
+tmp = outname+"Yield_INEL_2PiPt_dNdPt_withPowerLaw_noBinShift_sepRatios.gif";
+can23->SaveAs(tmp.Data());
+
+tmp = outname+"ATLAS_CMS_Yield_NSD_2PiPt_dNdPt_noBinShift.gif";
+can3->SaveAs(tmp.Data());
+
+tmp = outname+"UA1_InvYield_NSD_Ep_2PiPt_dNdPt_noBinShift.gif";
+can4->SaveAs(tmp.Data());
+
+tmp = outname+"PHOJET_PYTHIA_Yield_INEL_2PiPt_dNdPt_noBinShift.gif";
+can5->SaveAs(tmp.Data());
+
+} 
\ No newline at end of file