Commit 00a99df5 by dauncey

### Add Hack.hh for Mac ROOT problem and Gaussian PU mean

parent 89394d5a
No preview for this file type
 ... @@ -196,6 +196,7 @@ i_x \\ i_y ... @@ -196,6 +196,7 @@ i_x \\ i_y \end{pmatrix} \end{pmatrix} \newpage \section{Optimisation of layer weights} \section{Optimisation of layer weights} Each event $e$ gives some values $d_{e,i}$ of the deposited energy in Each event $e$ gives some values $d_{e,i}$ of the deposited energy in layer $i$; these layer $i$; these ... ...
 ... @@ -18,7 +18,7 @@ public: ... @@ -18,7 +18,7 @@ public: const std::string &sRoot="", const std::string &sRoot="", const std::string &sOut="") // ctor const std::string &sOut="") // ctor : fTwoPi(2.0*acos(-1.0)), fName(sName), : fTwoPi(2.0*acos(-1.0)), fName(sName), fTFileHandler((sOut==""?"":sOut+"/")+fName+(sRoot==""?sRoot:"_"+sRoot)) { fTFileHandler((sOut==""?"":sOut+"/")+fName+(sRoot==""?"/Base":"/"+sRoot)) { fEventSelect=0; fEventSelect=0; fPrintLevel=0; fPrintLevel=0; ... ...
This diff is collapsed.
 ... @@ -46,7 +46,10 @@ public: ... @@ -46,7 +46,10 @@ public: hPuGenEvent=new TH1F((fName+"_PuGenEvent").c_str(), hPuGenEvent=new TH1F((fName+"_PuGenEvent").c_str(), ";Number of PU events", ";Number of PU events", 400,0.0,400.0); 100,0.0,500.0); hParticlesVsPuGenEvent=new TH2F((fName+"_ParticlesVsPuGenEvent").c_str(), ";Number of PU events;Number of particles", 100,0.0,500.0,100,0.0,500.0); hSimHitEventNumber[0]=new TH1F((fName+"_SimHitEventNumberSig").c_str(), hSimHitEventNumber[0]=new TH1F((fName+"_SimHitEventNumberSig").c_str(), ";Signal SimHit event number", ";Signal SimHit event number", ... @@ -57,28 +60,28 @@ public: ... @@ -57,28 +60,28 @@ public: hMipsVsLayer[0]=new TH2F((fName+"_"+"MipsVsLayer0").c_str(), hMipsVsLayer[0]=new TH2F((fName+"_"+"MipsVsLayer0").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,100,0.0,10.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,100,0.0,10.0); hMipsVsLayerP[0]=new TProfile((fName+"_"+"MipsVsLayer0P").c_str(), hMipsVsLayerP[0]=new TProfile((fName+"_"+"MipsVsLayer0P").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,0.0,10.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,0.0,10.0); hMipsVsLayer[1]=new TH2F((fName+"_"+"MipsVsLayer1").c_str(), hMipsVsLayer[1]=new TH2F((fName+"_"+"MipsVsLayer1").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,100,0.0,100.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,100,0.0,100.0); hMipsVsLayerP[1]=new TProfile((fName+"_"+"MipsVsLayer1P").c_str(), hMipsVsLayerP[1]=new TProfile((fName+"_"+"MipsVsLayer1P").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,0.0,100.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,0.0,100.0); hMipsVsLayer[2]=new TH2F((fName+"_"+"MipsVsLayer2").c_str(), hMipsVsLayer[2]=new TH2F((fName+"_"+"MipsVsLayer2").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,100,0.0,1000.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,100,0.0,1000.0); hMipsVsLayerP[2]=new TProfile((fName+"_"+"MipsVsLayer2P").c_str(), hMipsVsLayerP[2]=new TProfile((fName+"_"+"MipsVsLayer2P").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,0.0,1000.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,0.0,1000.0); hMipsVsLayer[3]=new TH2F((fName+"_"+"MipsVsLayer3").c_str(), hMipsVsLayer[3]=new TH2F((fName+"_"+"MipsVsLayer3").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,100,0.0,10000.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,100,0.0,10000.0); hMipsVsLayerP[3]=new TProfile((fName+"_"+"MipsVsLayer3P").c_str(), hMipsVsLayerP[3]=new TProfile((fName+"_"+"MipsVsLayer3P").c_str(), ";Layer;MIPs", ";Layer;MIPs", 52,0.0,52.0,0.0,10000.0); Geometry::kNumberOfLayers+2,0.0,Geometry::kNumberOfLayers+2,0.0,10000.0); hPhotonEta=new TH1R((fName+"_"+"PhotonEta").c_str(), hPhotonEta=new TH1R((fName+"_"+"PhotonEta").c_str(), ";Truth photon |#eta|", ";Truth photon |#eta|", ... @@ -381,12 +384,15 @@ public: ... @@ -381,12 +384,15 @@ public: unsigned simHitNum[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers]; unsigned simHitNum[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers]; double simHitSum[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers]; double simHitSum[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers]; unsigned nParticles(0); for(unsigned e(0);e &vL1Track(event.l1Tracks(e)); std::vector &vL1Track(event.l1Tracks(e)); std::cout << fName << " Event " << fEventNumber std::cout << fName << " Event " << fEventNumber << " numbers of particles in endcap " << e << " = " << " numbers of particles in endcap " << e << " = " << vL1Track.size() << std::endl; << vL1Track.size() << std::endl; nParticles+=vL1Track.size(); std::vector &vPhoton(event.photons(e)); std::vector &vPhoton(event.photons(e)); std::cout << fName << " Event " << fEventNumber std::cout << fName << " Event " << fEventNumber << " numbers of photons in endcap " << e << " = " << " numbers of photons in endcap " << e << " = " ... @@ -603,14 +609,14 @@ public: ... @@ -603,14 +609,14 @@ public: hHitNumber[l]->Fill(nSimHitLayer); hHitNumber[l]->Fill(nSimHitLayer); hHitNumber[Geometry::kNumberOfLayers]->Fill(nSimHit); hHitNumber[Geometry::kNumberOfLayers]->Fill(nSimHit); hMipsVsLayer[0]->Fill(l,simHitMips[l]); hMipsVsLayer[0]->Fill(l+1,simHitMips[l]); hMipsVsLayerP[0]->Fill(l,simHitMips[l]); hMipsVsLayerP[0]->Fill(l+1,simHitMips[l]); hMipsVsLayer[1]->Fill(l,simHitMips[l]); hMipsVsLayer[1]->Fill(l+1,simHitMips[l]); hMipsVsLayerP[1]->Fill(l,simHitMips[l]); hMipsVsLayerP[1]->Fill(l+1,simHitMips[l]); hMipsVsLayer[2]->Fill(l,simHitMips[l]); hMipsVsLayer[2]->Fill(l+1,simHitMips[l]); hMipsVsLayerP[2]->Fill(l,simHitMips[l]); hMipsVsLayerP[2]->Fill(l+1,simHitMips[l]); hMipsVsLayer[3]->Fill(l,simHitMips[l]); hMipsVsLayer[3]->Fill(l+1,simHitMips[l]); hMipsVsLayerP[3]->Fill(l,simHitMips[l]); hMipsVsLayerP[3]->Fill(l+1,simHitMips[l]); } } if(fabs(simHitMips[0]-event.simMips(e,0))<1.0e-5*event.simMips(e,0)) { if(fabs(simHitMips[0]-event.simMips(e,0))<1.0e-5*event.simMips(e,0)) { ... @@ -700,6 +706,9 @@ public: ... @@ -700,6 +706,9 @@ public: */ */ } } hParticlesVsPuGenEvent->Fill(event.puGenEvent().size(),nParticles); bool noHits(true); bool noHits(true); for(unsigned l(0);l0 || simHitNum[1][l]>0) noHits=false; if(simHitNum[0][l]>0 || simHitNum[1][l]>0) noHits=false; ... @@ -745,6 +754,7 @@ protected: ... @@ -745,6 +754,7 @@ protected: TH1F *hGenTrackEta; TH1F *hGenTrackEta; TH1F *hPuGenEvent; TH1F *hPuGenEvent; TH2F *hParticlesVsPuGenEvent; TH1F *hSimHitEventNumber[2]; TH1F *hSimHitEventNumber[2]; ... ...
 ... @@ -79,6 +79,15 @@ public: ... @@ -79,6 +79,15 @@ public: else fDetId&=0xfffffdff; else fDetId&=0xfffffdff; } } bool pbxSelected() const { return (fDetId&0x00001000)!=0; } void pbxSelected(bool f) { if(f) fDetId|=0x00001000; else fDetId&=0xffffefff; } bool tpgSelected() const { bool tpgSelected() const { return (fDetId&0x00000400)!=0; return (fDetId&0x00000400)!=0; } } ... ...