+++ /dev/null
-
-/**************************************************************************
- * This file is property of and copyright by the ALICE HLT Project *
- * All rights reserved. *
- * *
- * Primary Authors: Albin Gaignette
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/**
- * @file AliHLTPHOSInvMassHistogramProducer
- * @author Albin Gaignette
- * @date
- * @brief Histogram producer for PHOS HLT
- */
-
-// see header file for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
-#include "AliHLTPHOSInvMassHistogramProducer.h"
-//#include "AliESDCaloCluster.h"
-#include "TMath.h"
-
-#include "AliHLTCaloClusterDataStruct.h"
-#include "AliHLTCaloClusterReader.h"
-#include "TObjArray.h"
-//#include "TClonesArray.h"
-//#include <iostream>
-#include "TH1F.h"
-//#include "TH2F.h"
-
-AliHLTPHOSInvMassHistogramProducer::AliHLTPHOSInvMassHistogramProducer() :
- fClusterReader(NULL),
- fHistTwoClusterInvMass(0),
- fHistArrayPtr(0)
-{
- // See header file for documentation
- fHistArrayPtr = new TObjArray;
- fClusterReader = new AliHLTCaloClusterReader();
-
- fHistTwoClusterInvMass = new TH1F("fHistTwoClusterInvMass", "Invariant mass of two clusters", 200, 0, 1);
- fHistTwoClusterInvMass->GetXaxis()->SetTitle("m_{#gamma#gamma} GeV");
- fHistTwoClusterInvMass->GetYaxis()->SetTitle("Number of counts");
- fHistTwoClusterInvMass->SetMarkerStyle(21);
- fHistArrayPtr->AddLast(fHistTwoClusterInvMass);
-}
-
-AliHLTPHOSInvMassHistogramProducer::~AliHLTPHOSInvMassHistogramProducer()
-{
- if(fHistTwoClusterInvMass)
- {
- delete fHistTwoClusterInvMass;
- fHistTwoClusterInvMass = 0;
- }
-}
-
-TObjArray* AliHLTPHOSInvMassHistogramProducer::GetHistograms()
-{
- // See header file for documentation
-
- return fHistArrayPtr;
-}
-
-Int_t AliHLTPHOSInvMassHistogramProducer::DoEvent(AliHLTCaloClusterHeaderStruct* cHeader) {
-
- fClusterReader->SetMemory(cHeader);
-
- int ncls = cHeader->fNClusters;
- Float_t* cPos[ncls];
- Float_t cEnergy[ncls];
-
- AliHLTCaloClusterDataStruct* cluster;
- Int_t icls = 0;
- while ( ( cluster = fClusterReader->NextCluster() ) ) {
-
- cPos[icls] = cluster->fGlobalPos;
- cEnergy[icls] = cluster->fEnergy;
-
- icls++;
- }
-
- for(Int_t ipho = 0; ipho<(ncls-1); ipho++) {
- for(Int_t jpho = ipho+1 ; jpho<ncls ; jpho++) {
- // Calcul of the theta angle between two photons
- Double_t theta = (2* asin(0.5*TMath::Sqrt((cPos[ipho][0]-cPos[jpho][0])*(cPos[ipho][0]-cPos[jpho][0]) +(cPos[ipho][1]-cPos[jpho][1])*(cPos[ipho][1]-cPos[jpho][1]))/460));
-
- // Calcul of the mass m of the pion
- Double_t m =(TMath::Sqrt(2 * cEnergy[ipho]* cEnergy[jpho]*(1-TMath::Cos(theta))));
-
- fHistTwoClusterInvMass->Fill(m);
- }
- }
-
- return 0;
-}
-
-
-
-
+++ /dev/null
-/**************************************************************************
- * This file is property of and copyright by the ALICE HLT Project *
- * All rights reserved. *
- * *
- * Primary Authors: Albin Gaignette *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-#ifndef ALIHLTPHOSINVMASSHISTOGRAMPRODUCER_H
-#define ALIHLTPHOSINVMASSHISTOGRAMPRODUCER_H
-
-/**
- * @file AliHLTPHOSInvMassHistogramProducer
- * @author Albin Gaignette and Svein Lindal slindal@fys.uio.no
- * @date
- * @brief Produces Invariant mass histograms of PHOS clusters
- */
-
-// see header file for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
-//#include "AliHLTPHOSBase.h"
-
-#include "Rtypes.h"
-#include "AliHLTPHOSConstants.h"
-
-class TObjArray;
-class TH1F;
-class AliHLTCaloClusterReader;
-struct AliHLTCaloClusterHeaderStruct;
-
-
-using namespace PhosHLTConst;
-
-
-/**
- * @class AliHLTPHOSInvMassHistogramProducer
- *
- * Class produces physics histograms for PHOS. It takes a TClonesArray
- * of AliESDCalocluster as input and fills several histograms
- *
- * Histograms (1D):
- * * - Invariant mass of two clusters
- *
- * @ingroup alihlt_phos
- */
-
-class AliHLTPHOSInvMassHistogramProducer
-{
- public:
-
- /** Constructor */
- AliHLTPHOSInvMassHistogramProducer();
-
- /** Destructor */
- virtual ~AliHLTPHOSInvMassHistogramProducer();
-
- /** Copy constructor */
- AliHLTPHOSInvMassHistogramProducer(const AliHLTPHOSInvMassHistogramProducer &) :
- fClusterReader(NULL),
- fHistTwoClusterInvMass(NULL),
- fHistArrayPtr(NULL)
- {
- // Copy constructor not implemented
- }
-
- /** Assignment operator */
- AliHLTPHOSInvMassHistogramProducer & operator= (const AliHLTPHOSInvMassHistogramProducer)
- {
- // assignment
- return *this;
- }
-
- /** Analyse the clusters in the event */
- int DoEvent(AliHLTCaloClusterHeaderStruct* cHeader);
-
- /** Get a pointer to the TObjArray of histograms */
- TObjArray *GetHistograms();
-
-
-
- private:
-
- /** Cluster reader class */
- AliHLTCaloClusterReader * fClusterReader;
-
- /** Histogram of the 2 cluster invariant mass */
- TH1F *fHistTwoClusterInvMass; //!transient
-
- /** Pointer to the array of histograms */
- TObjArray *fHistArrayPtr; //!transient
-
- ClassDef(AliHLTPHOSInvMassHistogramProducer, 0);
-
-};
-
-#endif
+++ /dev/null
-
-/**************************************************************************
- * This file is property of and copyright by the ALICE HLT Project *
- * All rights reserved. *
- * *
- * Primary Authors: Albin Gaignette
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/**
- * @file AliHLTPHOSMatchedclustershistoProducer
- * @author Albin Gaignette
- * @date
- * @brief Histogram producer for PHOS HLT
- */
-
-// see header file for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
-#include "AliHLTPHOSMatchedClustersHistoProducer.h"
-//#include "AliESDCaloCluster.h"
-#include "TMath.h"
-
-#include "AliHLTCaloClusterDataStruct.h"
-#include "AliHLTCaloClusterReader.h"
-#include "TObjArray.h"
-//#include "TClonesArray.h"
-//#include <iostream>
-#include "TH1F.h"
-//#include "TH2F.h"
-
-AliHLTPHOSMatchedClustersHistoProducer::AliHLTPHOSMatchedClustersHistoProducer() :
- fClusterReader(NULL),
- fHistArrayPtr(0),
- fHistMatchQuality(0),
- fHistMatchedEnergy(0),
- fHistUnMatchedEnergy(0)
-{
- // See header file for documentation
- fHistArrayPtr = new TObjArray;
- fClusterReader = new AliHLTCaloClusterReader();
-
- fHistMatchQuality = new TH1F("fHistMatchQuality", "Distance between cluster and track intersection with phos module", 50, 0, 50);
- fHistMatchQuality->GetXaxis()->SetTitle("Distance (cm)");
- fHistMatchQuality->GetYaxis()->SetTitle("Count");
- fHistMatchQuality->SetMarkerStyle(21);
- fHistArrayPtr->AddLast(fHistMatchQuality);
-
- fHistMatchedEnergy = new TH1F("fHistMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
- fHistMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
- fHistMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
- fHistMatchedEnergy->SetMarkerStyle(21);
- fHistArrayPtr->AddLast(fHistMatchedEnergy);
-
- fHistUnMatchedEnergy = new TH1F("fHistUnMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
- fHistUnMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
- fHistUnMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
- fHistUnMatchedEnergy->SetMarkerStyle(21);
- fHistArrayPtr->AddLast(fHistUnMatchedEnergy);
-}
-
-
-AliHLTPHOSMatchedClustersHistoProducer::~AliHLTPHOSMatchedClustersHistoProducer()
-{
-
- if(fHistMatchQuality){
- delete fHistMatchQuality;
- fHistMatchQuality = 0;
- }
-
- if(fHistMatchedEnergy) {
- delete fHistMatchedEnergy;
- fHistMatchedEnergy = 0;
- }
-
- if(fHistUnMatchedEnergy) {
- delete fHistUnMatchedEnergy;
- fHistUnMatchedEnergy = 0;
- }
-
-}
-
-
-TObjArray* AliHLTPHOSMatchedClustersHistoProducer::GetHistograms()
-{
- // See header file for documentation
-
- return fHistArrayPtr;
-}
-
-
-Int_t AliHLTPHOSMatchedClustersHistoProducer::DoEvent(AliHLTCaloClusterHeaderStruct* cHeader) {
-
- fClusterReader->SetMemory(cHeader);
-
- AliHLTCaloClusterDataStruct* cluster;
- while ( ( cluster = fClusterReader->NextCluster() ) ) {
-
- if(cluster->fTracksMatched->GetSize()>0) {
- fHistMatchedEnergy->Fill(cluster->fEnergy);
- } else {
- fHistUnMatchedEnergy->Fill(cluster->fEnergy);
- }
- }
-
-
- return 0;
-}
-
-
-
-
+++ /dev/null
-/**************************************************************************
- * This file is property of and copyright by the ALICE HLT Project *
- * All rights reserved. *
- * *
- * Primary Authors: Albin Gaignette *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-#ifndef ALIHLTPHOSMATCHEDCLUSTERSHISTOPRODUCER_H
-#define ALIHLTPHOSMATCHEDCLUSTERSHISTOPRODUCER_H
-
-/**
- * @file AliHLTPHOSMatchedClustersHistoProducer
- * @author Albin Gaignette and Svein Lindal slindal@fys.uio.no
- * @date
- * @brief Produces Invariant mass histograms of PHOS clusters
- */
-
-// see header file for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
-//#include "AliHLTPHOSBase.h"
-
-#include "Rtypes.h"
-// #include "TClonesArray.h"
-
-#include "AliHLTPHOSConstants.h"
-
-using namespace PhosHLTConst;
-
-class TObjArray;
-class TH1F;
-//class TH2F;
-class AliHLTCaloClusterReader;
-struct AliHLTCaloClusterHeaderStruct;
-
-
-/**
- * @class AliHLTPHOSMatchedClustersHistoProducer
- *
- * Class produces physics histograms for PHOS. It takes a TClonesArray
- * of AliESDCalocluster as input and fills several histograms
- *
- * Histograms (1D):
- * - Total number of clusters per event
- * - Energy distribution of clusters
- * - Total energy in event
- * - Invariant mass of two clusters
- * - Number of cells in clusters
- * - Fraction of cells with energy deposit
- *
- * Histograms (2D):
- * - Number of cells in cluster vs cluster energy
- * - Number of clusters vs total energy
- *
- * @ingroup alihlt_phos
- */
-
-
-
-//class AliHLTPHOSMatchedClustersHistoProducer : public AliHLTPHOSBase
-class AliHLTPHOSMatchedClustersHistoProducer
-{
- public:
-
- /** Constructor */
- AliHLTPHOSMatchedClustersHistoProducer();
-
- /** Destructor */
- virtual ~AliHLTPHOSMatchedClustersHistoProducer();
-
- /** Copy constructor */
- AliHLTPHOSMatchedClustersHistoProducer(const AliHLTPHOSMatchedClustersHistoProducer &) :
- fClusterReader(NULL),
- fHistArrayPtr(0),
- fHistMatchQuality(0),
- fHistMatchedEnergy(0),
- fHistUnMatchedEnergy(0)
- {
- // Copy constructor not implemented
- }
-
- /** Assignment operator */
- AliHLTPHOSMatchedClustersHistoProducer & operator= (const AliHLTPHOSMatchedClustersHistoProducer)
- {
- // assignment
- return *this;
- }
-
- /** Analyse the clusters in the event */
- int DoEvent(AliHLTCaloClusterHeaderStruct* cHeader);
-
- /** Get a pointer to the TObjArray of histograms */
- TObjArray *GetHistograms();
-
-
-
- private:
-
- /** Cluster reader class */
- AliHLTCaloClusterReader * fClusterReader;
-
- /** Pointer to the array of histograms */
- TObjArray *fHistArrayPtr; //!transient
-
- /** Histogram of the 2 cluster invariant mass */
- TH1F *fHistMatchQuality; //!transient
-
- /** Histograms of the energy distribution of mached and unmatched clusters*/
- TH1F *fHistMatchedEnergy; //!transient
- TH1F *fHistUnMatchedEnergy; //!transient
-
-
-
-
- ClassDef(AliHLTPHOSMatchedClustersHistoProducer, 0);
-
-};
-
-#endif