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() :
46 fHistMatchedEnergy(0),
47 fHistUnMatchedEnergy(0)
49 // See header file for documentation
50 fHistArrayPtr = new TObjArray;
51 fClusterReader = new AliHLTCaloClusterReader();
53 fHistMatchQuality = new TH1F("fHistMatchQuality", "Distance between cluster and track intersection with phos module", 50, 0, 50);
54 fHistMatchQuality->GetXaxis()->SetTitle("Distance (cm)");
55 fHistMatchQuality->GetYaxis()->SetTitle("Count");
56 fHistMatchQuality->SetMarkerStyle(21);
57 fHistArrayPtr->AddLast(fHistMatchQuality);
59 fHistMatchedEnergy = new TH1F("fHistMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
60 fHistMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
61 fHistMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
62 fHistMatchedEnergy->SetMarkerStyle(21);
63 fHistArrayPtr->AddLast(fHistMatchedEnergy);
65 fHistUnMatchedEnergy = new TH1F("fHistUnMatchedEnergy", "Energy distribution of clusters, negative x is unmatched, positive x is matched", 400, -200, 200);
66 fHistUnMatchedEnergy->GetXaxis()->SetTitle("Cluster Energy (GeV)");
67 fHistUnMatchedEnergy->GetYaxis()->SetTitle("Number of clusters. Negative x direction is unmatched track, positive matched");
68 fHistUnMatchedEnergy->SetMarkerStyle(21);
69 fHistArrayPtr->AddLast(fHistUnMatchedEnergy);
73 AliHLTPHOSHistoProdMatchedTracks::~AliHLTPHOSHistoProdMatchedTracks()
76 if(fHistMatchQuality){
77 delete fHistMatchQuality;
78 fHistMatchQuality = 0;
81 if(fHistMatchedEnergy) {
82 delete fHistMatchedEnergy;
83 fHistMatchedEnergy = 0;
86 if(fHistUnMatchedEnergy) {
87 delete fHistUnMatchedEnergy;
88 fHistUnMatchedEnergy = 0;
94 TObjArray* AliHLTPHOSHistoProdMatchedTracks::GetHistograms()
96 // See header file for documentation
102 Int_t AliHLTPHOSHistoProdMatchedTracks::DoEvent(AliHLTCaloClusterHeaderStruct* cHeader) {
104 fClusterReader->SetMemory(cHeader);
106 AliHLTCaloClusterDataStruct* cluster;
107 while ( ( cluster = fClusterReader->NextCluster() ) ) {
109 if(cluster->fTracksMatched->GetSize()>0) {
110 fHistMatchedEnergy->Fill(cluster->fEnergy);
112 fHistUnMatchedEnergy->Fill(cluster->fEnergy);