2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
6 * Primary Authors: Albin Gaignette
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
18 * @file AliHLTPHOSMatchedclustershistoProducer
19 * @author Albin Gaignette
21 * @brief Histogram producer for PHOS HLT
24 // see header file for class documentation
26 // refer to README to build package
28 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
30 #include "AliHLTPHOSHistoProdMatchedTracks.h"
31 //#include "AliESDCaloCluster.h"
34 #include "AliHLTCaloClusterDataStruct.h"
35 #include "AliHLTCaloClusterReader.h"
36 #include "TObjArray.h"
37 //#include "TClonesArray.h"
42 AliHLTPHOSHistoProdMatchedTracks::AliHLTPHOSHistoProdMatchedTracks() :
45 fHistMatchedEnergy(0),
46 fHistUnMatchedEnergy(0)
48 // See header file for documentation
49 fHistArrayPtr = new TObjArray;
50 fClusterReader = new AliHLTCaloClusterReader();
52 fHistMatchQuality = new TH1F("fHistMatchQuality", "Distance between cluster and track intersection with phos module", 50, 0, 50);
53 fHistMatchQuality->GetXaxis()->SetTitle("Distance (cm)");
54 fHistMatchQuality->GetYaxis()->SetTitle("Count");
55 fHistMatchQuality->SetMarkerStyle(21);
56 fHistArrayPtr->AddLast(fHistMatchQuality);
58 fHistMatchedEnergy = new TH1F("fHistMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
59 fHistMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
60 fHistMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
61 fHistMatchedEnergy->SetMarkerStyle(21);
62 fHistArrayPtr->AddLast(fHistMatchedEnergy);
64 fHistUnMatchedEnergy = new TH1F("fHistUnMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
65 fHistUnMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
66 fHistUnMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
67 fHistUnMatchedEnergy->SetMarkerStyle(21);
68 fHistArrayPtr->AddLast(fHistUnMatchedEnergy);
72 AliHLTPHOSHistoProdMatchedTracks::~AliHLTPHOSHistoProdMatchedTracks()
75 if(fHistMatchQuality){
76 delete fHistMatchQuality;
77 fHistMatchQuality = 0;
80 if(fHistMatchedEnergy) {
81 delete fHistMatchedEnergy;
82 fHistMatchedEnergy = 0;
85 if(fHistUnMatchedEnergy) {
86 delete fHistUnMatchedEnergy;
87 fHistUnMatchedEnergy = 0;
93 TObjArray* AliHLTPHOSHistoProdMatchedTracks::GetHistograms()
95 // See header file for documentation
101 Int_t AliHLTPHOSHistoProdMatchedTracks::DoEvent(AliHLTCaloClusterHeaderStruct* cHeader) {
103 fClusterReader->SetMemory(cHeader);
105 AliHLTCaloClusterDataStruct* cluster;
106 while ( ( cluster = fClusterReader->NextCluster() ) ) {
108 if(cluster->fTracksMatched->GetSize()>0) {
109 fHistMatchedEnergy->Fill(cluster->fEnergy);
111 fHistUnMatchedEnergy->Fill(cluster->fEnergy);