add cluster monitoring from RecPoints
[u/mrichter/AliRoot.git] / PWG1 / TRD / macros / AddTRDcheckTRK.C
CommitLineData
3ceb45ae 1#if ! defined (__CINT__) || defined (__MAKECINT__)
2#include "TTree.h"
3#include "TError.h"
4#include "AliLog.h"
5#include "AliAnalysisManager.h"
6#include "AliAnalysisDataContainer.h"
7#include "TRD/AliTRDtrackerV1.h"
8#include "TRD/AliTRDtransform.h"
9#include "PWG1/TRD/AliTRDcheckTRK.h"
10#endif
11
12void AddTRDcheckTRK(AliAnalysisManager *mgr, Int_t /*map*/, AliAnalysisDataContainer **ci/*, AliAnalysisDataContainer **co*/)
13{
f073d500 14 Info("AddTRDcheckTRK", Form("[0]=\"%s\" [1]=\"%s\" [2]=\"%s\"", ci[0]->GetName(), ci[1]->GetName(), ci[2]->GetName()));
3ceb45ae 15
16 //AliLog::SetClassDebugLevel("AliTRDcheckTRK", 3);
17 // global settings for tracking
18 AliTRDcheckTRK::SetKalmanUpdate(kTRUE);
19 AliTRDcheckTRK::SetKalmanStep(0.2);
20 AliTRDcheckTRK::SetClRecalibrate(kTRUE);
21 AliTRDtrackerV1::SetBetheBloch(AliTRDtrackerV1::kGeant);
22/* AliTRDtransform::SetVd(.2);
23 AliTRDtransform::SetT0(.2);
24 AliTRDtransform::SetExB(.2);*/
25 char bb[10];
26 switch(AliTRDtrackerV1::GetBetheBloch()){
27 case AliTRDtrackerV1::kGeant:
28 snprintf(bb, 10, "Geant"); break;
29 case AliTRDtrackerV1::kSolid:
30 snprintf(bb, 10, "Solid"); break;
31 case AliTRDtrackerV1::kGas:
32 snprintf(bb, 10, "Gas"); break;
33 }
34 Info("AddTRDcheckTRK", Form("Tracking settings:\n"
35 " BetheBloch [%s]\n"
36 " KalmanUpdate [%c]\n"
37 " KalmanStep [%f]\n"
38 " ClRecalibrate [%c]\n"
39 , bb
40 , AliTRDcheckTRK::HasKalmanUpdate()?'y':'n'
41 , AliTRDcheckTRK::GetKalmanStep()
42 , AliTRDcheckTRK::HasClRecalibrate()?'y':'n'
43 ));
44
45 AliTRDcheckTRK *trk(NULL);;
46 mgr->AddTask(trk = new AliTRDcheckTRK((char*)"TRDcheckTRK"));
47 trk->SetDebugLevel(0);
48 trk->SetMCdata(mgr->GetMCtruthEventHandler());
49 trk->SetFriends(kTRUE);
50 mgr->ConnectInput( trk, 0, mgr->GetCommonInputContainer()); // connect main (ESD) container
51 mgr->ConnectInput( trk, 1, ci[0]); // connect barrel tracks container
52 mgr->ConnectInput( trk, 2, ci[1]); // connect event info container
f073d500 53 mgr->ConnectInput( trk, 3, ci[2]); // connect clusters container
3ceb45ae 54
55 mgr->ConnectOutput(trk, 1, mgr->CreateContainer(trk->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance",mgr->GetCommonFileName())));
56}
57